public void Add(AddDutyInput input) { input.Validate(); Sys_Duty entity = this.CreateEntity <Sys_Duty>(); entity.Name = input.Name; entity.DepartmentId = input.DepartmentId; entity.SortCode = input.SortCode; this.DbContext.Insert(entity); }
public ActionResult Add(AddDutyInput input) { this.CreateService <IDutyAppService>().Add(input); return(this.AddSuccessMsg()); }
public ActionResult Add(AddDutyInput input) { input.CreateUserId = this.CurrentSession.UserId; this.CreateService <IEntityAppService>().AddFromDto <Sys_Duty, AddDutyInput>(input); return(this.AddSuccessMsg()); }