public void Accept(int ID)
        {
            DropSemester obj = new DropSemester();

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

            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)
            {
                DropSemester obj            = new DropSemester();
                int          id             = Convert.ToInt32(Request.QueryString["id"]);
                int          AcceptAcadimic = Convert.ToInt32(rbtAcceptAcadimic.SelectedValue.ToString());
                string       AcadimicDec    = txtDescriptionAcadimic.Text.ToString();
                if (obj.AcceptAcademicAdvisorDropSemester(id, AcceptAcadimic, AcadimicDec) == 1)
                {
                    DataRow dr    = obj.drgetform(id);
                    int     STUid = Convert.ToInt32(dr["StudentID"].ToString());

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

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