예제 #1
0
 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
         }));
     }
 }
예제 #2
0
        // 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));
            }
        }