public ActionResult AddAdresInZakaz(int id)
        {
            CreateAdresForZakaz model = new CreateAdresForZakaz();
            model.NumberOfZakaz = id;
            model.NumberOfDog = dataManager.ZakazyRepository.GetZakazById(id).Номер_договора;

            model.SpisokAdresov = from adrzak in dataManager.AdresRepository.GetAdreses().OrderBy(x => x.Адрес)
                select new SelectListItem {Text = adrzak.Адрес, Value = adrzak.Код_адреса.ToString()};
            return View(model);
        }
 public ActionResult AddAdresInZakaz(CreateAdresForZakaz model)
 {
     if (ModelState.IsValid)
     {
         dataManager.ZakazyAdresyRepository.CreateAdrZakaz(model.NumberOfZakaz, model.AdresId, model.AdresDateEnd);
         return RedirectToAction("ZakazOfDogovor", "Zakaz", new { id = dataManager.ZakazyRepository.GetZakazById(model.NumberOfZakaz).Номер_договора });
     }
     model.SpisokAdresov = from adrzak in dataManager.AdresRepository.GetAdreses().OrderBy(x => x.Адрес)
                           select new SelectListItem { Text = adrzak.Адрес, Value = adrzak.Код_адреса.ToString() };
     return View(model);
 }
 // action for change cost adres, return partial view (jqery)
 public ActionResult CostResultAdres(int id)
 {
     CreateAdresForZakaz model = new CreateAdresForZakaz();
     model.AdresCost = (int) dataManager.AdresRepository.GetAdresesById(id).Цена_на_месяц;
      return PartialView(model);
 }