/* ===== Get Semester Informationfrom data access laer and send back to the presentation layer =========*/ public static object getModuleData(object courseID) { int courseid = Convert.ToInt32(courseID); PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); var dataList = dbcontext.getSemesterByCourse(courseid); return dataList.ToList(); }
/* ===== Get admin data from data access laer and send back to the presentation layer =========*/ public static List<Course> getbasicCourseInfo() { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); var course = dataContext.Courses.Where(x => x.courseID.Equals(1)); return course.ToList<Course>(); }
/* ===== Get Semester Information data access laer and send back to the presentation layer =========*/ public static object getsSemesterInformation(int courseID) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); var semList = dataContext.spGetSemeterInfoNew(courseID); return(semList.ToList()); }
/* ===== Get admin data from data access laer and send back to the presentation layer =========*/ public static List <Course> getbasicCourseInfo() { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); var course = dataContext.Courses.Where(x => x.courseID.Equals(1)); return(course.ToList <Course>()); }
/* =====Update admin data and send to data access layer =========*/ public static void updateAdminProfileData(object userID, String userName, String email, String linkedin, String description) { int userid = Convert.ToInt32(userID); PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); dataContext.spUpdateAdmin(userid, userName, email, linkedin, description); }
/* ===== Getm get tModule By Semester data access laer and send back to the presentation layer =========*/ public static object getModuleBySemester(String semesterID) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); var dataSet = dataContext.spGetModuleInfoBySemesterNew2(Convert.ToInt32(semesterID)); return(dataSet.ToList()); }
/* ===== Gets Maximum CourseID from data access laer and send back to the presentation layer =========*/ public static int getsMaxCourseID() { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); int i = dataContext.spGetMaxCourseID().FirstOrDefault() ?? -1; return(i); }
/* ==============Get Module By Semester data access laer and send back to the presentation layer =========*/ public static void spSetCommonPassword(String courseID, string password) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); dataContext.spSetCommonPasswordNew(Convert.ToInt32(courseID), password); // dataContext.spSetCommonPassword(Convert.ToInt32(courseID), password); }
/* ==============get Student enrollment Info data access laer and send back to the presentation layer =========*/ public static object getStudentenrollmentInfo(int courseID, string moduleCode) { PerformanceAnalyzerDataContext dbContext = new PerformanceAnalyzerDataContext(); var resultSet = dbContext.spGetStudentInfoForResultNew(courseID, moduleCode); return(resultSet.ToList()); }
/* ===== Get Max course id from data access laer and send back to the presentation layer =========*/ /* ===== used when inserting new course===========================================================*/ public static int getMaxCourseID() { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); int i = dataContext.spGetMaxCourseID().FirstOrDefault() ?? -1; return i; }
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (((LinkButton)e.CommandSource).Text.Equals(" More...")) { GridViewRow rowSelect = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int rowindex = rowSelect.RowIndex; SqlDataSource1.SelectParameters["courseIDin"].DefaultValue = GridView1.DataKeys[rowindex].Value.ToString(); DetailsView1.DataSource = SqlDataSource1; DetailsView1.DataBind(); } if (((LinkButton)e.CommandSource).Text.Equals("Unfollow | ")) { GridViewRow rowSelect = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int rowindex = rowSelect.RowIndex; int courseID=Convert.ToInt32( GridView1.DataKeys[rowindex].Value.ToString()); PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); dataContext.spUnfollowCourse(Convert.ToInt32(Session["userID"].ToString()), courseID); GridView1.DataBind(); DetailsView1.DataSource = null; DetailsView1.DataBind(); } }
/* ==============Get Student Basic Data using data access laer and send back to the presentation layer =========*/ public static object getStudentBasicData(String courseID) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); var dataSet = dataContext.getStudentBasicInfoNew(Convert.ToInt32(courseID)); return(dataSet.ToList()); }
/* ===== Get Semester Informationfrom data access laer and send back to the presentation layer =========*/ public static object getModuleData(object courseID) { int courseid = Convert.ToInt32(courseID); PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); var dataList = dbcontext.getSemesterByCourse(courseid); return(dataList.ToList()); }
/* ===== Get admin data from data access laer and send back to the presentation layer =========*/ public static object getAdminProfileData(object userID) { int userid = Convert.ToInt32(userID); PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); var data = dbcontext.spGetAdminDataNew(userid); // data.ToList(); return data.ToList(); }
/* ===== Get Semester Informationfrom data access laer and send back to the presentation layer =========*/ public static object getbasicCourseInfoNew(string courseID) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); int courseid = Convert.ToInt32(courseID); var course = dataContext.spGetCourseInformation(courseid); return(course.ToList()); }
/* ===== Get Semester Informationfrom data access laer and send back to the presentation layer =========*/ public static object getbasicCourseInfoNew(string courseID) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); int courseid = Convert.ToInt32(courseID); var course = dataContext.spGetCourseInformation(courseid); return course.ToList(); }
/* ===== Get Semester Informationfrom data access laer and send back to the presentation layer =========*/ public static object getIndustryProfessionalProfileData(object userID) { int userid = Convert.ToInt32(userID); PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); var data = dbcontext.spGetIndustryProfessionalData(userid); // data.ToList(); return data.ToList(); }
public static object getLecturerData(object userID) { int userid = Convert.ToInt32(userID); PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); var data = dbcontext.spGetLectureData(userid); // data.ToList(); return(data.ToList()); }
protected void Button2_Click(object sender, EventArgs e) { int courseID=Convert.ToInt32( DropDownList1.SelectedValue); if (RadioButton1.Checked) { try { AdminLogic.createEnrollments(courseID, DropDownList2.SelectedValue); } catch (Exception) { ; } finally { this.Gridview1_DataBind(); } } else { try { AdminLogic.createEnrollments(courseID, DropDownList2.SelectedValue); //if (!TextBox1.Text.Equals("")) //{ // AdminLogic.inputTextStreamResults(courseID, TextBox1.Text, DropDownList2.SelectedValue); //} string textStream = TextBox1.Text; string[] words = textStream.Split(' '); int count = words.Length; for (int i = 0; i <= count - 2; i++) { if (PerformanceAnalyzer2.BusinessLogicLayer.AdminLogic.validateIndex(words[i]) && PerformanceAnalyzer2.BusinessLogicLayer.AdminLogic.validateResult(words[i+1])) { PerformanceAnalyzerDataContext dbContext = new PerformanceAnalyzerDataContext(); dbContext.insertResultByText2(words[i], words[i + 1], DropDownList2.SelectedValue); } } } catch (Exception) { ; } finally { this.Gridview1_DataBind(); } } }
protected void Button2_Click(object sender, EventArgs e) { int courseID = Convert.ToInt32(DropDownList1.SelectedValue); if (RadioButton1.Checked) { try { AdminLogic.createEnrollments(courseID, DropDownList2.SelectedValue); } catch (Exception) { ; } finally { this.Gridview1_DataBind(); } } else { try { AdminLogic.createEnrollments(courseID, DropDownList2.SelectedValue); //if (!TextBox1.Text.Equals("")) //{ // AdminLogic.inputTextStreamResults(courseID, TextBox1.Text, DropDownList2.SelectedValue); //} string textStream = TextBox1.Text; string[] words = textStream.Split(' '); int count = words.Length; for (int i = 0; i <= count - 2; i++) { if (PerformanceAnalyzer2.BusinessLogicLayer.AdminLogic.validateIndex(words[i]) && PerformanceAnalyzer2.BusinessLogicLayer.AdminLogic.validateResult(words[i + 1])) { PerformanceAnalyzerDataContext dbContext = new PerformanceAnalyzerDataContext(); dbContext.insertResultByText2(words[i], words[i + 1], DropDownList2.SelectedValue); } } } catch (Exception) { ; } finally { this.Gridview1_DataBind(); } } }
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (((LinkButton)e.CommandSource).Text.Equals("Accept")) { GridViewRow rowSelect = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int rowindex = rowSelect.RowIndex; int userId; int courseID; userId=Convert.ToInt32( GridView1.DataKeys[rowindex].Values["senderID"].ToString()); courseID = Convert.ToInt32(GridView1.DataKeys[rowindex].Values["courseID"].ToString()); PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); // dbcontext.Database.SqlQuery<String>(@"insert into Lecture_Course values("+userId.ToString()+","+courseID.ToString()+")"); dbcontext.spGrantCourse(userId, courseID); GridView1.DataBind(); DetailsView1.Visible = false; } else if (((LinkButton)e.CommandSource).Text.Equals("Delete")) { GridViewRow rowSelect = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int rowindex = rowSelect.RowIndex; int userId; int courseID; userId = Convert.ToInt32(GridView1.DataKeys[rowindex].Values["senderID"].ToString()); courseID = Convert.ToInt32(GridView1.DataKeys[rowindex].Values["courseID"].ToString()); PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); // dbcontext.Database.SqlQuery<String>(@"delete from [message] where senderID=" + userId.ToString()); dbcontext.spDeleteMessage(userId); GridView1.DataBind(); DetailsView1.Visible = true; } else if (((LinkButton)e.CommandSource).Text.Equals("More...")) { DetailsView1.Visible = true; GridViewRow rowSelect = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int rowindex = rowSelect.RowIndex; int userId; int courseID; userId = Convert.ToInt32(GridView1.DataKeys[rowindex].Values["senderID"].ToString()); courseID = Convert.ToInt32(GridView1.DataKeys[rowindex].Values["courseID"].ToString()); SqlDataSource2.SelectParameters["userID"].DefaultValue = userId.ToString(); SqlDataSource2.DataBind(); DetailsView1.DataBind(); } }
/* Insert new course into the database via data access layer */ public static void insertsBasicCourseInfo(object userID, string name, string batch, string universityID, String facultyID, String departmentID, int semesterCount, int studentCount, int yearCount) { int userid = Convert.ToInt32(userID); //Set up insert parameters int uniID = Convert.ToInt32(universityID); int facID = Convert.ToInt32(facultyID); int depID = Convert.ToInt32(departmentID); PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); // dataContext.spUpdateBasicCourseInfo(name, batch, uniID, facID, depID,userid); dataContext.spInsertBasicCourseInfo(name, batch, uniID, facID, depID, userid, semesterCount, studentCount, yearCount); }
protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args) { PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); int val=dbcontext.validateCourse(args.Value); if (val > 0) { args.IsValid = true; } else { args.IsValid = false; } }
/* Insert new course into the database via data access layer */ public static void insertsBasicCourseInfo(object userID, string name, string batch, string universityID, String facultyID, String departmentID, int semesterCount, int studentCount, int yearCount) { int userid = Convert.ToInt32(userID); //Set up insert parameters int uniID = Convert.ToInt32(universityID); int facID = Convert.ToInt32(facultyID); int depID = Convert.ToInt32(departmentID); PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); // dataContext.spUpdateBasicCourseInfo(name, batch, uniID, facID, depID,userid); dataContext.spInsertBasicCourseInfo(name, batch, uniID, facID, depID, userid, semesterCount, studentCount, yearCount); }
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (((LinkButton)e.CommandSource).Text.Equals("Accept")) { GridViewRow rowSelect = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int rowindex = rowSelect.RowIndex; int userId; int courseID; userId = Convert.ToInt32(GridView1.DataKeys[rowindex].Values["senderID"].ToString()); courseID = Convert.ToInt32(GridView1.DataKeys[rowindex].Values["courseID"].ToString()); PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); // dbcontext.Database.SqlQuery<String>(@"insert into Lecture_Course values("+userId.ToString()+","+courseID.ToString()+")"); dbcontext.spGrantCourse(userId, courseID); GridView1.DataBind(); DetailsView1.Visible = false; } else if (((LinkButton)e.CommandSource).Text.Equals("Delete")) { GridViewRow rowSelect = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int rowindex = rowSelect.RowIndex; int userId; int courseID; userId = Convert.ToInt32(GridView1.DataKeys[rowindex].Values["senderID"].ToString()); courseID = Convert.ToInt32(GridView1.DataKeys[rowindex].Values["courseID"].ToString()); PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); // dbcontext.Database.SqlQuery<String>(@"delete from [message] where senderID=" + userId.ToString()); dbcontext.spDeleteMessage(userId); GridView1.DataBind(); DetailsView1.Visible = true; } else if (((LinkButton)e.CommandSource).Text.Equals("More...")) { DetailsView1.Visible = true; GridViewRow rowSelect = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int rowindex = rowSelect.RowIndex; int userId; int courseID; userId = Convert.ToInt32(GridView1.DataKeys[rowindex].Values["senderID"].ToString()); courseID = Convert.ToInt32(GridView1.DataKeys[rowindex].Values["courseID"].ToString()); SqlDataSource2.SelectParameters["userID"].DefaultValue = userId.ToString(); SqlDataSource2.DataBind(); DetailsView1.DataBind(); } }
public void testAdminUserNameForUserID() { PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); // spGetAdminData_Result admininfo = new spGetAdminData_Result(); var rdr = dbcontext.spGetAdminData(1); // spResultByUser_Result obj1 = rdr.ToList<spResultByUser_Result>().FirstOrDefault(); spGetAdminData_Result admininfo = rdr.ToList <spGetAdminData_Result>().FirstOrDefault(); // Assert.AreEqual("wad Kanchana", admininfo.userName); // bool equility = ("wad Kanchana" == admininfo.userName); Assert.AreEqual("wad Kanchana", admininfo.userName); }
protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args) { PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); int val = dbcontext.validateCourse(args.Value); if (val > 0) { args.IsValid = true; } else { args.IsValid = false; } }
/* ===== Get Semester Informationfrom data access laer and send back to the presentation layer =========*/ public static DataTable getUserVSBatch(String userID, string courseID, string moduleCode) { PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); var rdr = dbcontext.spResultByUser(userID, moduleCode); spResultByUser_Result obj1 = rdr.ToList <spResultByUser_Result>().FirstOrDefault(); var rdr2 = dbcontext.spGetBatchAverage(moduleCode, Convert.ToInt32(courseID)); double obj2 = rdr2.FirstOrDefault() ?? 0; //Create DataTable DataTable dt = new DataTable(); //Put some columns in it. dt.Columns.Add(new DataColumn("Result Group", typeof(String))); dt.Columns.Add(new DataColumn("Result", typeof(string))); dt.Columns.Add(new DataColumn("GPA", typeof(double))); // Create the record DataRow dr = dt.NewRow(); DataRow dr2 = dt.NewRow(); try { dr["Result Group"] = obj1.indexNo; dr["Result"] = obj1.result; dr["GPA"] = obj1.GPA; dt.Rows.Add(dr); dr2["Result Group"] = "Batch"; dr2["Result"] = getResultForGPA(obj2); dr2["GPA"] = Math.Round(obj2, 2); dt.Rows.Add(dr2); } catch (Exception er) { return(null); } return(dt); }
/* ==============input Text Stream Results using data access laer and send back to the presentation layer =========*/ public static void inputTextStreamResults(int courseID, string textStream, string moduleCode) { string[] words = textStream.Split(' '); int count = words.Length; for (int i = 0; i <= count - 2; i++) { if (validateIndex(words[i]) && validateResult(words[i++])) { PerformanceAnalyzerDataContext dbContext = new PerformanceAnalyzerDataContext(); dbContext.insertResultByText2(words[i], words[i + 1], moduleCode); } } }
protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e) { if (((LinkButton)e.CommandSource).Text.Equals("Send Request")) { GridViewRow rowSelect = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int rowindex = rowSelect.RowIndex; int courseID = Convert.ToInt32(GridView2.DataKeys[rowindex].Value.ToString()); PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); dataContext.sendRequest(Convert.ToInt32(Session["userID"].ToString()), courseID); GridView2.DataBind(); } else if (((LinkButton)e.CommandSource).Text.Equals(" | More...")) { GridViewRow rowSelect = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int rowindex = rowSelect.RowIndex; SqlDataSource5.SelectParameters["courseIDin"].DefaultValue = GridView2.DataKeys[rowindex].Value.ToString(); DetailsView2.DataSource = SqlDataSource5; DetailsView2.DataBind(); } }
protected void GridView1_RowCommand2(object sender, GridViewCommandEventArgs e) { if (((LinkButton)e.CommandSource).Text.Equals(" More...")) { GridViewRow rowSelect = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int rowindex = rowSelect.RowIndex; SqlDataSource1.SelectParameters["courseIDin"].DefaultValue = GridView1.DataKeys[rowindex].Value.ToString(); DetailsView1.DataSource = SqlDataSource1; DetailsView1.DataBind(); DetailsView1.Visible = true; } if (((LinkButton)e.CommandSource).Text.Equals("Unfollow | ")) { GridViewRow rowSelect = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int rowindex = rowSelect.RowIndex; int courseID = Convert.ToInt32(GridView1.DataKeys[rowindex].Value.ToString()); PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); dataContext.spUnfollowCourse(Convert.ToInt32(Session["userID"].ToString()), courseID); GridView1.DataBind(); DetailsView1.DataSource = null; DetailsView1.DataBind(); } }
/* ==============get Student enrollment Info data access laer and send back to the presentation layer =========*/ public static object getStudentenrollmentInfo(int courseID, string moduleCode) { PerformanceAnalyzerDataContext dbContext = new PerformanceAnalyzerDataContext(); var resultSet = dbContext.spGetStudentInfoForResultNew(courseID, moduleCode); return resultSet.ToList(); }
/* ==============input Text Stream Results using data access laer and send back to the presentation layer =========*/ public static void inputTextStreamResults(int courseID, string textStream, string moduleCode) { string[] words = textStream.Split(' '); int count = words.Length; for (int i = 0; i <= count - 2; i++) { if (validateIndex(words[i]) && validateResult(words[i++])) { PerformanceAnalyzerDataContext dbContext = new PerformanceAnalyzerDataContext(); dbContext.insertResultByText2(words[i], words[i + 1], moduleCode); } } }
/* ==============Edit Basic Course Info using data access laer and send back to the presentation layer =========*/ public static void spEditBasicCourseInfo(String courseID, string name, string batch, int uniID, int facID, int deptID) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); dataContext.spEditBasicCourseInfo(Convert.ToInt32(courseID), name, batch, uniID, facID, deptID); }
/* ==============Get Module By Semester data access laer and send back to the presentation layer =========*/ public static void spSetCommonPassword(String courseID, string password) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); dataContext.spSetCommonPasswordNew(Convert.ToInt32(courseID), password); // dataContext.spSetCommonPassword(Convert.ToInt32(courseID), password); }
/* =====Update admin data and send to data access layer =========*/ public static void updateAdminProfileData(object userID, String userName, String email, String linkedin, String description) { int userid = Convert.ToInt32(userID); PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); dataContext.spUpdateAdmin(userid, userName, email, linkedin, description); }
/* ===== Getm get tModule By Semester data access laer and send back to the presentation layer =========*/ public static object getModuleBySemester(String semesterID) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); var dataSet = dataContext.spGetModuleInfoBySemesterNew2(Convert.ToInt32(semesterID)); return dataSet.ToList(); }
/* ==============Get Student Basic Data using data access laer and send back to the presentation layer =========*/ public static object getStudentBasicData(String courseID) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); var dataSet = dataContext.getStudentBasicInfoNew(Convert.ToInt32(courseID)); return dataSet.ToList(); }
/* ===== Get Semester Informationfrom data access laer and send back to the presentation layer =========*/ public static DataTable getUserVSBatch(String userID, string courseID, string moduleCode) { PerformanceAnalyzerDataContext dbcontext = new PerformanceAnalyzerDataContext(); var rdr = dbcontext.spResultByUser(userID, moduleCode); spResultByUser_Result obj1 = rdr.ToList<spResultByUser_Result>().FirstOrDefault(); var rdr2 = dbcontext.spGetBatchAverage(moduleCode, Convert.ToInt32(courseID)); double obj2 = rdr2.FirstOrDefault() ?? 0; //Create DataTable DataTable dt = new DataTable(); //Put some columns in it. dt.Columns.Add(new DataColumn("Result Group", typeof(String))); dt.Columns.Add(new DataColumn("Result", typeof(string))); dt.Columns.Add(new DataColumn("GPA", typeof(double))); // Create the record DataRow dr = dt.NewRow(); DataRow dr2 = dt.NewRow(); try { dr["Result Group"] = obj1.indexNo; dr["Result"] = obj1.result; dr["GPA"] = obj1.GPA; dt.Rows.Add(dr); dr2["Result Group"] = "Batch"; dr2["Result"] = getResultForGPA(obj2); dr2["GPA"] = Math.Round(obj2, 2); dt.Rows.Add(dr2); } catch (Exception er) { return null; } return dt; }
/* ==============create Enrollments using data access laer and send back to the presentation layer =========*/ public static void createEnrollments(int courseID, string moduleCode) { PerformanceAnalyzerDataContext dbContext = new PerformanceAnalyzerDataContext(); dbContext.spCreateEnrollments(courseID, moduleCode); }
/* ============== Delete module BySemester data access laer and send back to the presentation layer =========*/ public static void deletemoduleBySemester(String semesterID, string moduleCode) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); dataContext.spDeleteModuleBySemester(Convert.ToInt32(semesterID), moduleCode); }
/* ===== Get Semester Information data access laer and send back to the presentation layer =========*/ public static object getsSemesterInformation(int courseID) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); var semList = dataContext.spGetSemeterInfoNew(courseID); return semList.ToList(); }
/* ==============create Enrollments using data access laer and send back to the presentation layer =========*/ public static void createEnrollments(int courseID, string moduleCode) { PerformanceAnalyzerDataContext dbContext = new PerformanceAnalyzerDataContext(); dbContext.spCreateEnrollments(courseID, moduleCode); }
/* ==============update Result using data access laer and send back to the presentation layer =========*/ public static void updateResult(int userID, String moduleCode, string result) { PerformanceAnalyzerDataContext dbContext = new PerformanceAnalyzerDataContext(); dbContext.spInsertEnrollment(userID, moduleCode, result); }
/* ==============update Student Basic Info using data access layer and send back to the presentation layer =========*/ public static void updateStudentBasicInfo(String courseID, string userName, String indexNO) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); dataContext.spUpdateStudentBasicInfo(Convert.ToInt32(courseID), userName, indexNO); }
/* ==============update Student Basic Info using data access layer and send back to the presentation layer =========*/ public static void updateStudentBasicInfo(String courseID, string userName, String indexNO) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); dataContext.spUpdateStudentBasicInfo(Convert.ToInt32(courseID), userName, indexNO); }
/* ==============update Result using data access laer and send back to the presentation layer =========*/ public static void updateResult(int userID, String moduleCode, string result) { PerformanceAnalyzerDataContext dbContext = new PerformanceAnalyzerDataContext(); dbContext.spInsertEnrollment(userID, moduleCode, result); }
/* ============== Delete module BySemester data access laer and send back to the presentation layer =========*/ public static void deletemoduleBySemester(String semesterID, string moduleCode) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); dataContext.spDeleteModuleBySemester(Convert.ToInt32(semesterID), moduleCode); }
/* ==============Edit Basic Course Info using data access laer and send back to the presentation layer =========*/ public static void spEditBasicCourseInfo(String courseID, string name, string batch, int uniID, int facID, int deptID) { PerformanceAnalyzerDataContext dataContext = new PerformanceAnalyzerDataContext(); dataContext.spEditBasicCourseInfo(Convert.ToInt32(courseID), name, batch, uniID, facID, deptID); }