// Նոր ավելացված ֆունկցիա
        public ActionResult CreateWithResident(int?id)
        {
            ViewBag.activeRec = "active";
            try
            {
                using (var db = new StoreContext())
                {
                    this.OrganizeViewBugs(db);
                    Resident resident = db.Residents.Find(id);
                    var      item     = new CardiologicalDuplexScanItem();

                    item.ResidentId             = resident.ResidentId;
                    item.PatientId              = resident.PatientId;
                    item.ResidentFirstName      = resident.ResidentFirstName;
                    item.ResidentLastName       = resident.ResidentLastName;
                    item.ResidentPatronymicName = resident.ResidentPatronymicName;
                    item.BirthDate              = resident.BirthDate;

                    return(View("InputForm", item));
                }
            }
            catch (Exception ex)
            {
                return(RedirectToAction("Index", "Error", new { msg = ex.Message }));
            }
        }
 public ActionResult Create()
 {
     ViewBag.activeExm = "active";
     try
     {
         using (var db = new StoreContext())
         {
             this.OrganizeViewBugs(db);
             var item = new CardiologicalDuplexScanItem();
             return(View("InputForm", item));
         }
     }
     catch (Exception ex)
     {
         return(RedirectToAction("Index", "Error", new { msg = ex.Message }));
     }
 }