示例#1
0
        protected void btnSave_Click(object sender, EventArgs e)

        {
            int               ID       = Convert.ToInt32(Session["ID"].ToString());
            string            password = txtPassword.Text.ToString();
            string            Email    = labEmail.Text.ToString();
            SignatureEmployee objj     = new SignatureEmployee();

            objj.CreateSignature(password, Email, ID);
            string pathPub = System.Web.HttpContext.Current.Server.MapPath("../PageEmployee/Sig") + "/" + ID + ".asc";

            string PrivateKey = "Sig/" + ID + "pr" + ".asc";
            GetKey objKey     = new GetKey();

            objKey.AddKeyEmployee(pathPub, ID);
            downloadfile(PrivateKey);
        }
        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;
                }
            }
        }
        protected void btnSaveHead_Click(object sender, EventArgs e)
        {
            bool   Result = false;
            int    ID     = Convert.ToInt32(Session["ID"].ToString());
            string Path   = "";
            string Data   = txtNumCourse1.Text.ToString() + txtNumCourse2.Text.ToString() + txtNumCourse3.Text.ToString() +
                            txtNmberHours.Text.ToString() + txtNumHourAfter.Text.ToString() + DateTime.Today.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)
            {
                PullCourseClass obj        = new PullCourseClass();
                int             id         = Convert.ToInt32(Request.QueryString["id"]);
                int             AcceptHead = Convert.ToInt32(rbtAceptHead.SelectedValue.ToString());
                string          HeadDec    = txtDescriptionHead.Text.ToString();
                if (obj.AcceptHeadPullCourse(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;
            }
        }
        protected void btnSaveAcadimic_Click(object sender, EventArgs e)
        {
            bool   Result = false;
            int    ID     = Convert.ToInt32(Session["ID"].ToString());
            string Path   = "";
            string Data   = txtNumberCourse1.Text.ToString() + txtAlternativeNum1C1.Text.ToString() +
                            labHoursCourse1.Text.ToString() + labHoursAlternative.Text.ToString() + labDateAcadimic.Text.ToString() + rbtAcademic.SelectedValue.ToString();

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

            if (Result == true)
            {
                AlternativeSub obj            = new AlternativeSub();
                int            id             = Convert.ToInt32(Request.QueryString["id"]);
                int            AcceptAcadimic = Convert.ToInt32(rbtAcademic.SelectedValue.ToString());
                if (obj.AcceptAcademicAdvisorAltiSubj(id, AcceptAcadimic) == 1)
                {
                    DataRow dr    = obj.drgetform(id);
                    int     STUid = Convert.ToInt32(dr["StudentID"].ToString());

                    SentMail s = new SentMail();
                    s.sendemailHead(STUid);
                    Response.Redirect("ProcessRequestAcademic.aspx");
                }

                errorAcadimic.Visible = false;
            }
            else
            {
                errorAcadimic.Text    = "التوقيع المدخل خاطئ او كلمة المرور";
                errorAcadimic.Visible = true;
            }
        }
示例#5
0
        protected void btnSaveReg_Click(object sender, EventArgs e)
        {
            bool   Result = false;
            int    ID     = Convert.ToInt32(Session["ID"].ToString());
            string Path   = "";
            string Data   = DateTime.Today.ToString() + txtNumHours.Text.ToString() + labDate.Text.ToString() + rbtAceptHead.SelectedValue.ToString() + rbtAcceptAcadimic.SelectedValue.ToString()
                            + rbtDeanAccept.SelectedValue.ToString() + rbtDepAcept.SelectedValue.ToString() + rbtAcceptRegistration.SelectedValue.ToString();

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

            if (Result == true)
            {
                DropSemester obj       = new DropSemester();
                int          id        = Convert.ToInt32(Request.QueryString["id"]);
                int          AcceptReg = Convert.ToInt32(rbtAcceptRegistration.SelectedValue.ToString());
                string       RegDec    = txtDescriptionReg.Text.ToString();
                if (obj.AcceptRegDropSemester(id, AcceptReg, RegDec) == 1)
                {
                    DataRow  dr    = obj.drgetform(id);
                    int      STUid = Convert.ToInt32(dr["StudentID"].ToString());
                    SentMail s     = new SentMail();
                    s.sendemailStudent(STUid);
                    Response.Redirect("ProcessRequestReg.aspx");
                }

                errorReg.Visible = false;
            }
            else
            {
                errorReg.Text    = "التوقيع المدخل خاطئ او كلمة المرور";
                errorReg.Visible = true;
            }
        }
        protected void btnSaveDean_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() + 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)
            {
                ShowStatusClass obj        = new ShowStatusClass();
                int             id         = Convert.ToInt32(Request.QueryString["id"]);
                int             AcceptDean = Convert.ToInt32(rbtAcceptDean.SelectedValue.ToString());
                string          DeanDec    = txtDescriptionDean.Text.ToString();
                if (obj.AcceptDeanShowStatus(id, AcceptDean, DeanDec) == 1)
                {
                    DataRow  dr    = obj.drgetform(id);
                    int      STUid = Convert.ToInt32(dr["StudentID"].ToString());
                    SentMail s     = new SentMail();
                    s.sendemailStudent(STUid);
                    Response.Redirect("ProcessRequest2.aspx");
                }

                errorDean.Visible = false;
            }
            else
            {
                errorDean.Text    = "التوقيع المدخل خاطئ او كلمة المرور";
                errorDean.Visible = true;
            }
        }
示例#7
0
        protected void btnSaveDean_Click(object sender, EventArgs e)
        {
            bool   Result = false;
            int    ID     = Convert.ToInt32(Session["ID"].ToString());
            string Path   = "";
            string Data   = labDate.Text.ToString() + txtYear.Text.ToString() + rbtAcceptRegistration.SelectedValue.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)
            {
                DelaySemesterClass obj = new DelaySemesterClass();
                int    id              = Convert.ToInt32(Request.QueryString["id"]);
                int    AcceptDean      = Convert.ToInt32(rbtAcceptDean.SelectedValue.ToString());
                string DeanDescription = txtDescriptionDean.Text.ToString();
                if (obj.AcceptDeanDelaySemester(id, AcceptDean, DeanDescription) == 1)
                {
                    Response.Redirect("ProcessRequest2.aspx");
                }

                errorDean.Visible = false;
            }
            else
            {
                errorDean.Text    = "التوقيع المدخل خاطئ او كلمة المرور";
                errorDean.Visible = true;
            }
        }