public ActionResult Update(BanGongJiZhunJia entity) { if (ModelState.IsValid) { entity.LastModifiedBy = GetCurrentUserName(); entity.LastModifiedDate = DateTime.Now; _banGongService.UpdateBanGongJiZhunJia(entity); _banGongService.Save(); var window = this.GetCmp <Window>("windowBanGongJiZhunJia"); window.Hide(); this.GetCmp <Store>("storeBanGongJiZhunJia").Reload(); return(this.Direct()); } return(this.Direct()); }
public ActionResult Insert(BanGongJiZhunJia entity) { if (ModelState.IsValid) { entity.OrgNamePath = GetOrganizationNamePath(); entity.AreaPath = GetOrganizationAreaPath(); entity.CreatedBy = GetCurrentUserName(); entity.CreatedDate = DateTime.Now; _banGongService.AddBanGongJiZhunJia(entity); _banGongService.Save(); this.GetCmp <Window>("windowBanGongJiZhunJia").Hide(); this.GetCmp <Store>("storeBanGongJiZhunJia").Reload(); return(this.Direct()); } return(this.Direct()); }