Example #1
0
        public IActionResult VoteSite(int id)
        {
            NomineeMethod nm = new NomineeMethod();
            NomineeDetail nd = nm.GetNomineeById(id, out string errormsg);

            ViewBag.Name   = nd.Nominee_FirstName + nd.Nominee_LastName;
            tempID         = nd.Nominee_Id;
            ViewBag.image  = nd.Nominee_ImgLink;
            ViewBag.voteId = tempID;
            HttpContext.Session.SetInt32("extraInfo", tempID);

            return(View());
        }
Example #2
0
 public IActionResult EditNominee(int id)
 {
     if (HttpContext.Session.GetString("AdminID") != null)
     {
         NomineeMethod nm = new NomineeMethod();
         NomineeDetail nd = new NomineeDetail();
         nd = nm.GetNomineeById(id, out string errormsg);
         return(View(nd));
     }
     else
     {
         return(RedirectToAction("AdminLogin"));
     }
 }
Example #3
0
 public IActionResult Motivations(int id)
 {
     if (HttpContext.Session.GetString("AdminID") != null)
     {
         NomineeMethod     nm       = new NomineeMethod();
         NomineeDetail     nd       = nm.GetNomineeById(id, out string errormsg);
         List <VoteDetail> voteList = new List <VoteDetail>();
         VoteMethod        vm       = new VoteMethod();
         voteList     = vm.GetMotivationListById(id, out string msg);
         ViewBag.Name = nd.Nominee_FirstName + " " + nd.Nominee_LastName;
         return(View(voteList));
     }
     else
     {
         return(RedirectToAction("AdminLogin"));
     }
 }