//To add new semester public string AddSemester(tbl_MCE_Semester mce_Semester) { DynamicParameters param = new DynamicParameters(); param.Add("@P_CHRACTION", "SEMESTERINSERT"); param.Add("@P_vchAdmissionBatch", mce_Semester.vchAdmissionBatch); param.Add("@P_intCourseID", mce_Semester.intCourseID); param.Add("@P_intBranchID", mce_Semester.intBranchID); param.Add("@p_vchCourseName", mce_Semester.vchCourseName); param.Add("@p_vchBranchName", mce_Semester.vchBranchName); param.Add("@P_intSemester", mce_Semester.intSemester); param.Add("@P_vchSection", mce_Semester.vchSection); param.Add("@P_dtmStartDate", mce_Semester.dtmStartDate); param.Add("@P_dtmEndDate", mce_Semester.dtmEndDate); param.Add("@P_vchRemarks", mce_Semester.vchRemarks); param.Add("@P_intCreatedBy", mce_Semester.intCreatedBy); param.Add("@P_VCHMSGOUT", dbType: DbType.String, direction: ParameterDirection.Output, size: 5215585); return(DapperORM.ExecuteDML("SP_MCE_Semester_DML", param, "@P_VCHMSGOUT")); }
public ActionResult CreateSemester(tbl_MCE_Semester mce_Semester) { ModelState.Clear(); _semester.AddSemester(mce_Semester); ViewBag.courseList = course.CourseList().ToList(); TempData["Success"] = "Semester Created Successfully"; ModelState.Clear(); return(View()); }
//To delete semester info from data table public string DeleteSemester(tbl_MCE_Semester mce_Semester) { DynamicParameters param = new DynamicParameters(); param.Add("@P_CHRACTION", "SEMESTERDELETE"); param.Add("@P_intSemesterID", mce_Semester.intSemesterID); param.Add("@P_intCreatedBy", mce_Semester.intCreatedBy); param.Add("@P_VCHMSGOUT", dbType: DbType.String, direction: ParameterDirection.Output, size: 5215585); return(DapperORM.ExecuteDML("SP_MCE_Semester_DML", param, "@P_VCHMSGOUT")); }
public ActionResult SemesterDetails(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_MCE_Semester semester = _semester.SemesterDetails((int)id); ViewBag.courseList = course.CourseList().ToList(); ViewBag.BranchList = _branches.BranchList().ToList(); ViewBag.DefaultCourse = semester.intCourseID; ViewBag.DefaultBranch = semester.intBranchID; return(View(semester)); }
//To edit semester details public string EditSemester(tbl_MCE_Semester mce_Semester) { DynamicParameters param = new DynamicParameters(); param.Add("@P_CHRACTION", "SEMESTERUPDATE"); param.Add("@P_intSemesterID", mce_Semester.intSemesterID); param.Add("@P_intSemester", mce_Semester.intSemester); param.Add("@P_vchSection", mce_Semester.vchSection); param.Add("@P_dtmStartDate", mce_Semester.dtmStartDate); param.Add("@P_dtmEndDate", mce_Semester.dtmEndDate); param.Add("@P_vchRemarks", mce_Semester.vchRemarks); param.Add("@P_intCreatedBy", mce_Semester.intCreatedBy); param.Add("@P_VCHMSGOUT", dbType: DbType.String, direction: ParameterDirection.Output, size: 5215585); return(DapperORM.ExecuteDML("SP_MCE_Semester_DML", param, "@P_VCHMSGOUT")); }
public ActionResult DeleteSemester(tbl_MCE_Semester mce_Semester) { _semester.DeleteSemester(mce_Semester); TempData["Success"] = "Data Deleted Successfully"; return(RedirectToAction("SemesterDataTable", "Semester")); }