public ActionResult Insert(BanGongJiChuXinXi entity) { if (ModelState.IsValid) { if (_service.GetBanGongJiChunXinXiByWuYeBianHao(entity.WuYeBianHao) == null) { entity.KeJian = GetCheckBoxValue(entity.KeJian); entity.OrgNamePath = GetOrganizationNamePath(); entity.CreatedBy = GetCurrentUserName(); entity.CreatedDate = DateTime.Now; _service.AddBanGongJiChuXinXi(entity); _service.Save(); } else { X.Msg.Alert(MsgInfo.TI_SHI, MsgInfo.INSERT_CHECK_EXIT).Show(); return(this.Direct()); } this.GetCmp <Window>(ExtHelper.windowBanGongJiChuXinXi.ToString()).Hide(); this.GetCmp <Store>(ExtHelper.storeBanGongJiChuXinXi.ToString()).Reload(); return(this.Direct()); } return(this.Direct()); }
public ActionResult Update(BanGongJiChuXinXi entity) { if (ModelState.IsValid) { entity.LastModifiedBy = GetCurrentUserName(); entity.LastModifiedDate = DateTime.Now; _service.UpdateBanGongJiChuXinXi(entity); _service.Save(); var window = this.GetCmp <Window>("windowBanGongJiChuXinXi"); window.Hide(); this.GetCmp <Store>("storeBanGongJiChuXinXi").Reload(); return(this.Direct()); } return(this.Direct()); }
public ActionResult Insert(BanGongJiChuXinXi entity) { if (ModelState.IsValid) { entity.OrgNamePath = GetOrganizationNamePath(); entity.CreatedBy = GetCurrentUserName(); entity.CreatedDate = DateTime.Now; _service.AddBanGongJiChuXinXi(entity); _service.Save(); this.GetCmp <Window>("windowBanGongJiChuXinXi").Hide(); this.GetCmp <Store>("storeBanGongJiChuXinXi").Reload(); return(this.Direct()); } return(this.Direct()); }