public CountryRowModel(Country country) { Id = country.Id; Name = country.Name; ThreeLetterIsoCode = country.ThreeLetterIsoCode; TwoLetterIsoCode = country.TwoLetterIsoCode; NumericIsoCode = country.NumericIsoCode; }
public void UpdateTo(Country country) { country.Id = Id; country.Name = Name.Trim(); country.ThreeLetterIsoCode = ThreeLetterIsoCode; country.TwoLetterIsoCode = TwoLetterIsoCode; country.NumericIsoCode = NumericIsoCode; }
public ActionResult Save(CountryEditorModel model, string @return) { var country = new Country(); model.UpdateTo(country); if (country.Id > 0) { _countryService.Update(country); } else { _countryService.Create(country); } return AjaxForm().RedirectTo(@return); }
public void Update(Country country) { _countryRepository.Update(country); }
public void Delete(Country country) { _countryRepository.Delete(country); }
public void Create(Country country) { _countryRepository.Insert(country); }