InStgAdapter.SelectCommand.Connection=sqlConnection1;
InStgAdapter.Fill(InStgInfo);
DataGridTableStyle instg = new DataGridTableStyle();
instg.AlternatingBackColor = Color.Blue;//颜色设置
instg.MappingName = InStgInfo.TableName;
}
4.2.6 货物出库管理模块
本系统的货物出库管理分为货物出库和出库信息查询,分别如图4.15和图4.16所示:
图4.15 货物出库管理之货物出库界面设计图
private void OutStorage_Load(object sender, System.EventArgs e)
{
MyConn.Open();//打开连接
OutStgAdapter.SelectCommand.CommandText = "SELECT * FROM storage_out";
OutStgAdapter.SelectCommand.Connection = MyConn;
OutStgAdapter.Fill(OutStgInfo);//填充数据集
this.dataGrid1.DataSource = OutStgInfo.DefaultView;
OSReport = (CurrencyManager) BindingContext[OutStgInfo];
DataGridTableStyle Out = new DataGridTableStyle();
this.DataBindingsFunction();
Out.AlternatingBackColor = Color.Blue;//颜色设置
Out.MappingName = OutStgInfo.TableName;
this.dataGrid1.Select(0);//选定第一列
this.textNum2.Enabled=false;
}
图4.16 货物出库管理之出库信息查询界面设计图
private void SelInStg_Load(object sender, System.EventArgs e)
{
try
{
this.sqlConnection1.ConnectionString= "server=.;Trusted_Connection=yes;user=sa;pwd=1;database=storage";//建立连接
this.sqlConnection1.Open();
DataSet OutStgSet=new DataSet();
OutStgAdapter.SelectCommand.CommandText="SELECT * FROM storage_out";
OutStgAdapter.SelectCommand.Connection=sqlConnection1;
OutStgAdapter.Fill(OutStgInfo);
DataGridTableStyle outstg = new DataGridTableStyle();
outstg.AlternatingBackColor = Color.Blue;//颜色设置
outstg.MappingName = OutStgInfo.TableName;
}
- 上一篇:基于jfreechart的动态数据可视化应用开发
- 下一篇:C#班级考评管理系统开发与设计
-
-
-
-
-
-
-
酸性水汽提装置总汽提塔设计+CAD图纸
当代大学生慈善意识研究+文献综述
十二层带中心支撑钢结构...
杂拟谷盗体内共生菌沃尔...
大众媒体对公共政策制定的影响
中考体育项目与体育教学合理结合的研究
java+mysql车辆管理系统的设计+源代码
电站锅炉暖风器设计任务书
乳业同业并购式全产业链...
河岸冲刷和泥沙淤积的监测国内外研究现状