public DepotDto Save(DepotDto item) { var entity = Mapper.Map <Depot>(item); if (entity.ID == 0) { entity.CreatedDate = DateTime.Now; entity.CreatedUser = SmsCache.UserContext.UserName; return(Mapper.Map <DepotDto>(DA.Insert(entity))); } entity.ModifiedDate = DateTime.Now; entity.ModifiedUser = SmsCache.UserContext.UserName; var propertyToUpdate = entity.GetPropertyNames(x => x.DepotName, x => x.Phone, x => x.Fax, x => x.Email, x => x.Address, x => x.SEQ, x => x.ModifiedDate, x => x.ModifiedUser); return(Mapper.Map <DepotDto>(DA.Update(entity, propertyToUpdate))); }
public virtual JsonResult SaveData(DepotDto data) { return(Json(JsonModel.Create(Service.Save(data)))); }
public DepotDto Save(DepotDto item) { return(Management.Save(item)); }