C#条码仓库管理系统的设计与开发—统计、报表模块(12)
时间:2016-12-12 22:53 来源:毕业论文 作者:毕业论文 点击:次
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; } (责任编辑:qin) |