Example #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string       date1  = DateTime.Today.ToString();
            string       Reason = txtReasons.Text.ToString();
            int          ID     = Convert.ToInt32(Session["ID"].ToString());
            DropSemester objsem = new DropSemester();

            if (objsem.AddDropSemester(ID, Reason, date1, "", 0, "", 0, "", 0, "", 0, "", 2) == 1)
            {
                txtReasons.Text = "";
            }
        }
Example #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            bool   Result = false;
            int    ID     = Convert.ToInt32(Session["ID"]);
            string Path   = "";

            string Data = labDate.Text.ToString() + txtNumHours.Text.ToString();

            if (fuSignature.HasFile)
            {
                string Private = fuSignature.FileName.ToString();
                Path = System.Web.HttpContext.Current.Server.MapPath("Test") + "/" + Private;
                string Pasword = txtPassSign.Text.ToString();

                fuSignature.SaveAs(Server.MapPath("Test") + "/" + fuSignature.FileName);
                SignatureStudents newSig     = new SignatureStudents();
                string            strencrypt = newSig.encrypet(Data, Path, Pasword);
                Result = newSig.Decreypt(strencrypt, ID);
            }
            if (Result == true)
            {
                string            date1     = labDate.Text.ToString();
                string            Reason    = txtReasons.Text.ToString();
                DropSemester      objsem    = new DropSemester();
                int               NumOFHour = Convert.ToInt32(txtNumHours.Text.ToString());
                NowTimeUniversity timee     = new NowTimeUniversity();
                DataRow           T         = timee.drSearchYearANdSemester();
                string            semester  = T["NowSemester"].ToString();
                string            Year      = T["NowYear"].ToString();

                if (objsem.AddDropSemester(ID, Year, semester, Reason, NumOFHour, date1, "", 0, "", 0, "", 0, "", 0, 0, "", 2) == 1)
                {
                    txtReasons.Text = "";
                    SentMail s = new SentMail();
                    s.sendemailAcadimic(ID);
                    Response.Redirect("HomeStudent.aspx");
                }
                errorLabel.Visible = false;
            }
            else
            {
                errorLabel.Text    = " التوقيع المدخل خاطئ أو كلمة المرور";
                errorLabel.Visible = true;
            }
        }
Example #3
0
        protected void Button1_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   = DateTime.Today.ToString() + txtNumHours.Text.ToString();

            if (fuSignature.HasFile)
            {
                string Private = fuSignature.FileName.ToString();
                Path = Path + Private;
                fuSignature.SaveAs(Server.MapPath("Test") + "/" + fuSignature.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       date1  = DateTime.Today.ToString();
                string       Reason = txtReasons.Text.ToString();
                DropSemester objsem = new DropSemester();

                if (objsem.AddDropSemester(ID, Reason, date1, "", 0, "", 0, "", 0, "", 0, "", 2) == 1)
                {
                    txtReasons.Text  = "";
                    txtNumHours.Text = "";
                }
                errorLabel.Visible = false;
            }
            else
            {
                errorLabel.Text    = "التوقيع المدخل خاطئ";
                errorLabel.Visible = true;
            }
        }