Example #1
0
        private void 编辑工艺ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = new ProcessMgtAddEdit("编辑工艺", _activeProcRow?.ListObject as Process);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                if (_bll.UpdateModel(form.TransModel))
                {
                    MsgBoxLib.ShowInformationOk("操作成功!");
                    //将父类加入List,表示需要从数据库中更新子类数据
                    //if (pProj != null) _bll.ParentsToBeUpdated.AddFirst(pProj.Code);
                    RefreshProc();
                }
                else
                {
                    MsgBoxLib.ShowStop("操作失败");
                }
            }
        }
Example #2
0
        private void 新增工艺ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var pProj = SelectedNode?.Tag as Project;
            var form  = new ProcessMgtAddEdit("新增工艺");

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                if (_bll.AddModel(form.TransModel, pProj))
                {
                    MsgBoxLib.ShowInformationOk("操作成功!");
                    //将父类加入List,表示需要从数据库中更新子类数据
                    if (pProj != null)
                    {
                        _bll.ParentsToBeUpdated.AddFirst(pProj.Code);
                    }
                    RefreshProc(); //TODO:待验证
                }
                else
                {
                    MsgBoxLib.ShowStop("操作失败");
                }
            }
        }