Example #1
0
        public ActionResult EligibleMembersList()
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            return(View());
        }
Example #2
0
        public ActionResult PositionList()
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            return(View());
        }
        public ActionResult Homepage()
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            if (Session["Username"]?.ToString() == null || Session["Password"]?.ToString() == null)
            {
                TempData["MessageType"] = "danger";
                TempData["Message"]     = "Please input your username and password!!";
                return(Redirect("Login"));
            }
            else
            {
                foreach (var person in db.EligibleMembers)
                {
                    if (Session["Username"].ToString().ToLower() == person.email.ToLower() && Session["Password"].ToString() == person.password)
                    {
                        ViewBag.memberId = person.Id;
                        return(View());
                    }
                }
                TempData["MessageType"] = "danger";
                TempData["Message"]     = "Invalid username and password combination!!";
                return(Redirect("Login"));
            }

            //return View();
        }
Example #4
0
        public ActionResult EditPosition(int Id)
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            return(View());
        }
Example #5
0
        //(2) This page is with the intent of viewing each voting summary
        public ActionResult Dashboard()
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            return(View());
        }
Example #6
0
        public ActionResult SendMail()
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            return(View());
        }
Example #7
0
        public void Configuration(IAppBuilder app)
        {
            ConfigureAuth(app);
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
        }
Example #8
0
        //(14) A form that takes the details of all the information needed for a vote
        public ActionResult CreateVotingSession()
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            return(View());
        }
Example #9
0
        public ActionResult VoteLog()
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            return(View());
        }
Example #10
0
        public ActionResult AllMembersGallery()
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            return(View());
        }
Example #11
0
        //(13) This page would enable us view the profile of each of the contestants
        public ActionResult ContestantsGallery()
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            return(View());
        }
Example #12
0
        //(4a) This page is used to get eligible members registered
        public ActionResult RegisterMember()
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            return(View());
        }
Example #13
0
        //(6a) To register contestants
        public ActionResult RegisterContestant()
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            return(View());
        }
Example #14
0
        //(13) This page would enable us view the profile of each of the contestants
        public ActionResult Profile4Contestants(int Id)
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            ViewBag.Id = Id;
            return(View());
        }
Example #15
0
        public ActionResult profile4Positions(int Id)
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            ViewBag.Id = Id;
            return(View());
        }
Example #16
0
        //(12) This page would enable us view the profile of each of the ICAN Committee members
        public ActionResult Profile4CommitteeMembers(int Id)
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            ViewBag.Id = Id;
            return(View());
        }
        public ActionResult Login()
        {
            var          model       = new SignIn();
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            return(View(model));
        }
Example #18
0
        public ActionResult EditContestants(int Id)
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            var model = db.Contestants.Where(dbl => dbl.Id == Id).First();

            return(View(model));
        }
Example #19
0
        public ActionResult EditCommitteeMember(int Id)
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            var model = db.Committee_member.Where(dbl => dbl.Id == Id).First();

            return(View(model));
        }
Example #20
0
        public ActionResult EditEligibleMember(int Id)
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            var model = db.EligibleMembers.Where(dbl => dbl.Id == Id).First();

            return(View(model));
        }
Example #21
0
        public ActionResult EditPostion(int Id)
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            var model = db.Positions.Where(dbl => dbl.Id == Id).First();

            return(View(model));
        }
        public ActionResult Logout()
        {
            Session["Username"] = "";
            Session["Password"] = "";
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            TempData["MessageType"] = "success";
            TempData["Message"]     = "You have successfully logged out!!";
            return(RedirectToAction("Login"));
        }
Example #23
0
        public ActionResult Report(int Id)
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            ViewBag.Id = Id;
            foreach (var item in db.VotingSessions)
            {
                if (item.Id == Id)
                {
                    return(View());
                }
            }
            return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
        }
        public ActionResult IndexTest()
        {
            EvoteMethods EvoteMethod = new EvoteMethods();

            EvoteMethod.check();
            if (Session["Username"]?.ToString() == null || Session["Password"]?.ToString() == null)
            {
                TempData["MessageType"] = "danger";
                TempData["Message"]     = "Please input your username and password!!";
                return(Redirect("Login"));
            }
            var usr = Session["Username"];
            var pw  = Session["Password"];

            return(View());
        }