Пример #1
0
        /*==============================================================================
        * ActionResult Index()
        * Index
        *
        * Default action, populates list of groups available to the user
        * ==============================================================================*/
        public ActionResult Index()
        {
            //Pulls data from userProfiles database and creates a list of groups
            Entities db = new Entities();
            UserProfile user = db.UserProfiles.Single(u => u.UserId == WebSecurity.CurrentUserId);
            ScanIndexModel model = new ScanIndexModel()
            {
                GroupList = user.GroupsIn
            };

            return View(model);
        }
Пример #2
0
 public ActionResult Index(ScanIndexModel model)
 {
     //Redirecting actions to sepcific pages
     if (ModelState.IsValid)
     {
         if (model.Action == "Upload")
             return RedirectToAction("Upload", new { groupId = model.selectedGroupId });
         if (model.Action == "Delete")
             return RedirectToAction("Delete", new { groupId = model.selectedGroupId });
         if (model.Action == "View")
             return RedirectToAction("View", new { groupId = model.selectedGroupId });
     }
     return RedirectToAction("Index");
 }