private void fillData()
        {
            ShowStatusClass obj = new ShowStatusClass();
            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();
                    labStudentNumber.Text = Stu["UniversityID"].ToString();
                    labSection.Text       = Stu["SectionName"].ToString();
                    labCollage.Text       = Stu["CollageName"].ToString();
                    labMager.Text         = Stu["mager"].ToString();
                }
                txtStatus.Text          = dr["Description"].ToString();
                labDate.Text            = dr["Date"].ToString();
                labDateDean.Text        = DateTime.UtcNow.ToString("yyyy-MM-dd");
                txtDescriptionHead.Text = dr["HeadDescription"].ToString();
                string HeadAccept = dr["HeadAccept"].ToString();
                if (HeadAccept == "1")
                {
                    rbtAceptHead.SelectedValue = "1";
                }
                else if (HeadAccept == "2")
                {
                    rbtAceptHead.SelectedValue = "2";
                }
            }
        }
        private void fillGv()
        {
            ShowStatusClass obj  = new ShowStatusClass();
            DataTable       TBL1 = obj.dtNotAcceptDeanShowStatusApplication();

            gvShowStatus.DataSource = TBL1;
            gvShowStatus.DataBind();
        }
        public void NotAccept(int ID)
        {
            ShowStatusClass obj = new ShowStatusClass();

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

            gvShowStaus.DataSource = TBL1;
            gvShowStaus.DataBind();
        }
        public void Accept(int ID)
        {
            ShowStatusClass obj = new ShowStatusClass();

            if (obj.AcceptHeadShowStatus(ID) == 1)
            {
                fillGv();
            }
        }
        protected void gvShowStaus_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.gvShowStaus.DataKeys[rowIndex]["ID"];
                Response.Redirect("ShowStatusDispalyAll.aspx?id=" + val);
            }
            else if (e.CommandName == "edit1")
            {
                int             rowIndex = int.Parse(e.CommandArgument.ToString());
                int             val      = (int)this.gvShowStaus.DataKeys[rowIndex]["ID"];
                ShowStatusClass obj      = new ShowStatusClass();
                DataRow         dr       = obj.drEditgetform(val);
                if (dr == null)
                {
                    fillGv();
                    errorLabel.Text      = "لا يمكن تعديل هذا الطلب";
                    errorLabel.Visible   = true;
                    errorLabel.ForeColor = Color.Red;
                }
                else
                {
                    Response.Redirect("ShowStatusUpdate.aspx?id=" + val);
                }
            }
            else if (e.CommandName == "delete")
            {
                int             rowIndex = int.Parse(e.CommandArgument.ToString());
                int             val      = (int)this.gvShowStaus.DataKeys[rowIndex]["ID"];
                ShowStatusClass obj      = new ShowStatusClass();
                int             del      = obj.DeleteShowStatusStudents(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;
                }
            }
        }
示例#7
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            bool   Result = false;
            int    ID     = Convert.ToInt32(Session["ID"]);
            string Path   = "";
            string Data   = labDate.Text.ToString() + labStudentNumber.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)
            {
                string Reason = "";
                if (txtStatus.Text != string.Empty)
                {
                    Reason = txtStatus.Text.ToString();
                }
                ShowStatusClass obj = new ShowStatusClass();

                NowTimeUniversity timee    = new NowTimeUniversity();
                DataRow           T        = timee.drSearchYearANdSemester();
                string            semester = T["NowSemester"].ToString();
                string            Year     = T["NowYear"].ToString();
                int    roww  = Convert.ToInt32(Request.QueryString["id"]);
                string DateN = labDate.Text.ToString();
                if (obj.UpdateShowStatus(roww, ID, Year, semester, DateN, Reason, "", 0, "", "", 0, "", 4) == 1)
                {
                    txtStatus.Text = "";
                    SentMail s = new SentMail();
                    s.sendemailHead(ID);
                }
                errorLabel.Visible = false;
            }
            else
            {
                errorLabel.Text    = " التوقيع المدخل خاطئ أو كلمة المرور";
                errorLabel.Visible = true;
            }
        }
示例#8
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string Reason = "";

            if (txtStatus.Text != string.Empty)
            {
                Reason = txtStatus.Text.ToString();
            }
            ShowStatusClass obj     = new ShowStatusClass();
            int             ID      = Convert.ToInt32(Session["ID"]);
            string          Datenow = labDate.Text.ToString();

            if (obj.AddShowStatus(ID, "", "", Datenow, Reason, "", 0, "", "", 0, "", 4) == 1)
            {
                txtStatus.Text = "";
            }
        }
示例#9
0
        protected void btnSaveHead_Click(object sender, EventArgs e)
        {
            bool   Result = false;
            int    ID     = Convert.ToInt32(Session["ID"].ToString());
            string Path   = "";
            string Data   = labDate.Text.ToString() + labStudentNumber.Text.ToString() + rbtAceptHead.SelectedValue.ToString();

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

            if (Result == true)
            {
                ShowStatusClass obj        = new ShowStatusClass();
                int             id         = Convert.ToInt32(Request.QueryString["id"]);
                int             AcceptHead = Convert.ToInt32(rbtAceptHead.SelectedValue.ToString());
                string          HeadDec    = txtDescriptionHead.Text.ToString();
                if (obj.AcceptHeadShowStatus(id, AcceptHead, HeadDec) == 1)
                {
                    DataRow dr    = obj.drgetform(id);
                    int     STUid = Convert.ToInt32(dr["StudentID"].ToString());

                    SentMail s = new SentMail();
                    s.sendemailDean(STUid);
                    Response.Redirect("ProcessRequest.aspx");
                }

                errorHead.Visible = false;
            }
            else
            {
                errorHead.Text    = "التوقيع المدخل خاطئ او كلمة المرور";
                errorHead.Visible = true;
            }
        }
示例#10
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            bool   Result = false;
            int    ID     = Convert.ToInt32(Session["ID"]);
            string Path   = "C:/Users/Dua'a-Orcas/Desktop/WebApplication1/WebApplication1/WebApplication1/PageStudents/Test/";
            string Data   = labDate.Text.ToString() + labStudentNumber.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)
            {
                string Reason = "";
                if (txtStatus.Text != string.Empty)
                {
                    Reason = txtStatus.Text.ToString();
                }
                ShowStatusClass obj     = new ShowStatusClass();
                string          Datenow = labDate.Text.ToString();
                if (obj.AddShowStatus(ID, "", "", Datenow, Reason, "", 0, "", "", 0, "", 4) == 1)
                {
                    txtStatus.Text = "";
                }
                errorLabel.Visible = false;
            }
            else
            {
                errorLabel.Text    = "التوقيع المدخل خاطئ";
                errorLabel.Visible = true;
            }
        }
示例#11
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();
                }
            }
        }