public static IEnumerable <SelectListItem> StandardReference() { using (var standardReferenceManager = new StandardReferenceManager()) { string message = string.Empty; var standardReferences = standardReferenceManager.GetAllStandardReferences(out message); return(standardReferences.Select(v => new SelectListItem { Value = v.StandardReferenceID.ToString(), Text = v.Title })); } }
// GET: Admin/StandardReference public ActionResult Index() { if (!IsUserAuthenticated()) { return(RedirectToLogin()); } string message = string.Empty; using (var standardReferenceManager = new StandardReferenceManager()) { var standardReferences = standardReferenceManager.GetAllStandardReferences(out message); GetErrorAneMessage(); return(View(standardReferences)); } }