public void EditSetting(EditDeliverySettingViewModel viewModel) { var record = _deliverySettingsRepository.Get(f => f.Id == viewModel.Id); record.State = viewModel.State; // todo: (auth:juiceek) drop this //setting.DeliveryCost = newSetting.DeliveryCost; record.Country = _countryRepository.Get(viewModel.CountryId); record.PostageCost = viewModel.PostageCost; record.CodCost = viewModel.CodCost; _deliverySettingsRepository.Update(record); }
public ActionResult AddSetting(int countryId) { var viewModel = new EditDeliverySettingViewModel() { CountryId = countryId }; return View(viewModel); }
public ActionResult EditSetting(EditDeliverySettingViewModel viewModel) { _deliverySettingService.EditSetting(viewModel); _orchardServices.Notifier.Information(T("Record has been changed!")); return RedirectToAction("Index", new { countryId = viewModel.CountryId }); }
public ActionResult EditSetting(int id, int countryId) { var setting = _deliverySettingService.GetSettingById(id); var model = new EditDeliverySettingViewModel() { Id = setting.Id, State = setting.State, //DeliveryCost = setting.DeliveryCost, CountryId = countryId, PostageCost = setting.PostageCost, CodCost = setting.CodCost }; return View(model); }
public ActionResult AddSetting(EditDeliverySettingViewModel viewModel) { _deliverySettingService. AddSetting(viewModel.State, viewModel.PostageCost, viewModel.CodCost, viewModel.CountryId, //todo : (auth:juiceek) drop this param cultureUsed); return RedirectToAction("Index", new { countryId = viewModel.CountryId}); }