示例#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());
        }
示例#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));
        }
示例#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"));
        }
示例#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());
        }