public IActionResult AddPersonAddress(int id) { var person = _persons.GetById(id); var model = new AddPersonAddressModel { IdPersoana = id, Strada = "", Bloc = "", Localitate = "", Judet = "", DataInceput = DateTime.Now, DataSfarsit = DateTime.Now.AddYears(1), Persoana = person }; return(View(model)); }
public IActionResult EditPersonAddress(int id) { var personAddress = _personAddress.GetById(id); var model = new AddPersonAddressModel { PersonAddressId = personAddress.Id, Strada = personAddress.Strada, Numar = personAddress.Numar, Bloc = personAddress.Bloc, Etaj = personAddress.Etaj, Apartament = personAddress.Apartament, Localitate = personAddress.Localitate, Judet = personAddress.Judet, DataInceput = personAddress.DataInceput, DataSfarsit = personAddress.DataSfarsit, Persoana = personAddress.Persoana }; return(View("EditPersonAddress", model)); }