教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 精品文档 > 政务民生 >

企业进销存管理系统(C#含源代码) - 图文(7)

来源:网络收集 时间:2025-09-14
导读: 河南科技大学本科毕业设计 this.txtAddress.Text = \; this.txtName.Text = \; this.txtPhoneH.Text = \; this.txtPhoneM.Text = \; this.dtBirthday.Value = DateTime.Now; } 在窗体初始化时执行相关操作,窗体初

河南科技大学本科毕业设计

this.txtAddress.Text = \; this.txtName.Text = \; this.txtPhoneH.Text = \; this.txtPhoneM.Text = \;

this.dtBirthday.Value = DateTime.Now; }

在窗体初始化时执行相关操作,窗体初始化代码如下:

private void EmployeeInfo_Load(object sender, EventArgs e)

{

string cmdtxt = \UserID as 员工ID,Name as 员工姓名,Sex as 员工性别,Birthday as 出生日期,Department as 所属部门,Post as 所在职位\;

cmdtxt += \家庭电话,PhoneM as 手机号码,Address as 家庭住址FROM User\; this.dgvUserInfo.DataSource = G_SqlClass.GetDs(cmdtxt).Tables[0];

G_OperationForm.BindComboBox(\, cbxPost, \);

G_OperationForm.BindComboBox(\, cbxDepartment, \);

this.cbxSex.SelectedIndex = 0; //设置默认选项 this.cbxCondition.SelectedIndex = 0;

this.dgvUserInfo.Columns[0].Visible = false; //设置DataGridView控件隐藏列 }

3.6.4 进货管理窗体设计

? 采购查询窗体(图13) ? 采购进货窗体 ? 采购退货窗体

1.窗体设计

在窗体中分别添加GroupBox控件(包含Label控件、TextBox控件、RadioButton控件、DateTimePicker控件、Button控件和ComboBox控件)、一个DataGridView控件。

26

河南科技大学本科毕业设计

图13 采购查询窗体

2.代码设计

【开始查询按钮】的Click事件代码如下:

private void btnSfind_Click(object sender, EventArgs e)

{

string strcmdtxt = String.Empty; string strselect = String.Empty; if (this.radioButton1.Checked) {

strselect = \ + this.txtGoodsID.Text + \ + this.txtGoodsName.Text + \;

strselect += \ + this.dtStartTime.Value.ToString(\) + \;

strselect += \ + this.dtEndTime.Value.ToString(\) + \;

strcmdtxt = \商品ID,GoodsName as 商品名称,GoodsTime as 进货日期,CompanyName as 公司名称\;

strcmdtxt += \进货数量,GoodsUnit as 商品单位,GoodsPrice as 商品进价,DepotName as 所属仓库,GoodsSpec as 商品规格\;

strcmdtxt += \销售价格,NeedPay as 应付金额,HasPay as 实付金额,Remark as 备注 FROM Goods\;

strcmdtxt += \ + strselect + \;

this.dgvGoodsInfo.DataSource = SqlClass.GetDs(strcmdtxt).Tables[0]; }

if (this.radioButton2.Checked) {

27

河南科技大学本科毕业设计

strselect = \ + this.txtGoodsID.Text + \ + this.txtGoodsName.Text + \;

strselect += \ + this.dtStartTime.Value.ToString(\) + \;

strselect += \ + this.dtEndTime.Value.ToString(\) + \;

strcmdtxt = \退货ID,GoodsID as 进货ID,ReGoodsName as 商品名称,ReGoodsTime as 退货日期,ReGoodsNum as 退货数量\;

strcmdtxt += \商品单位,ReGoodsSpec as 商品规格,ReGoodsPrice as 进货价格\;

strcmdtxt += \as 应收金额,HasPay as 实收金额,ReGoodsResult as 退货原因 FROM ReGoods\;

strcmdtxt += \ + strselect + \;

this.dgvGoodsInfo.DataSource = SqlClass.GetDs(strcmdtxt).Tables[0]; } }

private void btnCfind_Click(object sender, EventArgs e) {

this.txtGoodsName.Text = \; this.txtGoodsID.Text = \;

this.dtEndTime.Value = DateTime.Now; this.dtStartTime.Value = DateTime.Now; }

3.6.5 销售管理窗体设计

? 销售查询窗体(图14) ? 商品销售窗体 ? 客户退货窗体

1.窗体设计

在窗体中分别添加GroupBox控件(包含Label控件、TextBox控件、Button控件和ComboBox控件)、一个DataGridView控件。

28

河南科技大学本科毕业设计

图14 销售查询窗体

2.代码设计

在窗体初始化时执行相关操作,窗体初始化代码如下: private void SellFind_Load(object sender, EventArgs e)

{

string P_Str_cmdtxt = \销售ID,GoodsID as 商品ID,GoodsName as 商品名称,GoodsNum as 销售数量\;

P_Str_cmdtxt += \商品单位,GoodsTime as 销售时间,GoodsSpec as 商品规格,GoodsPrice as 进货价格,SellPrice as 销售价格\;

P_Str_cmdtxt += \应收金额,HasPay as 实收金额,Remark as 备注 FROM Sell\; this.dgvStockInfo.DataSource = SqlClass.GetDs(P_Str_cmdtxt).Tables[0];

this.cbxCondition1.SelectedIndex = 0; this.cbxCondition2.SelectedIndex = 0; }

双击DataGridView控件时的事件代码如下:

private void dgvStockInfo_DoubleClick(object sender, EventArgs e)

{

PropertyClass.GetDgvData = this.dgvStockInfo[2, this.dgvStockInfo.CurrentCell.RowIndex].Value.ToString(); PropertyClass.GetGoodsID = this.dgvStockInfo[1, this.dgvStockInfo.CurrentCell.RowIndex].Value.ToString(); PropertyClass.GetStockUnit = this.dgvStockInfo[4, this.dgvStockInfo.CurrentCell.RowIndex].Value.ToString(); PropertyClass.GetGoodsInPrice = this.dgvStockInfo[7,

29

河南科技大学本科毕业设计

this.dgvStockInfo.CurrentCell.RowIndex].Value.ToString(); PropertyClass.GetSellPrice = this.dgvStockInfo[8, this.dgvStockInfo.CurrentCell.RowIndex].Value.ToString(); PropertyClass.GetStockSpec = this.dgvStockInfo[6, this.dgvStockInfo.CurrentCell.RowIndex].Value.ToString(); this.Close(); }

3.6.6库存管理窗体设计

? 库存查询窗体(图15) ? 库存调拨窗体 ? 库存报警窗体

1.窗体设计

在窗体中分别添加GroupBox控件(包含Label控件、TextBox控件、Button控件和ComboBox控件)、一个DataGridView控件。

图15 库存查询窗体

2.代码设计

【开始查询按钮】的Click事件 …… 此处隐藏:2129字,全部文档内容请下载后查看。喜欢就下载吧 ……

企业进销存管理系统(C#含源代码) - 图文(7).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wendang/446869.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)