Ejemplo n.º 1
0
        protected void drp_MainReason_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (drp_MainReason.SelectedItem.Value != "---Select a Main Reason---")
            {
                var       services = new DAL.DAL();
                DataTable dt       = services.GetSubReasons(Convert.ToInt32(drp_MainReason.SelectedItem.Value));
                if (dt.Rows.Count > 0)
                {
                    drp_SubReason.DataSource     = dt;
                    drp_SubReason.DataTextField  = "SubReason";
                    drp_SubReason.DataValueField = "byteSubReson";
                    drp_SubReason.DataBind();

                    drp_SubReason.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Sub Reason---", "---Select a Sub Reason---"));
                }
                else
                {
                    drp_SubReason.Items.Clear();
                    drp_SubReason.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Sub Reason---", "---Select a Sub Reason---"));
                }
            }
            else
            {
            }
        }
Ejemplo n.º 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.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();
                }
            }
        }
        protected void drp_Course_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (drp_Course.SelectedItem.Value != "---Select a Course---")
            {
                var services = new DAL.DAL();
                Connection_StringCLS connstr = new Connection_StringCLS(Campus);
                int sem  = 0;
                int Year = LibraryMOD.SeperateTerm(Convert.ToInt32(drp_Semester.SelectedItem.Value), out sem);

                int       iYear     = Year;
                int       iSem      = sem;
                string    studentid = Session["CurrentStudent"].ToString();
                DataTable dt        = services.GetCoursesbyCourseId(studentid, connstr.Conn_string, iYear, iSem, drp_Course.SelectedItem.Value);
                if (dt.Rows.Count > 0)
                {
                    lbl_CourseCode.Text = drp_Course.SelectedItem.Value;
                    lbl_Instructor.Text = dt.Rows[0]["strLecturerDescEn"].ToString();
                }
            }
            else
            {
                lbl_CourseCode.Text = "";
                lbl_Instructor.Text = "";
            }
        }
        public void getcourses(int term)
        {
            var services = new DAL.DAL();
            Connection_StringCLS connstr = new Connection_StringCLS(Campus);
            int sem  = 0;
            int Year = LibraryMOD.SeperateTerm(term, out sem);

            int       iYear     = Year;
            int       iSem      = sem;
            string    studentid = Session["CurrentStudent"].ToString();
            DataTable dt        = services.GetCoursesbyStudentId(studentid, connstr.Conn_string, iYear, iSem);

            if (dt.Rows.Count > 0)
            {
                drp_Course.DataSource     = dt;
                drp_Course.DataTextField  = "Course";
                drp_Course.DataValueField = "Code";
                drp_Course.DataBind();

                drp_Course.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Course---", "---Select a Course---"));
            }
            else
            {
                drp_Course.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Course---", "---Select a Course---"));
            }
        }
        public void getsemesters()
        {
            var services = new DAL.DAL();
            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    studentid = Session["CurrentStudent"].ToString();
            DataTable dt        = services.GetSemestersbyTerm(iYear, iSem);

            if (dt.Rows.Count > 0)
            {
                drp_Semester.DataSource     = dt;
                drp_Semester.DataTextField  = "LongDesc";
                drp_Semester.DataValueField = "Term";
                drp_Semester.DataBind();

                drp_Semester.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Semester---", "---Select a Semester---"));
                drp_Course.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Course---", "---Select a Course---"));
            }
            else
            {
                drp_Semester.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Semester---", "---Select a Semester---"));
                drp_Course.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Course---", "---Select a Course---"));
            }
        }
Ejemplo n.º 7
0
        public void getservicedetails()
        {
            string    serviceid         = Request.QueryString["ServiceID"];
            var       services          = new DAL.DAL();
            DataTable dtStudentServices = services.GetStudentServicesbyID(serviceid);

            if (dtStudentServices.Rows.Count > 0)
            {
                lbl_ServiceID.Text     = serviceid;
                lbl_ServiceNameEn.Text = dtStudentServices.Rows[0]["ServiceEn"].ToString();
                lbl_ServiceNameAr.Text = dtStudentServices.Rows[0]["ServiceAr"].ToString();
                lbl_Fess.Text          = "AED " + Convert.ToDouble(dtStudentServices.Rows[0]["Sum"]).ToString("N");
                hdf_Price.Value        = dtStudentServices.Rows[0]["Sum"].ToString();
                lbl_En.Text            = dtStudentServices.Rows[0]["ServiceHeaderEn"].ToString();
                lbl_Ar.Text            = dtStudentServices.Rows[0]["ServiceHeaderAr"].ToString();

                Session["FeesType"]       = dtStudentServices.Rows[0]["FeesType"].ToString();
                Session["HostEmail"]      = dtStudentServices.Rows[0]["Host"].ToString();
                Session["FinanceEmail"]   = dtStudentServices.Rows[0]["Finance"].ToString();
                Session["LanguageOption"] = dtStudentServices.Rows[0]["LanguageOption"].ToString();

                if (dtStudentServices.Rows[0]["LanguageOption"].ToString() == "True")
                {
                    tdlanguage.Visible = true;
                }
                else
                {
                    tdlanguage.Visible = false;
                }
            }
        }
Ejemplo n.º 8
0
        public void getstudentservices()
        {
            var       services          = new DAL.DAL();
            DataTable dtStudentServices = services.GetStudentServices();

            RepterDetails.DataSource = dtStudentServices;
            RepterDetails.DataBind();
        }
Ejemplo n.º 9
0
        public void getprofilepic()
        {
            Connection_StringCLS connstr = new Connection_StringCLS(Campus);
            string    studentid          = Session["CurrentStudent"].ToString();
            var       services           = new DAL.DAL();
            DataTable dtStudentProfile   = services.GetStudentDetailsForProfile(studentid, connstr.Conn_string);

            if (dtStudentProfile.Rows.Count > 0)
            {
                Session["ProfilePIc"] = dtStudentProfile.Rows[0]["strStudentPic"].ToString();
                Session["sEmail"]     = dtStudentProfile.Rows[0]["sECTemail"].ToString();
            }
        }
Ejemplo n.º 10
0
        public void Generate_Menu()
        {
            int RoleId = 0;

            if (Session["CurrentRole"] != null)
            {
                RoleId = (int)Session["CurrentRole"];
            }

            var Menu = new DAL.DAL();

            Menus = Menu.GetMenuData(RoleId);
            DataView view = new DataView(Menus);

            view.RowFilter = "iLevel=0";
            this.rptCategories.DataSource = view;
            this.rptCategories.DataBind();
        }
        public void getcourses()
        {
            var services = new DAL.DAL();
            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    studentid = Session["CurrentStudent"].ToString();
            DataTable dt        = services.GetCoursesbyStudentId(studentid, connstr.Conn_string, iYear, iSem);

            if (dt.Rows.Count > 0)
            {
                chk_Courses.DataSource     = dt;
                chk_Courses.DataTextField  = "Course";
                chk_Courses.DataValueField = "strLecturerDescEn";
                chk_Courses.DataBind();
            }
        }
Ejemplo n.º 12
0
        public void getmainreason()
        {
            var       services = new DAL.DAL();
            DataTable dt       = services.GetMainReasons();

            if (dt.Rows.Count > 0)
            {
                drp_MainReason.DataSource     = dt;
                drp_MainReason.DataTextField  = "MainReason";
                drp_MainReason.DataValueField = "byteMainReason";
                drp_MainReason.DataBind();

                drp_MainReason.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Main Reason---", "---Select a Main Reason---"));
                drp_SubReason.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Sub Reason---", "---Select a Sub Reason---"));
            }
            else
            {
                drp_MainReason.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Main Reason---", "---Select a Main Reason---"));
                drp_SubReason.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Sub Reason---", "---Select a Sub Reason---"));
            }
        }
Ejemplo n.º 13
0
        public void getcourses()
        {
            var services = new DAL.DAL();
            Connection_StringCLS connstr = new Connection_StringCLS(Campus);

            DataTable dt = services.GetMajors(connstr.Conn_string);

            if (dt.Rows.Count > 0)
            {
                drp_Course.DataSource     = dt;
                drp_Course.DataTextField  = "strCaption";
                drp_Course.DataValueField = "strCaption";
                drp_Course.DataBind();

                drp_Course.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Major---", "---Select a Major---"));
            }
            else
            {
                drp_Course.Items.Insert(0, new System.Web.UI.WebControls.ListItem("---Select a Major---", "---Select a Major---"));
            }
        }
        //protected void btnReset_Click(object sender, EventArgs e)
        //{

        //}
        public void loadstudentprofile()
        {
            Connection_StringCLS connstr = new Connection_StringCLS(Campus);
            string    studentid          = Session["CurrentStudent"].ToString();
            var       services           = new DAL.DAL();
            DataTable dtStudentProfile   = services.GetStudentDetailsForProfile(studentid, connstr.Conn_string);
            string    sCampus            = Session["CurrentCampus"].ToString();

            if (dtStudentProfile.Rows.Count > 0)
            {
                int sem  = 0;
                int Year = LibraryMOD.SeperateTerm(LibraryMOD.GetCurrentTerm(), out sem);

                int    iYear     = Year;
                int    iSem      = sem;
                string sSemester = LibraryMOD.GetSemesterString(iSem);

                txt_AcademicYear.Text    = iYear.ToString();
                txt_CurrentSemester.Text = sSemester.ToString();

                txtFisrtName.Text    = dtStudentProfile.Rows[0]["strLastDescEn"].ToString();
                txtDateofBirth.Text  = Convert.ToDateTime(dtStudentProfile.Rows[0]["dateBirth"]).ToString("dd/MM/yyyy");
                txtEmail.Text        = dtStudentProfile.Rows[0]["sECTemail"].ToString();
                txtPhoneNumber.Text  = dtStudentProfile.Rows[0]["Phone"].ToString();
                txt_StudentID.Text   = dtStudentProfile.Rows[0]["lngStudentNumber"].ToString();
                txt_Major.Text       = dtStudentProfile.Rows[0]["strCaption"].ToString();
                txt_Nationality.Text = dtStudentProfile.Rows[0]["strNationalityDescEn"].ToString();
                string sPic = dtStudentProfile.Rows[0]["strStudentPic"].ToString();
                hdfiUnifiedID.Value = dtStudentProfile.Rows[0]["iUnifiedID"].ToString();
                string sDir = "Students";
                if (sCampus == "Males")
                {
                    txt_Gender.Text = "Male";
                }
                else
                {
                    txt_Gender.Text = "Female";
                }
            }
        }
Ejemplo n.º 15
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;
                }
            }
        }
Ejemplo n.º 16
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.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;
                }
            }
        }
Ejemplo n.º 17
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();

            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 = "طلب كشف علامات";
                //}
            }
        }
Ejemplo n.º 18
0
        public void loadstudentprofile()
        {
            Connection_StringCLS connstr = new Connection_StringCLS(Campus);
            string    studentid          = Session["CurrentStudent"].ToString();
            var       services           = new DAL.DAL();
            DataTable dtStudentProfile   = services.GetStudentDetailsForProfile(studentid, connstr.Conn_string);
            string    sCampus            = Session["CurrentCampus"].ToString();

            if (dtStudentProfile.Rows.Count > 0)
            {
                int sem  = 0;
                int Year = LibraryMOD.SeperateTerm(LibraryMOD.GetCurrentTerm(), out sem);

                int    iYear     = Year;
                int    iSem      = sem;
                string sSemester = LibraryMOD.GetSemesterString(iSem);

                //txt_AcademicYear.Text = iYear.ToString();
                //txt_CurrentSemester.Text = sSemester.ToString();

                //txtFisrtName.Text = dtStudentProfile.Rows[0]["strLastDescEn"].ToString();
                //txtDateofBirth.Text = Convert.ToDateTime(dtStudentProfile.Rows[0]["dateBirth"]).ToString("dd/MM/yyyy");
                lbl_Email_ID.Text = dtStudentProfile.Rows[0]["sECTemail"].ToString();
                //txtPhoneNumber.Text = dtStudentProfile.Rows[0]["Phone"].ToString();
                lbl_Student_ID.Text    = dtStudentProfile.Rows[0]["lngStudentNumber"].ToString();
                lbl_Current_Major.Text = dtStudentProfile.Rows[0]["strCaption"].ToString();


                string acceptance_type      = "";
                string acceptance_condition = "";

                if (dtStudentProfile.Rows[0]["iAcceptanceType"].ToString() == "1")
                {
                    acceptance_type = "Permanently Accepted";
                }
                else if (dtStudentProfile.Rows[0]["iAcceptanceType"].ToString() == "2")
                {
                    acceptance_type = "One Academic Semester(Conditional)";
                }
                else if (dtStudentProfile.Rows[0]["iAcceptanceType"].ToString() == "3")
                {
                    acceptance_type = "Two Academic Semesters(Conditional)";
                }
                else if (dtStudentProfile.Rows[0]["iAcceptanceType"].ToString() == "4")
                {
                    acceptance_type = "One Academic Year(Conditional)";
                }

                if (dtStudentProfile.Rows[0]["iAcceptanceCondition"].ToString() == "1")
                {
                    acceptance_condition = "All conditions have been met";
                }
                else if (dtStudentProfile.Rows[0]["iAcceptanceCondition"].ToString() == "2")
                {
                    acceptance_condition = "High school equivalency needed";
                }
                else if (dtStudentProfile.Rows[0]["iAcceptanceCondition"].ToString() == "3")
                {
                    acceptance_condition = "EmSAT needed";
                }
                else if (dtStudentProfile.Rows[0]["iAcceptanceCondition"].ToString() == "4")
                {
                    acceptance_condition = "Major requirements are not met";
                }

                lbl_Acceptance_Type.Text      = acceptance_type;
                lbl_Acceptance_Condition.Text = acceptance_condition;

                Session["Student_AT"] = acceptance_type;
                Session["Student_AC"] = acceptance_condition;

                if (dtStudentProfile.Rows[0]["byteCancelReason"].ToString() == "")
                {
                    lbl_Status.Text = "Active";
                }
                else
                {
                    SqlConnection sc  = new SqlConnection(connstr.Conn_string);
                    SqlCommand    cmd = new SqlCommand("select strReasonDesc from Lkp_Reasons where byteReason=@byteReason", sc);
                    cmd.Parameters.AddWithValue("@byteReason", dtStudentProfile.Rows[0]["byteCancelReason"].ToString());
                    DataTable      dt = new DataTable();
                    SqlDataAdapter da = new SqlDataAdapter(cmd);
                    try
                    {
                        sc.Open();
                        da.Fill(dt);
                        sc.Close();

                        if (dt.Rows.Count > 0)
                        {
                            lbl_Status.Text = dt.Rows[0]["strReasonDesc"].ToString();;
                        }
                        else
                        {
                            lbl_Status.Text = "Active";
                        }
                    }
                    catch (Exception ex)
                    {
                        sc.Close();
                        Console.WriteLine(ex.Message);
                    }
                    finally
                    {
                        sc.Close();
                    }
                }


                //txt_Nationality.Text = dtStudentProfile.Rows[0]["strNationalityDescEn"].ToString();
                //string sPic = dtStudentProfile.Rows[0]["strStudentPic"].ToString();
                //hdfiUnifiedID.Value = dtStudentProfile.Rows[0]["iUnifiedID"].ToString();
                //string sDir = "Students";
                //if (sCampus == "Males")
                //{
                //    txt_Gender.Text = "Male";
                //}
                //else
                //{
                //    txt_Gender.Text = "Female";
                //}
            }
        }