catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
}
}
4.2.7 货物退库管理模块
本系统货物退库管理分为货物退库和退库信息查询界面,分别如图4.17和图4.18所示:
图4.17 货物退库管理之货物退库界面设计图
private void ReturnStg_Load(object sender, System.EventArgs e)
{
MyConn.Open();//打开连接
RetnAdapter.SelectCommand.CommandText = "SELECT * FROM storage_retn";
RetnAdapter.SelectCommand.Connection = MyConn;
RetnAdapter.Fill(ReturnInfo);//填充数据集
this.dataGrid1.DataSource = ReturnInfo.DefaultView;
ReReport = (CurrencyManager) BindingContext[ReturnInfo];
DataGridTableStyle Re = new DataGridTableStyle();
this.DataBindingsFunction();
Re.AlternatingBackColor = Color.Blue;//颜色设置
Re.MappingName = ReturnInfo.TableName;
this.dataGrid1.Select(0);//选定第一列
this.textNum2.Enabled=false;
}
图4.18 货物退库管理之退库信息查询界面设计图
private void SelReturn_Load(object sender, System.EventArgs e)
{
try
{
this.sqlConnection1.ConnectionString= "server=.;Trusted_Connection=yes;user=sa;pwd=1;database=storage";//建立连接
this.sqlConnection1.Open();
DataSet RetnStgSet=new DataSet();
RetnAdapter.SelectCommand.CommandText="SELECT * FROM storage_retn";
RetnAdapter.SelectCommand.Connection=sqlConnection1;
RetnAdapter.Fill(RetnInfo);
DataGridTableStyle retnstg = new DataGridTableStyle();
retnstg.AlternatingBackColor = Color.Blue;//颜色设置
retnstg.MappingName = RetnInfo.TableName;
}
catch(Exception ex)
{ C#条码仓库管理系统的设计与开发—统计、报表模块(13):http://www.youerw.com/jisuanji/lunwen_871.html