public ActionResult studentsPromotion(int cboclass, int cbosession, int cbocategory, int cboterm, int cbosection, int cboprogram) { StudentCurrentStatuseservice currentStatuseservice = new StudentCurrentStatuseservice(); ViewBag.session = sessionservice.getsession().ToList(); ViewBag.classeslist = Classservice.getclasses().ToList(); ViewBag.section = sectionservice.getsection().ToList(); ViewBag.termname = termservice.getTerm().ToList(); var model = from c in StudentCurrentStatuseservice.getStudentCurrentStatus().ToList().Where(x => x.classesID == cboclass && x.SessionID == cbosession && x.CategoryID == cbocategory && x.TermID == cboterm && x.SectionID == cbosection && x.ProgramdegreeID == cboprogram ) join s in studentservice.getstudent() on c.StudentID equals s.ID join sec in sectionservice.getsection() on c.SectionID equals sec.id join Session in sessionservice.getsession() on c.SessionID equals Session.ID join classes in classservice.getclasses() on c.classesID equals classes.ID join term in termservice.getTerm() on c.TermID equals term.id select new StudentDisplayVM { section = sec, session = Session, Student = s, StudentCurrentStatus = c, Classes = classes, term = term }; return(View(model)); }
public ActionResult AssignClass(FormCollection fc, string studentroll, int id) { string check = (fc["checkbox"]); if (check == "on") { StudentCurrentStatus studentCurrentStatus = new StudentCurrentStatus(); studentCurrentStatus.StudentID = id; studentCurrentStatus.BranchID = fc["cboBracnh"]; studentCurrentStatus.classesID = Convert.ToInt32((fc["cboclass"])); studentCurrentStatus.CategoryID = Convert.ToInt32((fc["cbocategory"])); studentCurrentStatus.SessionID = Convert.ToInt32((fc["cbosession"])); studentCurrentStatus.TermID = Convert.ToInt32((fc["cboterm"])); studentCurrentStatus.SectionID = Convert.ToInt32((fc["cbosection"])); studentCurrentStatus.ProgramdegreeID = Convert.ToInt32(fc["cboprogram"]); StudentCurrentStatuseservice studentCurrentStatuseservice = new StudentCurrentStatuseservice(); studentCurrentStatuseservice.saveStudentCurrentStatus(studentCurrentStatus); return(RedirectToAction("DiscountDetails", new { stid = studentCurrentStatus.StudentID, branchid = studentCurrentStatus.BranchID, classid = studentCurrentStatus.classesID, sessionid = studentCurrentStatus.SessionID, cateid = studentCurrentStatus.CategoryID, sectionid = studentCurrentStatus.SessionID, Termid = studentCurrentStatus.TermID, feevtype = 1 })); } else { StudentCurrentStatus studentCurrentStatus = new StudentCurrentStatus(); studentCurrentStatus.StudentID = id; studentCurrentStatus.BranchID = fc["cboBracnh"]; studentCurrentStatus.classesID = Convert.ToInt32((fc["cboclass"])); studentCurrentStatus.CategoryID = Convert.ToInt32((fc["cbocategory"])); studentCurrentStatus.SessionID = Convert.ToInt32((fc["cbosession"])); studentCurrentStatus.TermID = Convert.ToInt32((fc["cboterm"])); studentCurrentStatus.SectionID = Convert.ToInt32((fc["cbosection"])); studentCurrentStatus.ProgramdegreeID = Convert.ToInt32(fc["cboprogram"]); StudentCurrentStatuseservice studentCurrentStatuseservice = new StudentCurrentStatuseservice(); studentCurrentStatuseservice.saveStudentCurrentStatus(studentCurrentStatus); return(RedirectToAction("Studentsclasslist")); } }
public ActionResult Editclasses(int id) { StudentCurrentStatuseservice service = new StudentCurrentStatuseservice(); ViewBag.session = sessionservice.getsession().ToList(); ViewBag.section = sectionservice.getsection().ToList(); ViewBag.termname = termservice.getTerm().ToList(); ViewBag.getclass = Classservice.getclasses().ToList(); ViewBag.branchlist = branchservice.getbranch().ToList(); ViewBag.catlist = categoryservice.getCategory().ToList(); ViewBag.program = programdegreesservice.getProgramdegree().ToList(); var Studentclasses = service.getbyid(id); return(View(Studentclasses)); }
public ActionResult AddResult(int cboclass, int cbosession, int cboterm, int cbosection, int cbosubject) { var id = ResultSheetService.getResultSheet().Where(x => x.classesID == cboclass && x.SessionsID == cbosession && x.TermsID == cboterm && x.SectionID == cbosection && x.Subjectid == cbosubject).Select(x => x.ID); if (id.Count() > 0) { return(RedirectToAction("Edit", new { cboclass, cbosection, cbosession, cbosubject, cboterm })); } else { StudentCurrentStatuseservice currentStatuseservice = new StudentCurrentStatuseservice(); ViewBag.session = sessionservice.getsession().ToList(); ViewBag.classeslist = classservice.getclasses().ToList(); ViewBag.section = sectionservice.getsection().ToList(); ViewBag.termname = termservice.getTerm().ToList(); ViewBag.subject = cbosubject; var model = from c in currentStatuseservice.getStudentCurrentStatus().ToList().Where(x => x.classesID == cboclass && x.SessionID == cbosession && x.TermID == cboterm && x.SectionID == cbosection ) join s in studentservice.getstudent() on c.StudentID equals s.ID join sec in sectionservice.getsection() on c.SectionID equals sec.id join Session in sessionservice.getsession() on c.SessionID equals Session.ID join classes in classservice.getclasses() on c.classesID equals classes.ID join term in termservice.getTerm() on c.TermID equals term.id select new StudentDisplayVM { section = sec, session = Session, Student = s, StudentCurrentStatus = c, Classes = classes, term = term }; return(View(model)); } }
public ActionResult Editclasses(FormCollection fc, int id) { StudentCurrentStatus StudentCurrentStatus = new StudentCurrentStatus(); StudentCurrentStatus.id = id; StudentCurrentStatus.StudentID = Convert.ToInt32(fc["StudentID"]); StudentCurrentStatus.SectionID = Convert.ToInt32((fc["cbosession"])); StudentCurrentStatus.classesID = Convert.ToInt32((fc["cboclass"])); StudentCurrentStatus.SessionID = Convert.ToInt32((fc["cbosection"])); StudentCurrentStatus.TermID = Convert.ToInt32((fc["cboterm"])); StudentCurrentStatus.BranchID = fc["cbobranch"]; StudentCurrentStatus.CategoryID = Convert.ToInt32((fc["cbocateogry"])); StudentCurrentStatus.ProgramdegreeID = Convert.ToInt32(fc["Programdegree"]); StudentCurrentStatuseservice StudentCurrentStatuseservice = new StudentCurrentStatuseservice(); StudentCurrentStatuseservice.updateStudentCurrentStatus(StudentCurrentStatus); return(RedirectToAction("Studentsclasslist")); }