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

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

来源:网络收集 时间:2025-09-14
导读: 河南科技大学本科毕业设计 string strselect = \ + this.txtGoodsName.Text + \LIKE '\ + this.txtGoodsID + \; strselect += \ + this.txtStockNum.Text + \ + this.txtAlarmNum.Text + \; if (this.txtGoodsPrice

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

string strselect = \ + this.txtGoodsName.Text + \LIKE '\ + this.txtGoodsID + \;

strselect += \ + this.txtStockNum.Text + \ + this.txtAlarmNum.Text + \;

if (this.txtGoodsPrice.Text != \) {

strselect += \ +

this.cbxCondition1.Items[this.cbxCondition1.SelectedIndex].ToString() + this.txtGoodsPrice.Text+\; }

if (this.txtSellPrice.Text != \) {

strselect += \ +

this.cbxCondition2.Items[this.cbxCondition2.SelectedIndex].ToString() + this.txtSellPrice.Text + \;

}

string strcmdtxt = \库存ID,GoodsID as 商品ID,GoodsName as 商品名称,DepotName as 仓库名称\;

strcmdtxt += \供应商名称,StockNum as 库存数量,AlarmNum as 报警数量,GoodsUnit as 商品单位\;

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

strcmdtxt += \应付金额,HasPay as 实付金额,Remark as 备注 FROM Stock \ + strselect;

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

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

private void btnCancel_Click(object sender, EventArgs e)

{

this.txtAlarmNum.Text = \; this.txtGoodsID.Text = \; this.txtGoodsName.Text = \; this.txtGoodsPrice.Text = \; this.txtSellPrice.Text = \; this.txtStockNum.Text = \; StockFind_Load(sender, e); }

3.6.7报表窗体设计

? 员工信息报表(图16)

31

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

? 往来单位报表 ? 进货商品报表 ? 员工销售报表 ? 商品进货分析报表 ? 销售价格分析报表 ? 员工销售分析报表

1.窗体设计

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

图16 员工信息报表

2.代码设计

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

{

G_OperationForm.BindComboBox(\, cbxPost, \);//绑定ComboBox控件

G_OperationForm.BindComboBox(\, cbxDepName, \); this.cbxSex.SelectedIndex = 0; //设定默认项 }

【查询并显示】按钮的Click事件代码如下:

private void btnFindOk_Click(object sender, EventArgs e)

32

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

{

//为报表设定查询语句

string P_selectionFormula = \

+ \ + this.txtName.Text + \ + this.cbxSex.Items[this.cbxSex.SelectedIndex].ToString() + \;

P_selectionFormula += \ + this.cbxPost.SelectedValue.ToString(); P_selectionFormula += \ + this.cbxDepName.SelectedValue.ToString() + \;

//显示满足条件的报表信息

this.crystalReportViewer1.ReportSource =

G_OperationForm.CrystalReports(\, P_selectionFormula); }

3.6.8系统维护界面

? 系统用户设置窗体(图17) ? 用户权限窗体 ? 更改密码窗体 ? 数据备份窗体 ? 数据还原窗体

1.窗体设计

在窗体中分别添加GroupBox控件(包含Label控件、TextBox控件、Button控件、ComboBox控件、ListBox控件和TreeView控件)和ErrorProvider控件。

图17 系统用户设置窗体

2.代码设计

【设置/修改】按钮的Click事件的代码如下:

33

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

private void btnEdit_Click(object sender, EventArgs e)

{

if (this.cbxLogin.Text == \) {

this.errorProvider1.SetError(this.cbxLogin, \登录身份不能为空!\); return; }

if (this.checkBox1.Checked && this.txtName.Text == \) {

this.errorProvider1.SetError(this.txtName, \用户名不能为空!\); return; }

if (this.checkBox2.Checked && this.txtOkPwd.Text != this.txtPwd.Text) {

this.errorProvider1.SetError(this.txtOkPwd, \两次输入密码不一致!\); return; }

if (this.checkBox2.Checked && this.txtPwd.Text.Length < 6) {

this.errorProvider1.SetError(this.txtPwd, \输入密码不能小于6位!\); return; }

if (this.checkBox2.Checked && this.txtOkPwd.Text.Length < 6) {

this.errorProvider1.SetError(this.txtOkPwd, \输入密码不能小于6位!\); return; }

//从树控件中读取设置的值

ArrayList arylst = new ArrayList();

foreach (TreeNode nodes in this.treeView1.Nodes) {

foreach (TreeNode node in nodes.Nodes) {

if (node.Checked) {

arylst.Add(\); } else {

arylst.Add(\); } } }

if (this.labMessage.Text == \该用户已为系统用户\)

34

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

{

//判断权限表中是否存在要设置权限的用户

string P_Str_select2 = \ + this.listBox1.SelectedValue.ToString() + \;

SqlDataReader P_dr4 = G_SqlClass.GetReader(P_Str_select2); P_dr4.Read();

string loginame = String.Empty; if (P_dr4.HasRows) {

loginame = P_dr4[\].ToString(); }

P_dr4.Close();

if (MessageBox.S …… 此处隐藏:2253字,全部文档内容请下载后查看。喜欢就下载吧 ……

企业进销存管理系统(C#含源代码) - 图文(8).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)