Exemple #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            bool   Result = false;
            int    ID     = Convert.ToInt32(Session["ID"]);
            string Path   = "";
            string Data   = labDate.Text.ToString() + labStudentNumber.Text.ToString();

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

            if (Result == true)
            {
                string Reason = "";
                if (txtStatus.Text != string.Empty)
                {
                    Reason = txtStatus.Text.ToString();
                }
                ShowStatusClass   obj      = new ShowStatusClass();
                string            Datenow  = labDate.Text.ToString();
                NowTimeUniversity timee    = new NowTimeUniversity();
                DataRow           T        = timee.drSearchYearANdSemester();
                string            semester = T["NowSemester"].ToString();
                string            Year     = T["NowYear"].ToString();
                if (obj.AddShowStatus(ID, Year, semester, Datenow, Reason, "", 0, "", "", 0, "", 4) == 1)
                {
                    txtStatus.Text = "";
                    SentMail s = new SentMail();
                    s.sendemailHead(ID);
                    Response.Redirect("HomeStudent.aspx");
                }
                errorLabel.Visible = false;
            }
            else
            {
                errorLabel.Text    = " التوقيع المدخل خاطئ أو كلمة المرور";
                errorLabel.Visible = true;
            }
        }
Exemple #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string Reason = "";

            if (txtStatus.Text != string.Empty)
            {
                Reason = txtStatus.Text.ToString();
            }
            ShowStatusClass obj     = new ShowStatusClass();
            int             ID      = Convert.ToInt32(Session["ID"]);
            string          Datenow = labDate.Text.ToString();

            if (obj.AddShowStatus(ID, "", "", Datenow, Reason, "", 0, "", "", 0, "", 4) == 1)
            {
                txtStatus.Text = "";
            }
        }
Exemple #3
0
        protected void btnSave_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   = labDate.Text.ToString() + labStudentNumber.Text.ToString();

            if (fuSignatureStudent.HasFile)
            {
                string Private = fuSignatureStudent.FileName.ToString();
                Path = Path + Private;
                fuSignatureStudent.SaveAs(Server.MapPath("Test") + "/" + fuSignatureStudent.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 Reason = "";
                if (txtStatus.Text != string.Empty)
                {
                    Reason = txtStatus.Text.ToString();
                }
                ShowStatusClass obj     = new ShowStatusClass();
                string          Datenow = labDate.Text.ToString();
                if (obj.AddShowStatus(ID, "", "", Datenow, Reason, "", 0, "", "", 0, "", 4) == 1)
                {
                    txtStatus.Text = "";
                }
                errorLabel.Visible = false;
            }
            else
            {
                errorLabel.Text    = "التوقيع المدخل خاطئ";
                errorLabel.Visible = true;
            }
        }