欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    管理信息系统ERP系统库存子系统设计课设代码(共15页).doc

    • 资源ID:16321866       资源大小:68.50KB        全文页数:15页
    • 资源格式: DOC        下载积分:20金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要20金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    管理信息系统ERP系统库存子系统设计课设代码(共15页).doc

    精选优质文档-倾情为你奉上主界面程序using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using SJZU;namespace SJZU.SWEIMS.GUI.SWEIMS public partial class Frm_Main : Form public Frm_Main() InitializeComponent(); private void Frm_Main_Load(object sender, EventArgs e) toolStripStatusLabel6.Text = DateTime.Now.ToString(); private void 查询分析ToolStripMenuItem3_Click(object sender, EventArgs e) Frm_Warehouse_Query frm_Warehouse_Query = new Frm_Warehouse_Query(); frm_Warehouse_Query.ShowDialog(); private void 添加仓库信息ToolStripMenuItem_Click(object sender, EventArgs e) Frm_Warehouse_Add frm_Warehouse_Add = new Frm_Warehouse_Add(); frm_Warehouse_Add.ShowDialog(); private void 修改仓库信息ToolStripMenuItem_Click(object sender, EventArgs e) Frm_Warehouse_Update frm_Warehouse_Update = new Frm_Warehouse_Update(); frm_Warehouse_Update.ShowDialog(); private void 删除仓库信息ToolStripMenuItem_Click(object sender, EventArgs e) Frm_Warehouse_Delete frm_Warehouse_Delete = new Frm_Warehouse_Delete(); frm_Warehouse_Delete.ShowDialog(); 仓库信息添加界面using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using SJZU.SWEIMS.BusinessModel;using SJZU.SWEIMS.BusinessLogic;namespace SJZU.SWEIMS.GUI.SWEIMS public partial class Frm_Warehouse_Add : Form public Frm_Warehouse_Add() InitializeComponent(); private void Frm_Warehouse_Add_Load(object sender, EventArgs e) /添加按钮事件 private void btnAdd_Click(object sender, EventArgs e) if (string.IsNullOrEmpty(txtWarehouseCode.Text.Trim() MessageBox.Show("请将数据完整输入!", "提示", MessageBoxButtons.OK); else WarehouseManage warehouseManage = new WarehouseManage(); WarehouseTable warehouseTable = new WarehouseTable(); warehouseTable.WarehouseCode = (string)txtWarehouseCode.Text; warehouseTable.WarehouseName = (string)txtWarehouseName.Text; warehouseTable.Property = (string)txtProperty.Text; warehouseTable.Department = (string)txtDepartment.Text; warehouseTable.Address = (string)txtAddress.Text; warehouseTable.Tel = (string)txtTel.Text; warehouseTable.Director = (string)txtDirector.Text; warehouseTable.CreateBy = (string)txtCreateBy.Text; warehouseTable.CreateTime = int.Parse(dtpCreateTime.Value.ToString("yyyyMMdd"); warehouseTable.Summary = (string)txtSummary.Text; int i = warehouseManage.AddWarehouseTable(warehouseTable); if (i > 0) MessageBox.Show("已插入" + i + "条记录!", "提示", MessageBoxButtons.OK); else MessageBox.Show("插入失败!", "提示", MessageBoxButtons.OK); /取消按钮事件 private void btnCanel_Click(object sender, EventArgs e) txtWarehouseCode.Text = null; txtWarehouseName.Text = null; txtProperty.Text = null; txtDepartment.Text = null; txtAddress.Text = null; txtTel.Text = null; txtDirector.Text = null; txtCreateBy.Text = null; txtSummary.Text = null; /退出按钮事件 private void btnExit_Click(object sender, EventArgs e) this.Close(); 仓库信息删除界面using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using SJZU.SWEIMS.BusinessLogic;namespace SJZU.SWEIMS.GUI.SWEIMS public partial class Frm_Warehouse_Delete : Form public Frm_Warehouse_Delete() InitializeComponent(); /点开删除界面时,向下拉菜单中加载可选的仓库编号 private void Frm_Warehouse_Delete_Load(object sender, EventArgs e) AddWarehouseCode(); private void AddWarehouseCode() cboWarehouseCode.DataSource = new WarehouseManage().GetWarehouseCode(); cboWarehouseCode.DisplayMember = "WAREHOUSECODE" /查询选择的仓库信息 private void btnQuery_Click(object sender, EventArgs e) if (string.IsNullOrEmpty(cboWarehouseCode.Text) MessageBox.Show("请选择出库单编号!"); else dgvWarehouseDetails.DataSource = new WarehouseManage().GetWarehouseTable(cboWarehouseCode.Text); /删除选中的仓库 private void btnDelete_Click(object sender, EventArgs e) if (string.IsNullOrEmpty(cboWarehouseCode.Text) MessageBox.Show("请选择出库单编号!"); else int i = new WarehouseManage().DeleteWarehouse(cboWarehouseCode.Text); MessageBox.Show("已经删除"+i+"条记录!"); dgvWarehouseDetails.DataSource = null; AddWarehouseCode(); /点击退出,关闭窗口 private void btnExit_Click(object sender, EventArgs e) this.Close(); 仓库信息更新界面using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using SJZU.SWEIMS.BusinessModel;using SJZU.SWEIMS.BusinessLogic;using System.Data.SqlClient;using SJZU.SWEIMS.DBUtility;namespace SJZU.SWEIMS.GUI.SWEIMS public partial class Frm_Warehouse_Update : Form WarehouseManage warehouseManage = new WarehouseManage(); SqlDataAdapter adapter; DataTable table; public Frm_Warehouse_Update() InitializeComponent(); private void Frm_Warehouse_Update_Load(object sender, EventArgs e) cboWarehouseCode.DataSource = warehouseManage.GetWarehouseCode(); cboWarehouseCode.DisplayMember = "WAREHOUSECODE" /查询仓库信息 private void btnQuery_Click(object sender, EventArgs e) if (string.IsNullOrEmpty(cboWarehouseCode.Text) MessageBox.Show("请选择要查询的仓库编号!"); else string warehouseCode = cboWarehouseCode.Text; string strsql = "select * from WAREHOUSE where WAREHOUSECODE = " + warehouseCode; string connectionString = SQLHelper._connectionString; SqlConnection conn = new SqlConnection(connectionString); adapter = new SqlDataAdapter(strsql, conn); SqlCommandBuilder builder = new SqlCommandBuilder(adapter); adapter.InsertCommand = builder.GetInsertCommand(); adapter.DeleteCommand = builder.GetDeleteCommand(); adapter.UpdateCommand = builder.GetUpdateCommand(); table = new DataTable(); adapter.Fill(table); dgvWarehouseDetails.DataSource = table; private void btnUpdate_Click(object sender, EventArgs e) dgvWarehouseDetails.EndEdit(); try adapter.Update(table); MessageBox.Show("保存成功!"); catch (SqlException err) MessageBox.Show(err.Message, "保存成功!"); private void btnExit_Click(object sender, EventArgs e) this.Close(); 仓库信息查询界面using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using SJZU.SWEIMS.BusinessModel;using SJZU.SWEIMS.BusinessLogic;namespace SJZU.SWEIMS.GUI.SWEIMS public partial class Frm_Warehouse_Query : Form public Frm_Warehouse_Query() InitializeComponent(); private void Frm_Warehouse_Query_Load(object sender, EventArgs e) /按选择的条件查询仓库信息 private void btnQuery_Click(object sender, EventArgs e) int startTime = int.Parse(dtpStart.Value.ToString("yyyyMMdd"); int endTime = int.Parse(dtpEnd.Value.ToString("yyyyMMdd"); if (startTime > endTime) MessageBox.Show("开始时间不能晚于结束时间!"); else /按时间查询,仓库编号和负责人都不是查询条件 if (cbWarehouseCode.Checked = false && cbDirector.Checked = false) dgvWarehouseDetails.DataSource = new WarehouseManage().GetWarehouseTable(startTime, endTime); /按时间和仓库编号查询 else if (cbWarehouseCode.Checked = true && cbDirector.Checked = false) string warehouseCode = txtWarehouseCode.Text; if (string.IsNullOrEmpty(warehouseCode.Trim() MessageBox.Show("请输入仓库编号!"); else dgvWarehouseDetails.DataSource = new WarehouseManage().GetWarehouseTable(startTime, endTime, warehouseCode); /按时间和负责人查询 else if (cbWarehouseCode.Checked = false && cbDirector.Checked = true) string director = txtDirector.Text; if (string.IsNullOrEmpty(director.Trim() MessageBox.Show("请输入负责人!"); else dgvWarehouseDetails.DataSource = new WarehouseManage().GetWarehouseTable(startTime, endTime, director,9); /按时间,仓库编号,负责人查询 else if (cbWarehouseCode.Checked = true && cbDirector.Checked = true) string warehouseCode = txtWarehouseCode.Text; string director = txtDirector.Text; if (string.IsNullOrEmpty(warehouseCode.Trim() | string.IsNullOrEmpty(director.Trim() MessageBox.Show("所选条件不能为空!"); else dgvWarehouseDetails.DataSource = new WarehouseManage().GetWarehouseTable(startTime, endTime, warehouseCode,director); private void btnExit_Click(object sender, EventArgs e) this.Close(); 逻辑层代码using System;using System.Collections.Generic;using System.Text;using System.Data.SqlClient;using SJZU.SWEIMS.DBUtility;using SJZU.SWEIMS.BusinessModel;using System.Data;namespace SJZU.SWEIMS.BusinessLogic public class WarehouseManage /向数据库WAREHOUSE表中添加仓库数据 public int AddWarehouseTable(WarehouseTable warehouseTable) string strsql = "insert into WAREHOUSE(WAREHOUSECODE," + "WAREHOUSENAME," + "PROPERTY," + "DEPARTMENT," + "ADDRESS," + "TEL," + "DIRECTOR," + "CREATEBY," + "CREATETIME," + "SUMMARY)" + "VALUES(WAREHOUSECODE," + "WAREHOUSENAME," + "PROPERTY," + "DEPARTMENT," + "ADDRESS," + "TEL," + "DIRECTOR," + "CREATEBY," + "CREATETIME," + "SUMMARY)" SqlParameter commandParms = new SqlParameter new SqlParameter("WAREHOUSECODE", warehouseTable.WarehouseCode), new SqlParameter("WAREHOUSENAME", warehouseTable.WarehouseName), new SqlParameter("PROPERTY", warehouseTable.Property) , new SqlParameter("DEPARTMENT", warehouseTable.Department), new SqlParameter("ADDRESS",warehouseTable.Address), new SqlParameter("TEL",warehouseTable.Tel), new SqlParameter("DIRECTOR", warehouseTable.Director), new SqlParameter("CREATEBY", warehouseTable.CreateBy), new SqlParameter("CREATETIME",warehouseTable.CreateTime), new SqlParameter("SUMMARY",warehouseTable.Summary); int i = SQLHelper.ExecuteSql(strsql,commandParms); return i; /取得仓库编号 public DataTable GetWarehouseCode() string strSql = "select WAREHOUSECODE from WAREHOUSE" return SQLHelper.Query(strSql).Tables0; /根据仓库编号查询仓库详细信息 public DataTable GetWarehouseTable(string warehouseCode) string strSql = "select * from WAREHOUSE where WAREHOUSECODE = WAREHOUSECODE" SqlParameter commandParms = new SqlParameter new SqlParameter("WAREHOUSECODE", warehouseCode) ; return SQLHelper.Query(strSql, commandParms).Tables0; /根据仓库编号删除仓库信息 public int DeleteWarehouse(string warehouseCode)

    注意事项

    本文(管理信息系统ERP系统库存子系统设计课设代码(共15页).doc)为本站会员(飞****2)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开