public void getdetails() { Connection_StringCLS connstr = new Connection_StringCLS(Campus); int sem = 0; int Year = LibraryMOD.SeperateTerm(LibraryMOD.GetCurrentTerm(), out sem); int iYear = Year; int iSem = sem; string sSemester = LibraryMOD.GetSemesterString(iSem); lbl_AcademicYear.Text = iYear.ToString(); lbl_Semester.Text = sSemester.ToString(); string studentid = Session["CurrentStudent"].ToString(); var services = new DAL.DAL(); DataTable dtStudentServices = services.GetStudentDetailsID(studentid, connstr.Conn_string); if (dtStudentServices.Rows.Count > 0) { lbl_StudentName.Text = dtStudentServices.Rows[0]["strLastDescEn"].ToString(); lbl_StudentID.Text = dtStudentServices.Rows[0]["lngStudentNumber"].ToString(); lbl_StudentContact.Text = dtStudentServices.Rows[0]["Phone"].ToString(); lbl_StudentEmail.Text = dtStudentServices.Rows[0]["sECTemail"].ToString(); hdf_StudentEmail.Value = dtStudentServices.Rows[0]["sECTemail"].ToString(); } }
public void getdetails() { Connection_StringCLS connstr = new Connection_StringCLS(Campus); int sem = 0; int Year = LibraryMOD.SeperateTerm(LibraryMOD.GetCurrentTerm(), out sem); int iYear = Year; int iSem = sem; string sSemester = LibraryMOD.GetSemesterString(iSem); lbl_AcademicYear.Text = iYear.ToString(); lbl_Semester.Text = sSemester.ToString(); string studentid = Session["CurrentStudent"].ToString(); var services = new DAL.DAL(); DataTable dtStudentServices = services.GetStudentDetailsID(studentid, connstr.Conn_string); if (dtStudentServices.Rows.Count > 0) { lbl_StudentName.Text = dtStudentServices.Rows[0]["strLastDescEn"].ToString(); lbl_StudentID.Text = dtStudentServices.Rows[0]["lngStudentNumber"].ToString(); lbl_StudentContact.Text = dtStudentServices.Rows[0]["Phone"].ToString(); lbl_StudentEmail.Text = dtStudentServices.Rows[0]["sECTemail"].ToString(); hdf_StudentEmail.Value = dtStudentServices.Rows[0]["sECTemail"].ToString(); lbl_CurrentMajor.Text = dtStudentServices.Rows[0]["strCaption"].ToString(); SqlConnection sc = new SqlConnection(connstr.Conn_string); SqlCommand cmd = new SqlCommand("SELECT Course_Balance_View_BothSides.iYear, Course_Balance_View_BothSides.Sem, Course_Balance_View_BothSides.Shift, Course_Balance_View_BothSides.Course, Course_Balance_View_BothSides.Class, Course_Balance_View_BothSides.Student, Course_Balance_View_BothSides.FactorBalance, Course_Balance_View_BothSides.IsIncluded_AtRisk, Reg_Courses.IsInternshipCourse FROM Course_Balance_View_BothSides INNER JOIN Reg_Courses ON Course_Balance_View_BothSides.Course = Reg_Courses.strCourse WHERE (Reg_Courses.IsInternshipCourse = 1) AND (Course_Balance_View_BothSides.iYear = " + iYear + ") AND (Course_Balance_View_BothSides.Sem = " + iSem + ") AND (Course_Balance_View_BothSides.Student = N'" + studentid + "')", sc); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(cmd); try { sc.Open(); da.Fill(dt); sc.Close(); if (dt.Rows.Count > 0) { //Continue } else { div_Alert.Attributes["class"] = "alert alert-danger alert-dismissible "; lbl_Msg.Text = "You are not allowed to generate this request (Only for students registered internship courses)."; lbl_Msg.Visible = true; div_msg.Visible = true; lnk_Generate.Enabled = false; } } catch (Exception ex) { sc.Close(); Console.WriteLine(ex.Message); } finally { sc.Close(); } } }
public void getdetails() { Connection_StringCLS connstr = new Connection_StringCLS(Campus); int sem = 0; int Year = LibraryMOD.SeperateTerm(LibraryMOD.GetCurrentTerm(), out sem); int iYear = Year; int iSem = sem; string sSemester = LibraryMOD.GetSemesterString(iSem); lbl_AcademicYear.Text = iYear.ToString(); lbl_Semester.Text = sSemester.ToString(); string studentid = Session["CurrentStudent"].ToString(); var services = new DAL.DAL(); DataTable dtStudentServices = services.GetStudentDetailsID(studentid, connstr.Conn_string); if (dtStudentServices.Rows.Count > 0) { lbl_StudentName.Text = dtStudentServices.Rows[0]["strLastDescEn"].ToString(); lbl_StudentID.Text = dtStudentServices.Rows[0]["lngStudentNumber"].ToString(); lbl_StudentContact.Text = dtStudentServices.Rows[0]["Phone"].ToString(); lbl_StudentEmail.Text = dtStudentServices.Rows[0]["sECTemail"].ToString(); hdf_StudentEmail.Value = dtStudentServices.Rows[0]["sECTemail"].ToString(); lbl_CurrentMajor.Text = dtStudentServices.Rows[0]["strCaption"].ToString(); if (dtStudentServices.Rows[0]["strDegree"].ToString() == "2") { //Not allowed for remedial students div_Alert.Attributes["class"] = "alert alert-danger alert-dismissible "; lbl_Msg.Text = "You are not allowed to generate this request at this time (Not allowed for remedial students)."; lbl_Msg.Visible = true; div_msg.Visible = true; lnk_Generate.Enabled = false; return; } } }
public void getdetails() { Connection_StringCLS connstr = new Connection_StringCLS(Campus); int sem = 0; int Year = LibraryMOD.SeperateTerm(LibraryMOD.GetCurrentTerm(), out sem); int iYear = Year; int iSem = sem; string sSemester = LibraryMOD.GetSemesterString(iSem); lbl_AcademicYear.Text = iYear.ToString(); lbl_Semester.Text = sSemester.ToString(); InitializeModule.EnumCampus CurrentCampus = (InitializeModule.EnumCampus)Session["CurrentCampus"]; string sSID = Session["CurrentStudent"].ToString(); decimal dAmount = LibraryMOD.GetStudentUptodateBalanceBTS(sSID, CurrentCampus); lbl_Balance.Text = string.Format("{0:f}", dAmount); string studentid = Session["CurrentStudent"].ToString(); var services = new DAL.DAL(); DataTable dtStudentServices = services.GetStudentDetailsID(studentid, connstr.Conn_string); if (dtStudentServices.Rows.Count > 0) { lbl_StudentName.Text = dtStudentServices.Rows[0]["strLastDescEn"].ToString(); lbl_StudentID.Text = dtStudentServices.Rows[0]["lngStudentNumber"].ToString(); lbl_StudentContact.Text = dtStudentServices.Rows[0]["Phone"].ToString(); lbl_StudentEmail.Text = dtStudentServices.Rows[0]["sECTemail"].ToString(); hdf_StudentEmail.Value = dtStudentServices.Rows[0]["sECTemail"].ToString(); string cancelreason = dtStudentServices.Rows[0]["byteCancelReason"].ToString(); if (lbl_ServiceID.Text == "1004")//Service # 1004 this must be for graduated and expected to Graduate only { //lbl_En.Text = "Graduation Letter"; //lbl_Ar.Text = "طلب افادة تخرج"; //Non-Graduated Students Check if (cancelreason != "3" && cancelreason != "25") { div_Alert.Attributes["class"] = "alert alert-danger alert-dismissible "; lbl_Msg.Text = "You are not allowed to generate this request at this time (Only for Graduated and Expected to Graduate Students)."; lbl_Msg.Visible = true; div_msg.Visible = true; hyp_Paynow.Visible = false; lnk_Generate.Enabled = false; } else { //If Graduated Checking the Uptodate Balance. If balance <=0 then allow to proceed else proceed for payment. InitializeModule.EnumCampus CurrentCampus1 = (InitializeModule.EnumCampus)Session["CurrentCampus"]; string sSID1 = Session["CurrentStudent"].ToString(); decimal dAmount1 = LibraryMOD.GetStudentUptodateBalanceBTS(sSID1, CurrentCampus1); lbl_Balance.Text = string.Format("{0:f}", dAmount1); if (dAmount1 <= 0) { //Proceed for Request Generation } else { div_Alert.Attributes["class"] = "alert alert-danger alert-dismissible "; lbl_Msg.Text = "You are not allowed to generate this request at this time (UpToDate Balance: AED " + string.Format("{0:f}", dAmount1) + " is pending.)"; lbl_Msg.Visible = true; div_msg.Visible = true; hyp_Paynow.Visible = true; hyp_Paynow.NavigateUrl = "Balance?amt=" + string.Format("{0:f}", dAmount1) + ""; lnk_Generate.Enabled = false; } } } else { //Non-Graduated Students Check //if (cancelreason != "3") //{ // div_Alert.Attributes["class"] = "alert alert-danger alert-dismissible "; // lbl_Msg.Text = "You are not allowed to generate this request at this time (Only for Graduated Students)"; // lbl_Msg.Visible = true; // div_msg.Visible = true; // hyp_Paynow.Visible = false; // lnk_Generate.Enabled = false; //} //else //{ //If Graduated Checking the Uptodate Balance. If balance <=0 then allow to proceed else proceed for payment. InitializeModule.EnumCampus CurrentCampus1 = (InitializeModule.EnumCampus)Session["CurrentCampus"]; string sSID1 = Session["CurrentStudent"].ToString(); decimal dAmount1 = LibraryMOD.GetStudentUptodateBalanceBTS(sSID1, CurrentCampus1); lbl_Balance.Text = string.Format("{0:f}", dAmount1); if (dAmount1 <= 0) { //Proceed for Request Generation } else { div_Alert.Attributes["class"] = "alert alert-danger alert-dismissible "; lbl_Msg.Text = "You are not allowed to generate this request at this time (UpToDate Balance: AED " + string.Format("{0:f}", dAmount1) + " is pending.)"; lbl_Msg.Visible = true; div_msg.Visible = true; hyp_Paynow.Visible = true; hyp_Paynow.NavigateUrl = "Balance?amt=" + string.Format("{0:f}", dAmount1) + ""; lnk_Generate.Enabled = false; } //} } //if (lbl_ServiceID.Text == "1005") //{ // lbl_En.Text = "Transcript"; // lbl_Ar.Text = "طلب كشف علامات"; //} } }