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(); NowTimeUniversity timee = new NowTimeUniversity(); DataRow T = timee.drSearchYearANdSemester(); string semester = T["NowSemester"].ToString(); string Year = T["NowYear"].ToString(); int roww = Convert.ToInt32(Request.QueryString["id"]); string DateN = labDate.Text.ToString(); if (obj.UpdateShowStatus(roww, ID, Year, semester, DateN, Reason, "", 0, "", "", 0, "", 4) == 1) { txtStatus.Text = ""; SentMail s = new SentMail(); s.sendemailHead(ID); } errorLabel.Visible = false; } else { errorLabel.Text = " التوقيع المدخل خاطئ أو كلمة المرور"; errorLabel.Visible = true; } }
protected void btnSaveAcadimic_Click(object sender, EventArgs e) { bool Result = false; int ID = Convert.ToInt32(Session["ID"].ToString()); string Path = ""; string Data = txtNumberCourse1.Text.ToString() + txtAlternativeNum1C1.Text.ToString() + labHoursCourse1.Text.ToString() + labHoursAlternative.Text.ToString() + labDateAcadimic.Text.ToString() + rbtAcademic.SelectedValue.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) { AlternativeSub obj = new AlternativeSub(); int id = Convert.ToInt32(Request.QueryString["id"]); int AcceptAcadimic = Convert.ToInt32(rbtAcademic.SelectedValue.ToString()); if (obj.AcceptAcademicAdvisorAltiSubj(id, AcceptAcadimic) == 1) { DataRow dr = obj.drgetform(id); int STUid = Convert.ToInt32(dr["StudentID"].ToString()); SentMail s = new SentMail(); s.sendemailHead(STUid); Response.Redirect("ProcessRequestAcademic.aspx"); } errorAcadimic.Visible = false; } else { errorAcadimic.Text = "التوقيع المدخل خاطئ او كلمة المرور"; errorAcadimic.Visible = true; } }