public ActionResult Insert(ZhuanYeRenShi entity) { if (ModelState.IsValid) { entity.CreatedBy = GetCurrentUserName(); entity.CreatedDate = DateTime.Now; entity.AreaPath = GetOrganizationAreaPath(); _zhuanYeRenShiService.AddZhuanYeRenShi(entity); _zhuanYeRenShiService.Save(); this.GetCmp <Window>("windowZhuanYeRenShi").Hide(); this.GetCmp <Store>("storeZhuanYeRenShi").Reload(); return(this.Direct()); } return(this.Direct()); }
public ActionResult Update(ZhuanYeRenShi entity) { if (ModelState.IsValid) { entity.LastModifiedBy = GetCurrentUserName(); entity.LastModifiedDate = DateTime.Now; _zhuanYeRenShiService.UpdateZhuanYeRenShi(entity); _zhuanYeRenShiService.Save(); var window = this.GetCmp <Window>("windowZhuanYeRenShi"); window.Hide(); this.GetCmp <Store>("storeZhuanYeRenShi").Reload(); return(this.Direct()); } return(this.Direct()); }