private void Hello_Load(object sender, EventArgs e) { ERPInquire3.HelpClass.iniFileHelper ini = new ERPInquire3.HelpClass.iniFileHelper(Application.StartupPath + "/data/Config.ini"); string s = ini.ReadString("Login", "Name", ""); string[] ss = s.Split('-'); name = ss[1]; label1.Text = "欢迎" + name + "使用WMS仓库管理系统"; //label1.TextAlign = ContentAlignment.MiddleCenter; }
private void 修改密码ToolStripMenuItem_Click(object sender, EventArgs e) { WMS_Gimped.Frm.ChangePwd cp = WMS_Gimped.Frm.ChangePwd.CreateInstrance(); ERPInquire3.HelpClass.iniFileHelper ini = new ERPInquire3.HelpClass.iniFileHelper(Application.StartupPath + "/data/Config.ini"); string name = ini.ReadString("Login", "Name", ""); string[] s = name.Split('-'); cp.code = s[0]; cp.name = s[1]; toolStripStatusLabel4.Text = "修改密码"; cp.Show(); }
//确定 private void simpleButton2_Click(object sender, EventArgs e) { //每盘入库数量必须要全部入库,不能剩余物料 if (!Convert.ToUInt64(textBox7.Text).Equals(0)) { MessageBox.Show("存在未入库的产品", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (dataGridView1.RowCount.Equals(0)) { MessageBox.Show("请添加每盘入库明细", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } try { #region 将数据录入系统中 Maticsoft.Model.WMS_CL cl = new Maticsoft.Model.WMS_CL(); Maticsoft.DAL.WMS_CL cldal = new Maticsoft.DAL.WMS_CL(); cl.ID = Guid.NewGuid().ToString(); cl.CLTYPE = "0"; cl.CLBH = CLBM; cl.CLMC = CLMC; //cl.SGBH= cldal.Add(cl); #endregion #region 审核入库单 //将未审核的入库单变成已审核的状态,审核级别到达物料层次 SqlParameter[] para = { new SqlParameter("@BDBH", SqlDbType.Text), new SqlParameter("@WLBM", SqlDbType.Text), new SqlParameter("@SHR", SqlDbType.Text) }; ERPInquire3.HelpClass.iniFileHelper ini = new ERPInquire3.HelpClass.iniFileHelper(Application.StartupPath + "/data/Config.ini"); para[0].Value = BDBH; para[1].Value = CLBM; para[2].Value = ini.ReadString("Login", "Code", ""); SqlHelper.ExecStoredProcedureDataTable("WMS_RKBJ1", para); #endregion #region 委托调用窗体更新 DialogResult = DialogResult.OK; #endregion } catch { } finally { } }
//确定分盘操作结果 private void simpleButton2_Click(object sender, EventArgs e) { if (!Convert.ToUInt64(textBox7.Text).Equals(0)) { MessageBox.Show("存在未入库的产品", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (dataGridView1.RowCount.Equals(0)) { MessageBox.Show("请添加每盘入库明细", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } #region 审核入库单 SqlParameter[] para = { new SqlParameter("@BDBH", SqlDbType.Text), new SqlParameter("@SHR", SqlDbType.Text), }; ERPInquire3.HelpClass.iniFileHelper ini = new ERPInquire3.HelpClass.iniFileHelper(Application.StartupPath + "/data/Config.ini"); para[0].Value = BDBH; para[1].Value = ini.ReadString("Login", "Code", ""); SqlHelper.ExecStoredProcedureDataTable("WMS_RKBJ", para); #endregion #region 将数据录入系统中 Model.CP C1 = new Model.CP(); for (int i = 0; i < dataGridView1.RowCount; i++) { C1.Id = Guid.NewGuid().ToString(); //ID C1.Cptype = "0"; //类型 C1.Cpbh = CPBH; //产品编号 C1.Cpmc = CPMC; //产品名称 C1.Bdbh = BDBH; //入库单号 C1.Cw = dataGridView1.Rows[i].Cells[0].Value.ToString(); //仓位名称 C1.Sl1 = Convert.ToUInt32(RKSL); //入库数量 C1.Sl2 = Convert.ToUInt32(dataGridView1.Rows[i].Cells[1].Value.ToString()); //每盘入库数量 C1.Sl3 = Convert.ToUInt32(dataGridView1.Rows[i].Cells[1].Value.ToString()); //每盘出库余量 C1.Ddsl = Convert.ToInt64(DDSL); //订单数量 C1.Zdrq = Convert.ToDateTime(ZDRQ); //制单日期 C1.Rq = DateTime.Now; //入库时间 C1.Dw = DWMC; //单位 C1.Remark = richTextBox1.Text; //备注 C1.TYDH = GetGDH(BDBH); SQL.SqlExecute.CPInsert(C1); #region dtpublic创建时间 DataRow drrow = dtpublic.NewRow(); //创建新行 drrow["入库单号"] = BDBH; drrow["产品编号"] = CPBH; drrow["产品名称"] = CPMC; drrow["仓位名称"] = dataGridView1.Rows[i].Cells[0].Value.ToString(); drrow["每盘入库数量"] = dataGridView1.Rows[i].Cells[1].Value.ToString(); drrow["单位"] = DWMC; drrow["入库时间"] = DateTime.Now; dtpublic.Rows.Add(drrow); //将新行加入到表中 #endregion } #endregion #region 返回页面刷新页面 DialogResult = DialogResult.OK; #endregion }