private void 编辑工序ToolStripMenuItem_Click(object sender, EventArgs e) { var form = new StepMgtAddEdit("编辑工序", _activeStepRow?.ListObject as Step); if (form.ShowDialog(this) == DialogResult.OK) { if (_bllStep.UpdateModel(form.TransModel)) { MsgBoxLib.ShowInformationOk("操作成功!"); //将父类加入List,表示需要从数据库中更新子类数据 //if (pProj != null) _bll.ParentsToBeUpdated.AddFirst(pProj.Code); RefreshStep(); } else { MsgBoxLib.ShowStop("操作失败"); } } }
private void 新增工序ToolStripMenuItem_Click(object sender, EventArgs e) { var pProc = SelectedProcRow?.ListObject as Process; var form = new StepMgtAddEdit("新增工序"); if (form.ShowDialog(this) == DialogResult.OK) { if (_bllStep.AddModel(form.TransModel, pProc)) { MsgBoxLib.ShowInformationOk("操作成功!"); //将父类加入List,表示需要从数据库中更新子类数据 if (pProc != null) { _bll.ParentsToBeUpdated.AddFirst(pProc.Code); } RefreshStep(); } else { MsgBoxLib.ShowStop("操作失败"); } } }