Esempio n. 1
0
        // Նոր ավելացված ֆունկցիա
        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 CardiologicalCatheterizationItem();

                    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 }));
            }
        }
Esempio n. 2
0
        public ActionResult Create()
        {
            ViewBag.activeInv = "active";
            try
            {
                using (var db = new StoreContext())
                {
                    //ViewBag.Folder = Guid.NewGuid().ToString();
                    //ViewBag.FileImage = Guid.NewGuid().ToString();

                    this.OrganizeViewBugs(db);
                    var item = new CardiologicalCatheterizationItem();
                    return(View("InputForm", item));
                }
            }
            catch (Exception ex)
            {
                return(RedirectToAction("Index", "Error", new { msg = ex.Message }));
            }
        }