private void imbt_MO_NEW_Click(object sender, EventArgs e) { Frm_WO_Update fwu = new Frm_WO_Update(0, this); if (fwu.ShowDialog() == DialogResult.OK) { GetAllWoInfo(); FillDataGridView_MO(); rad_Waiting_online_Click(null, null); } }
private void imbt_Update_wo_Click(object sender, EventArgs e) { int Flag = 0; if ((mFrm as Frm_MO_Manage).CreateMO_Flag == 0) { Flag = 1; } if ((mFrm as Frm_MO_Manage).CreateMO_Flag == 1) { Flag = 2; } string Lock_woId = txt_woid.Text; string err = FrmBLL.publicfuntion.ChktEditing(Lock_woId, this.strFunName, UserId, UserName); if (err != "OK") { if (err.IndexOf("ERROR") != -1) { (mFrm as Frm_MO_Manage).SendMsg(Frm_MO_Manage.mLogMsgType.Error, err); return; } else { MessageBoxEx.Show(string.Format("用户:[{0}]/[{1}]--{2}正在编辑中,您现在不能进行修改!!", err.Split(':')[1].Split(',')[0], err.Split(':')[1].Split(',')[1], err.Split(':')[1].Split(',')[2]), "提示!!"); (mFrm as Frm_MO_Manage).SendMsg(Frm_MO_Manage.mLogMsgType.Error, string.Format("用户:[{0}]/[{1}]--{2}正在编辑中,您现在不能进行修改!!", err.Split(':')[1].Split(',')[0], err.Split(':')[1].Split(',')[1], err.Split(':')[1].Split(',')[2])); return; } } Frm_WO_Update fwu = new Frm_WO_Update(Flag, this); if (fwu.ShowDialog() == DialogResult.OK) { GetAllWoInfo(); FillDataGridView_MO(); } #region 释放被锁住的资源 if (refwebtEditing.Instance.DeletetEditingByfunname(Lock_woId) != "OK") { (mFrm as Frm_MO_Manage).SendMsg(Frm_MO_Manage.mLogMsgType.Error, "资源释放失败.."); } #endregion }