public ActionResult Update(MingChengDuiZhai entity) { if (ModelState.IsValid) { entity.LastModifiedBy = GetCurrentUserName(); entity.LastModifiedDate = DateTime.Now; _service.UpdateMingChengDuiZhai(entity); _service.Save(); var window = this.GetCmp <Window>("windowMingChengDuiZhai"); window.Hide(); this.GetCmp <Store>("storeMingChengDuiZhai").Reload(); return(this.Direct()); } return(this.Direct()); }
public ActionResult Insert(MingChengDuiZhai entity) { if (ModelState.IsValid) { entity.CreatedBy = GetCurrentUserName(); entity.CreatedDate = DateTime.Now; entity.OrgNamePath = GetOrganizationNamePath(); entity.AreaPath = GetOrganizationAreaPath(); _service.AddMingChengDuiZhai(entity); _service.Save(); this.GetCmp <Window>("windowMingChengDuiZhai").Hide(); this.GetCmp <Store>("storeMingChengDuiZhai").Reload(); return(this.Direct()); } return(this.Direct()); }