Exemplo n.º 1
0
        public void Accept(int ID)
        {
            DropSemester obj = new DropSemester();

            if (obj.AcceptHeadDropSemester(ID) == 1)
            {
                fillGv();
            }
        }
Exemplo n.º 2
0
        protected void btnSaveHead_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();

            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)
            {
                DropSemester obj        = new DropSemester();
                int          id         = Convert.ToInt32(Request.QueryString["id"]);
                int          AcceptHead = Convert.ToInt32(rbtAceptHead.SelectedValue.ToString());
                string       HeadDec    = txtDescriptionHead.Text.ToString();
                if (obj.AcceptHeadDropSemester(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;
            }
        }