Exemple #1
0
        public void fillGv()
        {
            AbsenceExam obj  = new AbsenceExam();
            DataTable   TBL1 = obj.dtNotAcceptApsenceApplication();

            gvAbsenceExam.DataSource = TBL1;
            gvAbsenceExam.DataBind();
        }
Exemple #2
0
        public void NotAccept(int ID)
        {
            AbsenceExam obj = new AbsenceExam();

            if (obj.NotAcceptAbsenceExam(ID) == 1)
            {
                fillGv();
            }
        }
        private void fillGv()
        {
            int         ID   = Convert.ToInt32(Session["ID"].ToString());
            AbsenceExam obj  = new AbsenceExam();
            DataTable   TBL1 = obj.dtViewStudents(ID);

            gvAbsenseExam.DataSource = TBL1;
            gvAbsenseExam.DataBind();
        }
        protected void gvAbsenseExam_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            GridView grid = sender as GridView;

            if (e.CommandName == "dispaly1")
            {
                int rowIndex = int.Parse(e.CommandArgument.ToString());
                int val      = (int)this.gvAbsenseExam.DataKeys[rowIndex]["ID"];
                Response.Redirect("AbsenceExamAll.aspx?id=" + val);
            }
            else if (e.CommandName == "edit1")
            {
                int         rowIndex = int.Parse(e.CommandArgument.ToString());
                int         val      = (int)this.gvAbsenseExam.DataKeys[rowIndex]["ID"];
                AbsenceExam obj      = new AbsenceExam();
                DataRow     dr       = obj.dreditform(val);
                if (dr == null)
                {
                    fillGv();
                    errorLabel.Text      = "لا يمكن تعديل هذا الطلب";
                    errorLabel.Visible   = true;
                    errorLabel.ForeColor = Color.Red;
                }
                else
                {
                    Response.Redirect("AbsenceExamUpdate.aspx?id=" + val);
                }
            }
            else if (e.CommandName == "delete")
            {
                int         rowIndex = int.Parse(e.CommandArgument.ToString());
                int         val      = (int)this.gvAbsenseExam.DataKeys[rowIndex]["ID"];
                AbsenceExam obj      = new AbsenceExam();
                int         del      = obj.DeleteAbsenceExamSelected(val);
                errorLabel.Text    = del + "";
                errorLabel.Visible = true;
                if (del == 0)
                {
                    errorLabel.Text      = "لا يمكن حذف هذا الطلب لأنه  مكتمل";
                    errorLabel.Visible   = true;
                    errorLabel.ForeColor = Color.Red;
                }
                if (del == 1)
                {
                    errorLabel.Text      = "تمت العملية بنجاح";
                    errorLabel.Visible   = true;
                    errorLabel.ForeColor = Color.DarkGreen;
                }
            }
        }
        protected void btnSaveDean_Click(object sender, EventArgs e)
        {
            if (fuSignatureDean.HasFile && rbtAcceptDean.SelectedValue != null && txtDescriptionDean.Text != String.Empty)
            {
                bool   Result = false;
                int    ID     = Convert.ToInt32(Session["ID"].ToString());
                string Path   = "";
                string Data   = labNumberStudent.Text.ToString() + txtCourseNum1.Text.ToString() + txtCourseNum2.Text.ToString() +
                                txtCourseNum3.Text.ToString() + txtCourseNum4.Text.ToString() + txtDateCourse1.Text.ToString() + txtDateCourse2.Text.ToString() + txtDateCourse3.Text.ToString()
                                + txtDateCourse4.Text.ToString() + labDateDean.Text.ToString() + rbtAcceptDean.SelectedValue.ToString();
                if (fuSignatureDean.HasFile)
                {
                    string Private = fuSignatureDean.FileName.ToString();
                    Path = System.Web.HttpContext.Current.Server.MapPath("../Test") + "/" + Private;
                    string Pasword = txtPassSign.Text.ToString();
                    fuSignatureDean.SaveAs(Server.MapPath("../Test") + "/" + fuSignatureDean.FileName);
                    SignatureEmployee newSig     = new SignatureEmployee();
                    string            strencrypt = newSig.encrypet(Data, Path, Pasword);
                    Result = newSig.Decreypt(strencrypt, ID);
                }

                if (Result == true)
                {
                    AbsenceExam obj            = new AbsenceExam();
                    int         id             = Convert.ToInt32(Request.QueryString["id"]);
                    string      descrptionDean = txtDescriptionDean.Text.ToString();
                    int         AcceptDean     = Convert.ToInt32(rbtAcceptDean.SelectedValue.ToString());
                    if (obj.AcceptAbsenceExam(id, AcceptDean, descrptionDean) == 1)
                    {
                        DataRow  dr    = obj.drgetform(id);
                        int      STUid = Convert.ToInt32(dr["StudentID"].ToString());
                        SentMail s     = new SentMail();
                        s.sendemailStudent(STUid);
                        Response.Redirect("ProcessRequest2.aspx");
                    }

                    errorLabel.Visible = false;
                }
                else
                {
                    errorLabel.Text    = "التوقيع المدخل خاطئ او كلمة المرور";
                    errorLabel.Visible = true;
                }
            }
        }
        private void fillData()
        {
            AbsenceExam obj = new AbsenceExam();
            int         id  = Convert.ToInt32(Request.QueryString["id"]);
            DataRow     dr  = obj.drgetform(id);

            if (dr != null)
            {
                int      STUid  = Convert.ToInt32(dr["StudentID"].ToString());
                Studnets objStu = new Studnets();
                DataRow  Stu    = objStu.drSearchStudent(STUid);
                if (Stu != null)
                {
                    labStudentName.Text    = Stu["StudentName"].ToString();
                    labNumberStudent.Text  = Stu["UniversityID"].ToString();
                    labSectionStudent.Text = Stu["SectionName"].ToString();
                    labCollage.Text        = Stu["CollageName"].ToString();
                }

                labDate.Text        = dr["Date"].ToString();
                txtDateCourse1.Text = dr["Date1"].ToString();
                txtDateCourse2.Text = dr["Date2"].ToString();
                txtDateCourse3.Text = dr["Date3"].ToString();
                txtDateCourse3.Text = dr["Date4"].ToString();
                txtReason.Text      = dr["Description"].ToString();
                txtCourseNum1.Text  = dr["Subject1"].ToString();
                txtCourseNum2.Text  = dr["Subject2"].ToString();
                txtCourseNum3.Text  = dr["Subject3"].ToString();
                txtCourseNum4.Text  = dr["Subject4"].ToString();

                LinkButton1.Text = dr["Attachment1"].ToString();
                LinkButton2.Text = dr["Attachment2"].ToString();
                string           Year     = dr["Year"].ToString();
                string           Semester = dr["Semester"].ToString();
                RegistredCourses Subj     = new RegistredCourses();

                if (Convert.ToInt32(txtCourseNum1.Text.ToString()) != 0)
                {
                    int     Course1 = Convert.ToInt32(txtCourseNum1.Text.ToString());
                    DataRow Sub     = Subj.drSearchRegisterSubjectID(Course1, Year, Semester);
                    labTeacher1.Text = Sub["EmployeeName"].ToString();
                    ddlCourse1.Items.Insert(0, new ListItem(Sub["SubjectName"].ToString(), "0"));
                }
                if (Convert.ToInt32(txtCourseNum2.Text.ToString()) != 0)
                {
                    int     Course2 = Convert.ToInt32(txtCourseNum2.Text.ToString());
                    DataRow Sub     = Subj.drSearchRegisterSubjectID(Course2, Year, Semester);
                    labTeacher2.Text = Sub["EmployeeName"].ToString();
                    ddlCourse2.Items.Insert(0, new ListItem(Sub["SubjectName"].ToString(), "0"));
                }
                if (Convert.ToInt32(txtCourseNum3.Text.ToString()) != 0)
                {
                    int     Course3 = Convert.ToInt32(txtCourseNum3.Text.ToString());
                    DataRow Sub     = Subj.drSearchRegisterSubjectID(Course3, Year, Semester);
                    labTeacher3.Text = Sub["EmployeeName"].ToString();
                    ddlCourse3.Items.Insert(0, new ListItem(Sub["SubjectName"].ToString(), "0"));
                }
                if (Convert.ToInt32(txtCourseNum4.Text.ToString()) != 0)
                {
                    int     Course4 = Convert.ToInt32(txtCourseNum4.Text.ToString());
                    DataRow Sub     = Subj.drSearchRegisterSubjectID(Course4, Year, Semester);
                    labTeacher3.Text = Sub["EmployeeName"].ToString();
                    ddlCourse4.Items.Insert(0, new ListItem(Sub["SubjectName"].ToString(), "0"));
                }



                txtDescriptionDean.Text = dr["DeanDescription"].ToString();
                string DeanAccept = dr["DeanAccept"].ToString();
                if (DeanAccept == "1")
                {
                    rbtAcceptDean.SelectedValue = "1";
                }
                else if (DeanAccept == "2")
                {
                    rbtAcceptDean.SelectedValue = "2";
                }
            }
        }
Exemple #7
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();
                }
            }
        }
Exemple #8
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Result = false;


            int    ID   = Convert.ToInt32(Session["ID"].ToString());
            string Path = "";
            string Data = labNumberStudent.Text.ToString() + txtCourseNum1.Text.ToString() + txtCourseNum2.Text.ToString() +
                          txtCourseNum3.Text.ToString() + txtCourseNum4.Text.ToString() + txtDateCourse1.Text.ToString() + txtDateCourse2.Text.ToString() + txtDateCourse3.Text.ToString()
                          + txtDateCourse4.Text.ToString();

            if (fuSignatureStudent.HasFile)
            {
                string Private = fuSignatureStudent.FileName.ToString();
                Path = System.Web.HttpContext.Current.Server.MapPath("Test") + "/" + Private;
                string Pasword = txtPassSign.Text.ToString();
                fuSignatureStudent.SaveAs(Server.MapPath("Test") + "/" + fuSignatureStudent.FileName);
                SignatureStudents newSig     = new SignatureStudents();
                string            strencrypt = newSig.encrypet(Data, Path, Pasword);
                Result = newSig.Decreypt(strencrypt, ID);
            }

            if (Result == true)
            {
                int CourseNum1 = 0;
                int CourseNum2 = 0;
                int CourseNum3 = 0;
                int CourseNum4 = 0;

                if (txtCourseNum1.Text != string.Empty)
                {
                    CourseNum1 = Convert.ToInt32(txtCourseNum1.Text.ToString());
                }

                if (txtCourseNum2.Text != string.Empty)
                {
                    CourseNum2 = Convert.ToInt32(txtCourseNum2.Text.ToString());
                }

                if (txtCourseNum3.Text != string.Empty)
                {
                    CourseNum3 = Convert.ToInt32(txtCourseNum3.Text.ToString());
                }

                if (txtCourseNum4.Text != string.Empty)
                {
                    CourseNum4 = Convert.ToInt32(txtCourseNum4.Text.ToString());
                }

                string ExamCourse1Date = txtDateCourse1.Text.ToString();

                string ExamCourse2Date = txtDateCourse2.Text.ToString();
                string ExamCourse3Date = txtDateCourse3.Text.ToString();
                string ExamCourse4Date = txtDateCourse4.Text.ToString();

                string Reason = txtReason.Text.ToString();

                string strReasonFile  = "";
                string strReasonFile2 = "";
                if (fuDetiels1.HasFile)
                {
                    strReasonFile = fuDetiels1.FileName.ToString();
                    fuDetiels1.SaveAs(Server.MapPath("../UploadFiles") + "/" + fuDetiels1.FileName);
                }

                if (fuDetiels2.HasFile)
                {
                    strReasonFile2 = fuDetiels2.FileName.ToString();

                    fuDetiels2.SaveAs(Server.MapPath("../UploadFiles") + "/" + fuDetiels2.FileName);
                }
                string      date  = labDate.Text.ToString();
                AbsenceExam obj11 = new AbsenceExam();

                NowTimeUniversity timee    = new NowTimeUniversity();
                DataRow           T        = timee.drSearchYearANdSemester();
                string            semester = T["NowSemester"].ToString();
                string            Year     = T["NowYear"].ToString();

                if (obj11.AddAbsenceExam(ID, date, Year, semester, CourseNum1, ExamCourse1Date, CourseNum2, ExamCourse2Date, CourseNum3, ExamCourse3Date, CourseNum4, ExamCourse4Date, Reason, strReasonFile, strReasonFile2, 0, "", 1) == 1)
                {
                    txtReason.Text           = "";
                    txtCourseNum1.Text       = "";
                    ddlCourse1.SelectedIndex = -1;
                    ddlCourse2.SelectedIndex = -1;
                    ddlCourse3.SelectedIndex = -1;
                    ddlCourse4.SelectedIndex = -1;
                    labTeacher1.Text         = "";
                    labTeacher2.Text         = "";
                    labTeacher3.Text         = "";
                    labTeacher4.Text         = "";

                    SentMail s = new SentMail();
                    s.sendemailDean(ID);
                    Response.Redirect("HomeStudent.aspx");
                }
                errorLabel.Visible = false;
            }



            else
            {
                errorLabel.Text    = "التوقيع المدخل خاطئ أو كلمة المرور";
                errorLabel.Visible = true;
            }
        }
Exemple #9
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Result = false;


            int ID = Convert.ToInt32(Session["ID"].ToString());

            string Path = "C:/Users/Dua'a-Orcas/Desktop/WebApplication1/WebApplication1/WebApplication1/PageStudents/Test/";
            string Data = labNumberStudent.Text.ToString() + txtCourseNum1.Text.ToString() + txtCourseNum2.Text.ToString() +
                          txtCourseNum3.Text.ToString() + txtCourseNum4.Text.ToString() + txtDateCourse1.Text.ToString() + txtDateCourse2.Text.ToString() + txtDateCourse3.Text.ToString()
                          + txtDateCourse4.Text.ToString();

            if (fuSignatureStudent.HasFile)
            {
                string Private = fuSignatureStudent.FileName.ToString();
                Path = Path + Private;
                fuSignatureStudent.SaveAs(Server.MapPath("Test") + "/" + fuSignatureStudent.FileName);
                //  Path = "/Test/" + fuSignatureStudent.FileName;
                SignatureStudents newSig     = new SignatureStudents();
                string            strencrypt = newSig.encrypet(Data, Path, ID);
                Result = newSig.Decreypt(strencrypt, ID);
            }

            if (Result == true)
            {
                int CourseNum1 = 0;
                int CourseNum2 = 0;
                int CourseNum3 = 0;
                int CourseNum4 = 0;

                if (txtCourseNum1.Text != string.Empty)
                {
                    CourseNum1 = Convert.ToInt32(txtCourseNum1.Text.ToString());
                }

                if (txtCourseNum2.Text != string.Empty)
                {
                    CourseNum2 = Convert.ToInt32(txtCourseNum2.Text.ToString());
                }

                if (txtCourseNum3.Text != string.Empty)
                {
                    CourseNum3 = Convert.ToInt32(txtCourseNum3.Text.ToString());
                }

                if (txtCourseNum4.Text != string.Empty)
                {
                    CourseNum4 = Convert.ToInt32(txtCourseNum4.Text.ToString());
                }

                string ExamCourse1Date = txtDateCourse1.Text.ToString();

                string ExamCourse2Date = txtDateCourse2.Text.ToString();
                string ExamCourse3Date = txtDateCourse3.Text.ToString();
                string ExamCourse4Date = txtDateCourse4.Text.ToString();

                string Reason = txtReason.Text.ToString();

                string strReasonFile  = "";
                string strReasonFile2 = "";
                if (fuDetiels1.HasFile)
                {
                    strReasonFile = fuDetiels1.FileName.ToString();
                    fuDetiels1.SaveAs(Server.MapPath("UploadFiles") + "/" + fuDetiels1.FileName);
                }

                if (fuDetiels2.HasFile)
                {
                    strReasonFile2 = fuDetiels2.FileName.ToString();

                    fuDetiels2.SaveAs(Server.MapPath("UploadFiles") + "/" + fuDetiels2.FileName);
                }

                AbsenceExam obj11 = new AbsenceExam();



                if (obj11.AddAbsenceExam(ID, CourseNum1, ExamCourse1Date, CourseNum2, ExamCourse2Date, CourseNum3, ExamCourse3Date, CourseNum4, ExamCourse4Date, 0, "", Reason, strReasonFile, strReasonFile2, 1) == 1)
                {
                    txtReason.Text           = "";
                    txtCourseNum1.Text       = "";
                    ddlCourse1.SelectedIndex = -1;
                    ddlCourse2.SelectedIndex = -1;
                    ddlCourse3.SelectedIndex = -1;
                    ddlCourse4.SelectedIndex = -1;
                    labTeacher1.Text         = "";
                    labTeacher2.Text         = "";
                    labTeacher3.Text         = "";
                    labTeacher4.Text         = "";
                }
                errorLabel.Visible = false;
            }



            else
            {
                errorLabel.Text    = "التوقيع المدخل خاطئ";
                errorLabel.Visible = true;
            }
        }
Exemple #10
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int CourseNum1 = 0;
            int CourseNum2 = 0;
            int CourseNum3 = 0;
            int CourseNum4 = 0;

            if (txtCourseNum1.Text != string.Empty)
            {
                CourseNum1 = Convert.ToInt32(txtCourseNum1.Text.ToString());
            }

            if (txtCourseNum2.Text != string.Empty)
            {
                CourseNum2 = Convert.ToInt32(txtCourseNum2.Text.ToString());
            }

            if (txtCourseNum3.Text != string.Empty)
            {
                CourseNum3 = Convert.ToInt32(txtCourseNum3.Text.ToString());
            }

            if (txtCourseNum4.Text != string.Empty)
            {
                CourseNum4 = Convert.ToInt32(txtCourseNum4.Text.ToString());
            }

            string ExamCourse1Date = txtDateCourse1.Text.ToString();

            string ExamCourse2Date = txtDateCourse2.Text.ToString();
            string ExamCourse3Date = txtDateCourse3.Text.ToString();
            string ExamCourse4Date = txtDateCourse4.Text.ToString();

            string Reason = txtReason.Text.ToString();

            string strReasonFile  = "";
            string strReasonFile2 = "";

            if (fuDetiels1.HasFile)
            {
                strReasonFile = fuDetiels1.FileName.ToString();
                fuDetiels1.SaveAs(Server.MapPath("UploadFiles") + "/" + fuDetiels1.FileName);
            }

            if (fuDetiels2.HasFile)
            {
                strReasonFile2 = fuDetiels2.FileName.ToString();

                fuDetiels2.SaveAs(Server.MapPath("UploadFiles") + "/" + fuDetiels2.FileName);
            }

            AbsenceExam obj11 = new AbsenceExam();


            int ID = Convert.ToInt32(Session["ID"].ToString());

            if (obj11.AddAbsenceExam(ID, CourseNum1, ExamCourse1Date, CourseNum2, ExamCourse2Date, CourseNum3, ExamCourse3Date, CourseNum4, ExamCourse4Date, 0, "", Reason, strReasonFile, strReasonFile2, 1) == 1)
            {
                txtReason.Text           = "";
                txtCourseNum1.Text       = "";
                ddlCourse1.SelectedIndex = -1;
                ddlCourse2.SelectedIndex = -1;
                ddlCourse3.SelectedIndex = -1;
                ddlCourse4.SelectedIndex = -1;
            }
        }