コード例 #1
0
        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.GetStudentDetailsIDbyNationality(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();
                lbl_Nationality.Text    = dtStudentServices.Rows[0]["strNationalityDescEn"].ToString();
            }
        }
コード例 #2
0
        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.GetStudentDetailsIDbyNationality(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();
                txt_StudentContact1.Text    = dtStudentServices.Rows[0]["Phone"].ToString();
                lbl_StudentEmail.Text       = dtStudentServices.Rows[0]["sECTemail"].ToString();
                hdf_StudentEmail.Value      = dtStudentServices.Rows[0]["sECTemail"].ToString();
                lbl_Major.Text              = dtStudentServices.Rows[0]["strCaption"].ToString();
                lbl_GraduationSemester.Text = dtStudentServices.Rows[0]["byteGraduationSemester"].ToString();
                lbl_GraduationYear.Text     = dtStudentServices.Rows[0]["intGraduationYear"].ToString();
                lbl_DOB.Text = Convert.ToDateTime(dtStudentServices.Rows[0]["dateBirth"]).ToString("dd/MM/yyyy");
                string cancelreason = dtStudentServices.Rows[0]["byteCancelReason"].ToString();
                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;
                    lnk_Generate.Enabled = false;
                }
            }
        }