public void UpdateEstate(int id, String estateType, Address address, String legalForm, Image imgEstate) { Estate estate = GetEstate(id); estate.GetAddress().SetCountry((Countries)Enum.Parse(typeof(Countries), address.GetCountry().ToString())); estate.GetAddress().SetCity(address.GetCity()); estate.GetAddress().SetStreet(address.GetStreet()); estate.GetAddress().SetZipCode(address.GetZipCode()); estate.SetLegal((Legal)Enum.Parse(typeof(Legal), legalForm)); estate.SetImage(imgEstate); estates.ChangeAt(estate, GetPosition(id)); ui.CreateMode(true); ui.AddToTable(estate); }