03 2013 档案
摘要:1、System.Diagnostics.Process.Start(@"exe文件的路径");
阅读全文
摘要:1、用两层循环计算,前提条件是数据已经按分组的列排好序的。DataTabledt=newDataTable();dt.Columns.AddRange(newDataColumn[]{newDataColumn("name",typeof(string)), newDataColumn("sex",typeof(string)), newDataColumn("score",typeof(int))});dt.Rows.Add(newobject[]{"张三","男",1});dt.Rows.A
阅读全文
摘要:一、排序DataViewdv=dt.DefaultView;dv.Sort="idasc,namedesc";dt=dv.ToTable();二、检索DataRow[]matches=dt.Select("(id<'003')and(name='名字11')and(numberlike'%2007%')");stringstrName=matches[0]["name"].ToString();三、合并假如有2个DataTabel:Dt1,Dt2。表结构一样将Dt2接在Dt1后可采
阅读全文
摘要:usingSystem;usingSystem.Data;usingSystem.Data.Common;usingSystem.Configuration;publicclassDbHelper{privatestaticstringdbProviderName=ConfigurationManager.AppSettings["DbHelperProvider"];privatestaticstringdbConnectionString=ConfigurationManager.AppSettings["DbHelperConnectionString&qu
阅读全文
摘要:一、简单介绍ADO.NETSystem.Data:DataTable,DataSet,DataRow,DataColumn,DataRelation,ConstraintSystem.Data.Common(各种数据访问类的基类和接口):DataColumnMapping,DataTableMappingSystem.Data.SqlClient(对Sql Server进行操作的数据访问类): 1)SqlConnection:数据库连接器 2)SqlCommand:数据库命名对象 3)SqlCommandBuilder:生存SQL命令 4)SqlDataReader:数据读取器 5)SqlDa
阅读全文
摘要:Rectanglerect=Screen.GetWorkingArea(this);Pointp=newPoint(rect.Width,rect.Height);this.Location=p;
阅读全文
摘要:单行、多行文本溢出显示省略号 1、单行文本溢出显示省略号 div{overflow : hidden;white-space: nowrap;text-overflow: ellipsis;} 2、多行文本溢出显示省略号 方法一: div{overflow : hidden;display:-web
阅读全文