/// <summary> /// 修改模板 /// </summary> public void UpdateMould() { if (_view.CurrentMould.PresMouldHeadId == -1) { return; } FrmEditMould form = new FrmEditMould(); form.OperateType = HIS.MZDoc_BLL.Public.CurrentStatus.修改状态; form.MouldName = _view.CurrentMould.Mould_Name; form.ShowDialog(); if (form.IsSure) { _view.CurrentMould.Mould_Name = form.MouldName; _view.CurrentMould.Update(); _view.SelectNodeTag = _view.CurrentMould.PresMouldHeadId; LoadMouldList(); } }
/// <summary> /// 新增模板 /// </summary> public void AddMould() { if (_view.CurrentMould.Mould_Type != 0) { throw new Exception("模板下面不能再添加任何节点!"); } FrmEditMould form = new FrmEditMould(); form.OperateType = HIS.MZDoc_BLL.Public.CurrentStatus.新建状态; form.ShowDialog(); if (form.IsSure) { HIS.MZDoc_BLL.PresMouldHead mould = new HIS.MZDoc_BLL.PresMouldHead(); mould.P_Id = _view.CurrentMould.PresMouldHeadId; mould.Mould_Level = _view.MouldLevel; mould.Mould_Name = form.MouldName; mould.Mould_Type = form.MouldType; mould.Create_Dept = (int)_view.currentDept.DeptID; mould.Create_Doc = (int)_view.currentUser.EmployeeID; mould.Create_Date = XcDate.ServerDateTime; _view.SelectNodeTag = mould.Add(); LoadMouldList(); } }