Пример #1
0
        private void fillGv()
        {
            PullCourseClass obj  = new PullCourseClass();
            DataTable       TBL1 = obj.dtNotAcceptDeanPullCourseApplication();

            gvPullCourse.DataSource = TBL1;
            gvPullCourse.DataBind();
        }
Пример #2
0
        protected void ddlRequest_SelectedIndexChanged(object sender, EventArgs e)
        {
            int      ID       = Convert.ToInt32(Session["ID"].ToString());
            Position emp      = new Position();
            DataRow  dr       = emp.drSearchEmployeePosition(ID);
            int      position = Convert.ToInt32(dr["Position"].ToString());

            if (position == 2)
            {
                Employee info      = new Employee();
                DataRow  section   = info.drSearchEmployeeSection(ID);
                int      sec       = Convert.ToInt32(section["SectionID"].ToString());
                College  col       = new College();
                DataRow  college   = col.drSearchColloge(sec);
                int      Collegeid = Convert.ToInt32(college["CollegeID"].ToString());


                if (ddlRequest.SelectedIndex != 0 && ddlRequest.SelectedIndex != -1)
                {
                    if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 1)
                    {
                        ShowStatusClass obj = new ShowStatusClass();
                        DataTable       dt  = obj.dtNotAcceptDeanShowStatusApplication(Collegeid);
                        gvRequest.DataSource = dt;
                        gvRequest.DataBind();
                    }
                    else if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 2)
                    {
                        PullCourseClass obj = new PullCourseClass();
                        DataTable       dt  = obj.dtNotAcceptDeanPullCourseApplication(Collegeid);
                        gvRequest.DataSource = dt;
                        gvRequest.DataBind();
                    }
                    else if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 3)
                    {
                        AbsenceExam obj = new AbsenceExam();
                        DataTable   dt  = obj.dtNotAcceptDeanAbsenceExamApplication(Collegeid);
                        gvRequest.DataSource = dt;
                        gvRequest.DataBind();
                    }
                    else if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 4)
                    {
                        AlternativeSub obj = new AlternativeSub();
                        DataTable      dt  = obj.dtNotAcceptDeanAltSubApplication(Collegeid);
                        gvRequest.DataSource = dt;
                        gvRequest.DataBind();
                    }
                    else if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 5)
                    {
                        DropSemester obj = new DropSemester();
                        DataTable    dt  = obj.dtNotAcceptDeanDropSemesterApplication(Collegeid);
                        gvRequest.DataSource = dt;
                        gvRequest.DataBind();
                    }
                    else if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 6)
                    {
                        DelaySemesterClass obj = new DelaySemesterClass();
                        DataTable          dt  = obj.dtNotAcceptDeanDelaySemesterApplication(Collegeid);
                        gvRequest.DataSource = dt;
                        gvRequest.DataBind();
                    }
                }
            }
            else if (position == 3)
            {
                Employee info    = new Employee();
                DataRow  section = info.drSearchEmployeeSection(ID);
                int      sec     = Convert.ToInt32(section["SectionID"].ToString());
                if (ddlRequest.SelectedIndex != 0 && ddlRequest.SelectedIndex != -1)
                {
                    if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 1)
                    {
                        ShowStatusClass obj = new ShowStatusClass();
                        DataTable       dt  = obj.dtNotAcceptHeadShowStatusApplication(sec);
                        gvRequest.DataSource = dt;
                        gvRequest.DataBind();
                    }
                    else if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 2)
                    {
                        PullCourseClass obj = new PullCourseClass();
                        DataTable       dt  = obj.dtNotAcceptHeadPullCourseApplication(sec);
                        gvRequest.DataSource = dt;
                        gvRequest.DataBind();
                    }

                    else if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 4)
                    {
                        AlternativeSub obj = new AlternativeSub();
                        DataTable      dt  = obj.dtNotAcceptHeadAltSubApplication(sec);
                        gvRequest.DataSource = dt;
                        gvRequest.DataBind();
                    }
                    else if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 5)
                    {
                        DropSemester obj = new DropSemester();
                        DataTable    dt  = obj.dtNotAcceptHeadDropSemesterApplication(sec);
                        gvRequest.DataSource = dt;
                        gvRequest.DataBind();
                    }
                }
            }
            else if (position == 5)
            {
                if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 6)
                {
                    DelaySemesterClass obj = new DelaySemesterClass();
                    DataTable          dt  = obj.dtNotAcceptRegestDelaySemesterApplication();
                    gvRequest.DataSource = dt;
                    gvRequest.DataBind();
                }
                else if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 2)
                {
                    PullCourseClass obj = new PullCourseClass();
                    DataTable       dt  = obj.dtNotAcceptRegPullCourseApplication();
                    gvRequest.DataSource = dt;
                    gvRequest.DataBind();
                }

                else if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 4)
                {
                    AlternativeSub obj = new AlternativeSub();
                    DataTable      dt  = obj.dtNotAcceptHeadAltSubApplication();
                    gvRequest.DataSource = dt;
                    gvRequest.DataBind();
                }
                else if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 5)
                {
                    DropSemester obj = new DropSemester();
                    DataTable    dt  = obj.dtNotAcceptRegDropSemesterApplication();
                    gvRequest.DataSource = dt;
                    gvRequest.DataBind();
                }
            }
            else if (position == 1)
            {
                if (Convert.ToInt32(ddlRequest.SelectedValue.ToString()) == 5)
                {
                    DropSemester obj = new DropSemester();
                    DataTable    dt  = obj.dtNotAcceptDeputyAcademicAcceptDropSemesterApplication();
                    gvRequest.DataSource = dt;
                    gvRequest.DataBind();
                }
            }
        }