/// <summary> /// 停用评级标准 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_CancleStd_Click(object sender, EventArgs e) { try { DialogResult dialogResult = MessageBox.Show("是否停用?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (dialogResult == DialogResult.OK)//如果点击“确定”按钮 { DataRow dr = gv_RuleStd.GetDataRow(gv_RuleStd.FocusedRowHandle); if (dr != null) { if (bllCommon.DataDisabled("TQB_GRADE_RULE_STD", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow())) { Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "停用需要评级的钢种和执行标准");//添加操作日志 MessageBox.Show("已成功停用!"); BindStd(); } } } else//如果点击“取消”按钮 { return; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 停用 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Stop_Click(object sender, EventArgs e) { try { DialogResult dialogResult = MessageBox.Show("是否停用?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (dialogResult == DialogResult.OK)//如果点击“确定”按钮 { Bll_Common bll_common = new Bll_Common(); DataRow dr = gv_Main.GetDataRow(gv_Main.FocusedRowHandle); if (dr != null) { if (bll_common.DataDisabled("TQB_STL_GRD_TYPE", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow())) { Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "停用钢种品种");//添加操作日志 MessageBox.Show("已停用!"); NewMethod(); } } } else//如果点击“取消”按钮 { return; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 删除 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Cancle_Click(object sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show("是否删除?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (dialogResult == DialogResult.OK)//如果点击“确定”按钮 { try { Bll_Common bllCommon = new Bll_Common(); DataRow dr = gv_SlabMatch.GetDataRow(gv_SlabMatch.FocusedRowHandle); if (dr == null) { return; } if (bllCommon.DataDisabled("Tqb_Slab_Len_Match", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow())) { gv_StdMain_FocusedRowChanged(null, null); MessageBox.Show("已删除!"); Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "取消钢坯定尺匹配关系");//添加操作日志 } } catch (Exception ex) { MessageBox.Show(ex.Message); } } else//如果点击“取消”按钮 { return; } }
/// <summary> /// 取消申请 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_QXSQ_Click(object sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show("是否取消?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (dialogResult == DialogResult.OK)//如果点击“确定”按钮 { try { Bll_Common bllCommon = new Bll_Common(); DataRow dr = gv_XL.GetDataRow(gv_XL.FocusedRowHandle); if (dr != null) { if (bllCommon.DataDisabled("TQC_UPD_MATERIAL_MAIN", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow())) { Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "取消修料申请信息");//添加操作日志 Query(); Query1(); MessageBox.Show("已取消申请!"); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } } else//如果点击“取消”按钮 { return; } }
/// <summary> /// 停用 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Stop_CF_Click(object sender, EventArgs e) { try { DialogResult dialogResult = MessageBox.Show("是否停用?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (dialogResult == DialogResult.OK)//如果点击“确定”按钮 { Bll_Common bll_common = new Bll_Common(); DataRow dr = gv_StdCF.GetDataRow(gv_StdCF.FocusedRowHandle); if (dr != null) { if (bll_common.DataDisabled("TQB_DESIGN_ITEM", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow())) { MessageBox.Show("已停用!"); NewMethod_CF(); GetDesignLog_Add(); } } } else//如果点击“取消”按钮 { return; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 停用 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Cancle_Click(object sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show("是否停用?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (dialogResult == DialogResult.OK)//如果点击“确定”按钮 { try { Bll_Common bllCommon = new Bll_Common(); DataRow dr = gv_Route.GetDataRow(gv_Route.FocusedRowHandle); if (dr != null) { if (bllCommon.DataDisabled("tqb_route", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow())) { Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "停用工艺路线信息");//添加操作日志 BindList(); MessageBox.Show("已成功停用!"); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } } else//如果点击“取消”按钮 { return; } }
/// <summary> /// 删除 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Del_Click(object sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show("是否删除?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (dialogResult == DialogResult.OK)//如果点击“确定”按钮 { try { Bll_Common bllCommon = new Bll_Common(); DataRow dr = gv_DZGZ.GetDataRow(gv_DZGZ.FocusedRowHandle); if (dr == null) { return; } if (bllCommon.DataDisabled("TQB_REPLACE_SLAB", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow())) { GetQuery_PPB(); MessageBox.Show("已删除!"); Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "取消待轧钢坯匹配关系");//添加操作日志 } } catch (Exception ex) { MessageBox.Show(ex.Message); } } else//如果点击“取消”按钮 { return; } }
/// <summary> /// 停用 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Stop_Click(object sender, EventArgs e) { try { DialogResult dialogResult = MessageBox.Show("是否停用?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (dialogResult == DialogResult.OK)//如果点击“确定”按钮 { DataRow dr = gv_Gp.GetDataRow(gv_Gp.FocusedRowHandle); if (dr != null) { Bll_Common bllCommon = new Bll_Common(); if (bllCommon.DataDisabled("TQB_GP_LCP_BASIS", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow())) { Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "停用联产品信息");//添加操作日志 MessageBox.Show("已成功停用!"); BindGp(str_Plan_Code); } } } else//如果点击“取消”按钮 { return; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 停用 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Stop_Click(object sender, EventArgs e) { try { int[] rownumber = gv_ZCJC.GetSelectedRows();//获取选中行号数组; if (rownumber.Length == 0) { return; } DialogResult dialogResult = MessageBox.Show("是否停用?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (dialogResult == DialogResult.OK)//如果点击“确定”按钮 { for (int i = 0; i < rownumber.Length; i++) { int selectedHandle = rownumber[i]; string strID = gv_ZCJC.GetRowCellValue(selectedHandle, "C_ID").ToString(); Bll_Common bll_common = new Bll_Common(); if (bll_common.DataDisabled("TQB_TRUCK", strID, RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow())) { Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "停用装车检查信息");//添加操作日志 } } MessageBox.Show("已停用!"); btn_Query_Click(null, null); } else//如果点击“取消”按钮 { return; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 质量设计变更 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Edit_Click(object sender, EventArgs e) { try { DataRow dr_Old = gv_DesignOrder.GetDataRow(gv_DesignOrder.FocusedRowHandle); if (dr_Old == null) { MessageBox.Show("请选中需要变更质量设计的数据!"); return; } DataRow dr_New = gv_DesignStdcodeGrd.GetDataRow(gv_DesignStdcodeGrd.FocusedRowHandle); if (dr_New == null) { MessageBox.Show("请选中新的质量设计信息!"); return; } Mod_TQB_DESIGN_ORDER model = new Mod_TQB_DESIGN_ORDER(); model.C_ORDER_ID = dr_Old["订单号"].ToString(); model.C_DESIGN_ID = dr_New["C_ID"].ToString(); model.C_DELIVERY_STATE = dr_Old["C_DELIVERY_STATE"].ToString(); model.C_EMP_ID = RV.UI.UserInfo.userID; model.C_EMP_ID_BG = RV.UI.UserInfo.userID; model.D_MOD_DT_BG = RV.UI.ServerTime.timeNow(); model.N_STATUS = 2; if (bllDesignOrder.Add(model)) { Bll_Common bllCommon = new Bll_Common(); if (bllCommon.DataDisabled("TQB_DESIGN_ORDER", dr_Old["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow())) { MessageBox.Show("质量设计变更成功!"); BindDesignByOrder(); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 停用 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Del_Click(object sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show("是否停用?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (dialogResult == DialogResult.OK)//如果点击“确定”按钮 { try { Bll_Common bllCommon = new Bll_Common(); DataRow dr_StdMain = gv_SQLB.GetDataRow(gv_SQLB.FocusedRowHandle); int[] rownumber = gv_SQLB.GetSelectedRows();//获取选中行号数组; if (rownumber.Length == 0) { MessageBox.Show("请选择需要添加的信息!"); return; } for (int si = 0; si < rownumber.Length; si++) { DataRow dr = gv_SQLB.GetDataRow(rownumber[si]); bllCommon.DataDisabled("TQC_RECHECK", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow()); Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "停用复检信息");//添加操作日志 } Query_SQ(); MessageBox.Show("已删除!"); } catch (Exception ex) { MessageBox.Show(ex.Message); } } else//如果点击“取消”按钮 { return; } }