Пример #1
0
        public void Accept(int ID)
        {
            DropSemester obj = new DropSemester();

            if (obj.AcceptRegDropSemester(ID) == 1)
            {
                fillGv();
            }
        }
Пример #2
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;
            }
        }