Exemplo n.º 1
0
        public ActionResult EnrollmentStatus([Bind(Include = "status,faculty")] enrollmentStatu enrollmentStatus)
        {
            if (ModelState.IsValid)
            {
                var model = (from p in db.enrollmentStatus where (p.faculty == enrollmentStatus.faculty) select p).FirstOrDefault();


                model.status          = enrollmentStatus.status;
                db.Entry(model).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("EnrollmentStatus", "DeanOffice"));
            }
            return(View());
        }
Exemplo n.º 2
0
        public ActionResult Approve([Bind(Include = "studentId, dateTime, payForSemester, receiptId, amount, status")] SemesterFee semesterFee)
        {
            if (ModelState.IsValid)
            {
                var model = (from p in db.SemesterFees where (p.studentId == semesterFee.studentId) && (p.payForSemester == semesterFee.payForSemester) select p).FirstOrDefault();


                model.status          = "Approved!!!";
                db.Entry(model).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("SemInfoList"));
            }
            return(View(semesterFee));
        }
Exemplo n.º 3
0
        //   [ValidateAntiForgeryToken]
        public ActionResult HallApprove(string studentId, string payForSemester)
        {
            if (ModelState.IsValid)
            {
                var semFeeModel = (from p in db.SemesterFees where (p.studentId == studentId) && (p.payForSemester == payForSemester) select p).FirstOrDefault();
                semFeeModel.hallClearance   = "Approved!!!";
                db.Entry(semFeeModel).State = EntityState.Modified;
                db.SaveChanges();
                // return RedirectToAction("HallInfoList");
            }



            if (ModelState.IsValid)
            {
                var hallFeeModel = (from s in db.HallFees where (s.studentId == studentId) && (s.payForSemester == payForSemester) select s).FirstOrDefault();
                hallFeeModel.status          = "Approved!!!";
                db.Entry(hallFeeModel).State = EntityState.Modified;
                db.SaveChanges();
                // return RedirectToAction("HallInfoList");
            }
            return(RedirectToAction("HallFeeInfoList"));
        }
Exemplo n.º 4
0
        public ActionResult StudentChangePassword(string newPass)
        {
            string userId = Session["userId"].ToString();

            if (ModelState.IsValid)
            {
                var model = (from p in db.Students where (p.studentId == userId) select p).FirstOrDefault();


                model.Password        = newPass;
                db.Entry(model).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Profile", "StudentInfo"));
            }


            return(View());
        }