private void btn_Add_Click(object sender, EventArgs e) { try { FrmQB_SELECT_WL frm = new FrmQB_SELECT_WL(); if (frm.ShowDialog() == DialogResult.OK) { string str_Mat_Code = frm.mat_code; frm.Close(); bool IsExists = bllTqbGpLcpBasis.Exists(str_Mat_Code); if (IsExists) { MessageBox.Show("该物料已存在!"); } else { Mod_TQB_GP_LCP_BASIS model = new Mod_TQB_GP_LCP_BASIS(); model.C_MAT_CODE_PLAN = str_Mat_Code; model.C_EMP_ID = RV.UI.UserInfo.userID; if (bllTqbGpLcpBasis.Add(model)) { MessageBox.Show("添加成功!"); BindPlanInfo(); } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 添加 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Add_Click(object sender, EventArgs e) { try { FrmQB_SELECT_WL frm = new FrmQB_SELECT_WL(); if (frm.ShowDialog() == DialogResult.OK) { frm.Close(); bool result = AddLcp(frm.mat_code); if (result) { MessageBox.Show("添加成功!"); BindGp(str_Plan_Code); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }