Ejemplo n.º 1
0
        // GET: Admin/StandardReference/Details/5
        public ActionResult Details(int id = 0)
        {
            if (!IsUserAuthenticated())
            {
                return(RedirectToLogin());
            }

            string message = string.Empty;

            using (var standardReferenceManager = new StandardReferenceManager())
            {
                StandardReference standardReference = standardReferenceManager.GetStandardReferenceByID(id, out message);
                if (standardReference == null)
                {
                    SetViewBagError(message);
                    return(RedirectToAction("Index"));
                }
                return(View(standardReference));
            }
        }
Ejemplo n.º 2
0
        // GET: Admin/StandardReference/CreateReferenceRange
        public ActionResult CreateReferenceRange(int standardReferenceID = 0)
        {
            if (!IsUserAuthenticated())
            {
                return(RedirectToLogin());
            }

            string message = string.Empty;

            using (var standardReferenceManager = new StandardReferenceManager())
            {
                StandardReference standardReference = standardReferenceManager.GetStandardReferenceByID(standardReferenceID, out message);
                if (standardReference == null)
                {
                    SetViewBagError("Invalid Standard Reference ID. Create Standard Reference first.");
                    return(View());
                }
                ReferenceRange referenceRange = new ReferenceRange();
                referenceRange.StandardReferenceID = standardReferenceID;

                return(View(referenceRange));
            }
        }