예제 #1
0
 public ActionResult Index(RawItemMasterViewModel RIMViewModel, string value)
 {   // Search
     RIMViewModel                   = RawItemMasterManager.SearchSingleRawItem(value);
     RIMViewModel.HasSearched       = true;
     RIMViewModel.RawItemMasterList = RawItemMasterManager.GetRawItems("ALL");
     return(View(RIMViewModel));
 }
예제 #2
0
        /*
         * Default method.
         * TempData is used to store the ViewModel after a Search action.
         */
        public ActionResult Index(string id)
        {
            // Validate log in and user access
            UserAccessSession UASession = (UserAccessSession)Session["UserAccess"];

            if (UASession == null || !UASession.RIM)
            {
                return(RedirectToAction("Login", "Account"));
            }
            // Set NavBar Links accordingly
            Session["CurrentPage"] = new CurrentPageSession("RIM", "HOME", "LOG");

            // SearchItemSelected is assigned value at DisplaySearchResult
            RawItemMasterViewModel RIMViewModel = new RawItemMasterViewModel();

            if (id != null)
            {
                RIMViewModel = RawItemMasterManager.SearchSingleRawItem(id);
            }
            RIMViewModel.RawItemMasterList = RawItemMasterManager.GetRawItems("ALL");
            return(View(RIMViewModel));
        }