2010年8月16日

C# 动态生成控件

摘要: //窗体加载的构造方法public AA(){  //定义一个List存放动态生成的控件(这里以Label为例)  List<Label> lab=new List<Label>();  for(int i=0;i<变量;i++)  {    lab.Insert(i,new Label());    lab[i].Text=变量;    lab[i].].Locat... 阅读全文

posted @ 2010-08-16 00:48 VictorShan 阅读(431) 评论(0) 推荐(0) 编辑

C# 从DataTable中取值

摘要: //定义一个返回DataTable 的方法private DataTable AA(){  SqlConnection con=new SqlConnection("server=localhost;database=aa;uid=sa;pwd=sa;)  con.Open();  DataTable dt=new DataTable();  SqlDataAdapter da=new SqlDa... 阅读全文

posted @ 2010-08-16 00:34 VictorShan 阅读(4888) 评论(0) 推荐(0) 编辑

导航