//自定义绑定数据 private void requistionDate() { this.dataGridViewSCPC.AutoGenerateColumns = false;// 关闭自动创建列 HY_BLL.HY_ProductionPlanningBLL hyprobll = new HY_ProductionPlanningBLL(); string sql = "select * from HY_ProductionPlanning order by p_ID desc"; this.dataGridViewSCPC.DataSource = hyprobll.ExecuteQuery(sql); }
private void toolStripSave_Click(object sender, EventArgs e) { if (this.toolStripAdd.Enabled == false) { HY_Model.HY_ProductionPlanning hypromodel = new HY_Model.HY_ProductionPlanning(); hypromodel.P_DID = this.p_DID.Text.Trim(); hypromodel.P_KID = this.p_KID.Text.Trim(); hypromodel.P_CID = this.p_CID.Text.Trim(); hypromodel.P_Engineering = this.textBoxX2.Text.Trim(); hypromodel.P_Design = this.p_Design.Text.Trim(); HY_BLL.HY_ProductionPlanningBLL hyprobll = new HY_ProductionPlanningBLL(); string sql = "insert into HY_ProductionPlanning(p_DID,p_KID,p_CID,p_Engineering,p_Design) values('" + hypromodel.P_DID + "','" + hypromodel.P_KID + "','" + hypromodel.P_CID + "','" + hypromodel.P_Engineering + "','" + hypromodel.P_Design + "')"; int res = hyprobll.com_HY_ProductionPlanninglist(sql); if (res > 0) { MessageBox.Show("生产排程计划添加成功!"); requistionDate();//自定义绑定数据库 } } }
private void p_DID1_TextChanged(object sender, EventArgs e) { string sql = "select p_DID,p_KID from HY_ProductionPlanning where p_DID='" + this.p_DID1.Text + "'"; HY_BLL.HY_ProductionPlanningBLL hyprod = new HY_ProductionPlanningBLL(); SqlDataReader sdr = hyprod.f_ProductionPlanningslist(sql); while (sdr.Read()) { this.p_KID1.Text = sdr[1].ToString(); this.p_KID2.Text = sdr[1].ToString(); this.p_KID3.Text = sdr[1].ToString(); this.p_KID4.Text = sdr[1].ToString(); this.p_KID5.Text = sdr[1].ToString(); this.p_KID6.Text = sdr[1].ToString(); this.p_KID7.Text = sdr[1].ToString(); this.p_KID8.Text = sdr[1].ToString(); this.p_KID9.Text = sdr[1].ToString(); this.p_KID10.Text = sdr[1].ToString(); this.p_KID11.Text = sdr[1].ToString(); this.p_KID12.Text = sdr[1].ToString(); this.p_KID13.Text = sdr[1].ToString(); this.p_KID14.Text = sdr[1].ToString(); this.p_KID15.Text = sdr[1].ToString(); this.btnYY.Enabled = true; this.btnSJ.Enabled = true; this.btnST.Enabled = true; this.btnCG.Enabled = true; this.btnJJG.Enabled = true; this.btnHOT.Enabled = true; this.btnCNC.Enabled = true; this.btnM.Enabled = true; this.btnXG.Enabled = true; this.btnZL.Enabled = true; this.btnSZ.Enabled = true; this.btnXJ.Enabled = true; this.btnOK.Enabled = true; this.btnYJ.Enabled = true; this.p_YKDate.Enabled = true; this.p_YWDate.Enabled = true; this.p_SKDate.Enabled = true; this.p_SWDate.Enabled = true; this.p_STKDate.Enabled = true; this.p_STWDate.Enabled = true; this.p_CLKDate.Enabled = true; this.p_CLWDate.Enabled = true; this.p_CNCKDate.Enabled = true; this.p_CNCWDate.Enabled = true; this.p_JJKDate.Enabled = true; this.p_YWDate.Enabled = true; this.p_HKDate.Enabled = true; this.p_HWDate.Enabled = true; this.p_MKDate.Enabled = true; this.p_MWDate.Enabled = true; this.p_XKDate.Enabled = true; this.p_XWDate.Enabled = true; this.p_ZLKDate.Enabled = true; this.p_ZLWDate.Enabled = true; this.p_SZKDate.Enabled = true; this.p_SZWDate.Enabled = true; this.p_XJWDate.Enabled = true; this.p_OKWDate.Enabled = true; this.p_YDWDate.Enabled = true; } }
public HY_ProductionPlanning() { InitializeComponent(); hypromodel = new HY_Model.HY_ProductionPlanning(); hyprod = new HY_ProductionPlanningBLL(); }
public HY_MaterialID() { InitializeComponent(); hypro = new HY_BLL.HY_ProductionPlanningBLL(); }
public HY_WarehouseLog() { InitializeComponent(); hypro = new HY_BLL.HY_ProductionPlanningBLL(); }