public ResponseModel Delete(Service service) { return _serviceRepository.Delete(service); }
/// <summary> /// Save Service manage model /// </summary> /// <param name="model"></param> /// <returns></returns> public ResponseModel SaveServiceManageModel(ServiceManageModel model) { ResponseModel response; var service = GetById(model.Id); #region Edit Service if (service != null) { service.Title = model.Title; service.Status = model.Status; service.Description = model.Description; service.Content = model.Content; service.ImageUrl = model.ImageUrl; //Get page record order response = Update(service); return response.SetMessage(response.Success ? _localizedResourceServices.T("AdminModule:::Services:::Messages:::UpdateSuccessfully:::Update service successfully.") : _localizedResourceServices.T("AdminModule:::Services:::Messages:::UpdateFailure:::Update service failed. Please try again later.")); } #endregion service = new Service { Title = model.Title, Status = model.Status, Description = model.Description, Content = model.Content, ImageUrl = model.ImageUrl }; response = Insert(service); return response.SetMessage(response.Success ? _localizedResourceServices.T("AdminModule:::Services:::Messages:::CreateSuccessfully:::Create service successfully.") : _localizedResourceServices.T("AdminModule:::Services:::Messages:::CreateFailure:::Create service failed. Please try again later.")); }
public ResponseModel Update(Service service) { return _serviceRepository.Update(service); }
public ResponseModel Insert(Service service) { return _serviceRepository.Insert(service); }