public ActionResult Create() { ViewBag.EventCode = new SelectList(EventRepo.Get(), "id", "Code"); ViewBag.DesignCode = new SelectList(DesignRequestRepo.Get(), "id", "Code"); PromotionViewModel model = new PromotionViewModel(); return(PartialView("_Create", model)); }
public ActionResult List() { UserViewModel access = DesignApproveRepo.GetIdByName(User.Identity.Name); if (access.Role == "Requester" || access.Role == "Admin" || access.Role == "Staff") { return(PartialView("_List", DesignRequestRepo.Get())); } else { return(new RedirectToRouteResult(new RouteValueDictionary(new { controller = "AccessDenied", action = "Index" }))); } }
public ActionResult Create2(int designid, int eventid) { ViewBag.EventCode = new SelectList(EventRepo.Get(), "id", "Code"); ViewBag.DesignCode = new SelectList(DesignRequestRepo.Get(), "id", "Code"); UserViewModel model2 = PromotionRepo.GetIdByName(User.Identity.Name); PromotionViewModel model = new PromotionViewModel(); model.RequestBy = model2.Fullname; model.T_Design_Id = designid; model.T_Event_Id = eventid; return(PartialView("_Create2", model)); }
// GET: DesignRequest public ActionResult Index() { ViewBag.Assign = new SelectList(DesignRequestRepo.Get(), "Assign_To", "Assign_To"); return(View()); }