摘要:
FormatString格式大众人全Posted on2010-08-12 16:14moss_tan_jun阅读(457) 评论(0)编辑收藏格式化日期和数字的字符串经常要用到这个, 就把帮助里面的东西大概整理了一些列在这里了.下表描述了用来格式化 DateTime 对象的标准格式说明符。格式说明符 名称 说明d 短日期模式 显示由与当前线程关联的 DateTimeFormatInfo.ShortDatePattern 属性定义的模式或者由指定格式提供程序定义的模式。D 长日期模式 显示由与当前线程关联的 DateTimeFormatInfo.LongDatePattern 属性定义的模式或 阅读全文
posted @ 2013-08-31 21:17
meimao5211
阅读(181)
评论(0)
推荐(0)
摘要:
一些SQL高级函数Posted on2010-08-08 21:34moss_tan_jun阅读(311) 评论(0)编辑收藏 长度与分析用datalength(Char_expr) 返回字符串包含字符数,但不包含后面的空格substring(expression,start,length) 不多说了,取子串right(char_expr,int_expr) 返回字符串右边int_expr个字符字符操作类upper(char_expr) 转为大写lower(char_expr) 转为小写space(int_expr) 生成int_expr个空格replicate(char_expr,int_. 阅读全文
posted @ 2013-08-31 21:16
meimao5211
阅读(286)
评论(0)
推荐(0)
摘要:
水晶报表的宽度调整方法(设计器、代码调整、rpt文件属性)Posted on2010-08-07 23:52moss_tan_jun阅读(1725) 评论(0)编辑收藏经过个人反复研究后,特提出一下几点意见:设计里修改方法: 1、在“打印设置”对话框,选择“横向”选项以横向方向打印报表。 2、在“页面设置”对话框,缩小上边距、下边距、左边距、右边距。 3、纵向显示所有报表对象。 (1) 将所有报表对象旋转270度,字段、文本、图片、页码等对象。 右击报表对象,选择"格式化",进入"格式化编辑器对话框"。选择"公用"选项卡,在" 阅读全文
posted @ 2013-08-31 21:15
meimao5211
阅读(2306)
评论(0)
推荐(0)
摘要:
-------------//获取Access数据库表名 public void GetTableName() { string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @"C:\信息技术考试成绩.mdb"; OleDbConnection conn = new OleDbConnection(connString); conn.Open(); DataTable dt = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, 阅读全文
posted @ 2013-08-31 21:14
meimao5211
阅读(503)
评论(0)
推荐(0)
摘要:
private void button3_Click(object sender, EventArgs e) { Thread thread = null; //为了不让界面死掉,要将该操作放在一个线程中 thread = new Thread ( () => { //告诉系统不去检测非法的跨线程调用 CheckForIllegalCrossThreadCalls = false; //创建一个文件流指向源文件 FileStream fsRead = new FileStream(this.textBox1.Text, FileMode.Open); //创建一个文件流指向目标文件 Fi 阅读全文
posted @ 2013-08-31 21:13
meimao5211
阅读(389)
评论(0)
推荐(0)
摘要:
private static string[] GetExcelSheetNames(OleDbConnection conn) { DataTable dtbSheets = null; String[] arrExcelSheets = null; using (conn) { try { conn.Open(); // Get the data table containing the schema dtbSheets = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new object[] { null, null, null, & 阅读全文
posted @ 2013-08-31 21:10
meimao5211
阅读(228)
评论(0)
推荐(0)
摘要:
Dictionary是一个泛型使用说明Posted on2010-08-05 15:03moss_tan_jun阅读(2273) 评论(0)编辑收藏Dictionary是一个泛型他本身有集合的功能有时候可以把它看成数组他的结构是这样的:Dictionary他的特点是存入对象是需要与[key]值一一对应的存入该泛型通过某一个一定的[key]去找到对应的值举个例子://实例化对象Dictionary dic = new Dictionary();//对象打点添加dic.Add(1, "one");dic.Add(2, "two");dic.Add(3, &q 阅读全文
posted @ 2013-08-31 21:08
meimao5211
阅读(238)
评论(0)
推荐(0)
摘要:
/// /// 把TXT GB2312文件转换成TXT UTF8文件 /// /// /// private void FileGB2312TOFileUTF8(string filepath, string filepath2) { filepath = Server.MapPath(filepath); filepath2 = Server.MapPath(filepath2); StreamReader inStream = new StreamReader(filepath, Encoding.GetEncoding(936));//GB2312 StreamWriter o... 阅读全文
posted @ 2013-08-31 21:07
meimao5211
阅读(395)
评论(0)
推荐(0)
摘要:
把ANSI格式的TXT文件批量转换成UTF-8文件类型Posted on2010-08-05 10:38moss_tan_jun阅读(3635) 评论(0)编辑收藏#region 把ANSI格式的TXT文件批量转换成UTF-8文件类型 class FileControl { private string path = ""; private DirectoryInfo dirInfo = null; private FileInfo[] fileInfo = null; private string msg = ""; public string Msg 阅读全文
posted @ 2013-08-31 21:06
meimao5211
阅读(807)
评论(0)
推荐(0)
摘要:
GB2312转换成UTF-8与utf_8转换成GB2312Posted on2010-08-05 10:37moss_tan_jun阅读(1116) 评论(0)编辑收藏/// /// utf_8转换成GB2312 /// /// /// private string ToGB2312(string utfInfo) { string gb2312Info = string.Empty; Encoding utf8 = Encoding.UTF8; Encoding gb2312 = Encoding.GetEncoding("gb2312"); byte[] unicode 阅读全文
posted @ 2013-08-31 21:05
meimao5211
阅读(314)
评论(0)
推荐(0)
摘要:
select语句中只能使用sql函数对字段进行操作(链接sql server),select 字段1 from 表1 where 字段1.IndexOf("云")=1;这条语句不对的原因是indexof()函数不是sql函数,改成sql对应的函数就可以了。left()是sql函数。select 字段1 from 表1 where charindex('云',字段1)=1;字符串函数对二进制数据、字符串和表达式执行不同的运算。此类函数作用于CHAR、VARCHAR、 BINARY、 和VARBINARY 数据类型以及可以隐式转换为CHAR 或VARCHAR的数 阅读全文
posted @ 2013-08-31 21:04
meimao5211
阅读(167)
评论(0)
推荐(0)
摘要:
--聚合函数usepubsgoselectavg(distinctprice)--算平均数fromtitleswheretype='business'gousepubsgoselectmax(ytd_sales)--最大数fromtitlesgousepubsgoselectmin(ytd_sales)--最小数fromtitlesgousepubsgoselecttype,sum(price),sum(advance)--求和fromtitlesgroupbytypeorderbytypegousepubsgoselectcount(distinctcity)--求个数fro 阅读全文
posted @ 2013-08-31 21:02
meimao5211
阅读(190)
评论(0)
推荐(0)
摘要:
SQL 2005批量插入数据的二种方法Posted on2010-07-22 18:13moss_tan_jun阅读(2635) 评论(2)编辑收藏 在SQL Server 中插入一条数据使用Insert语句,但是如果想要批量插入一堆数据的话,循环使用Insert不仅效率低,而且会导致SQL一系统性能问题。下面介绍SQL Server支持的两种批量数据插入方法:Bulk和表值参数(Table-Valued Parameters)。运行下面的脚本,建立测试数据库和表值参数。view plaincopy to clipboardprint?--Create DataBasecreate d... 阅读全文
posted @ 2013-08-31 21:00
meimao5211
阅读(242)
评论(0)
推荐(0)
摘要:
Silverlight访问数据库大全Silverlight访问数据库大全Posted on2010-06-13 17:25moss_tan_jun阅读(1917) 评论(0)编辑收藏最近正在学习Silverlight,个人觉得数据访问是最重要的一部分,现在搜集一些资料,方便查阅:Silverlight与数据库的三种互操作:http://www.silverlightchina.net/html/tips/2009/0826/153.htmlSilverlight访问数据库之ADO.NET Entity Framework篇:http://www.silverlightchina.net/htm 阅读全文
posted @ 2013-08-31 20:57
meimao5211
阅读(145)
评论(0)
推荐(0)
摘要:
js 得到 radiobuttonlist和CheckBoxList 选中值得到radiobuttonlist选中值:var CheckBoxList=document.all.optButtonList; var objCheckBox,CheckValue="";for(i=0;i<CheckBoxList.rows.length;i++) { objCheckBox = document.getElementById('optButtonList'+ "_" + i); if(objCheckBox.checked == tr 阅读全文
posted @ 2013-08-31 20:56
meimao5211
阅读(185)
评论(0)
推荐(0)
摘要:
s 得到 radiobuttonlist和CheckBoxList 选中值得到radiobuttonlist选中值:var CheckBoxList=document.all.optButtonList; var objCheckBox,CheckValue="";for(i=0;i10")之形式达到数据筛选目的 int i=0; int cl=dt.Columns.Count;//取得数据表各列标题,各标题之间以t分割,最后一个列标题后加回车符for(i=0;i {if(i==(cl-1))//最后一列,加n{colHeaders +=dt.Columns[i] 阅读全文
posted @ 2013-08-31 20:55
meimao5211
阅读(725)
评论(0)
推荐(0)

浙公网安备 33010602011771号