protected void btnSave_Click(object sender, EventArgs e) { bool Result = false; int ID = Convert.ToInt32(Session["ID"]); string Path = ""; string Data = labDate.Text.ToString() + txtYear.Text.ToString(); if (fuSignatureStudent.HasFile) { string Private = fuSignatureStudent.FileName.ToString(); Path = System.Web.HttpContext.Current.Server.MapPath("Test") + "/" + fuSignatureStudent.FileName.ToString(); fuSignatureStudent.SaveAs(Server.MapPath("Test") + "/" + fuSignatureStudent.FileName); SignatureStudents newSig = new SignatureStudents(); string Pasword = txtPassSign.Text.ToString(); string strencrypt = newSig.encrypet(Data, Path, Pasword); Result = newSig.Decreypt(strencrypt, ID); } if (Result == true) { int row = Convert.ToInt32(Request.QueryString["id"]); string Reason = ""; string year = ""; string semester = ""; if (txtStatus.Text != string.Empty) { Reason = txtStatus.Text.ToString(); } if (txtYear.Text != string.Empty) { year = txtYear.Text.ToString(); } if (ddlSemester.SelectedIndex != 0 && ddlSemester.SelectedIndex != -1) { semester = ddlSemester.Text.ToString(); } DelaySemesterClass obj = new DelaySemesterClass(); string Datenow = labDate.Text.ToString(); NowTimeUniversity timee = new NowTimeUniversity(); DataRow T = timee.drSearchYearANdSemester(); string nowsemester = T["NowSemester"].ToString(); string nowYear = T["NowYear"].ToString(); if (obj.UpdateDelaySemester(row, ID, nowYear, nowsemester, year, semester, Reason, Datenow) == 1) { txtStatus.Text = ""; ddlSemester.SelectedIndex = 0; txtYear.Text = ""; SentMail s = new SentMail(); s.sendemailReg(); } errorLabel.Visible = false; } else { errorLabel.Text = " التوقيع المدخل خاطئ أو كلمة المرور"; errorLabel.Visible = true; } }
protected void Button1_Click(object sender, EventArgs e) { bool Result = false; int ID = Convert.ToInt32(Session["ID"]); string Path = ""; string Data = DateTime.Today.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 = DateTime.Today.ToString(); string Reason = txtReasons.Text.ToString(); DropSemester objsem = new DropSemester(); int NumOFHour = Convert.ToInt32(txtNumHours.Text.ToString()); int roww = Convert.ToInt32(Request.QueryString["id"]); NowTimeUniversity timee = new NowTimeUniversity(); DataRow T = timee.drSearchYearANdSemester(); string year = T["NowYear"].ToString(); string Semester = T["NowSemester"].ToString(); if (objsem.UpdateDropSemester(roww, ID, year, Semester, Reason, NumOFHour, date1, "", 0, "", 0, "", 0, "", 0, 0, "", 2) == 1) { Response.Redirect("DropSemesterDisplay.aspx"); } errorLabel.Visible = false; } else { errorLabel.Text = "التوقيع المدخل خاطئ"; errorLabel.Visible = true; } }
protected void btnSave_Click(object sender, EventArgs e) { bool Result = false; //Define Avariable int CourseNum1 = 0; int AlternativeCourseNum1 = 0; string TypeCouseNum1 = ""; string Reason = ""; int row = Convert.ToInt32(Request.QueryString["id"]); int ID = Convert.ToInt32(Session["ID"].ToString()); string Path = ""; string Data = txtNumberCourse1.Text.ToString() + txtAlternativeNum1C1.Text.ToString() + labHoursCourse1.Text.ToString() + labHoursAlternative.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); // Path = "/Test/" + fuSignatureStudent.FileName; SignatureStudents newSig = new SignatureStudents(); string strencrypt = newSig.encrypet(Data, Path, Pasword); Result = newSig.Decreypt(strencrypt, ID); } if (Result == true) { //Check input Data if (txtNumberCourse1.Text != String.Empty) { CourseNum1 = Convert.ToInt32(txtNumberCourse1.Text.ToString()); } if (txtAlternativeNum1C1.Text != String.Empty) { AlternativeCourseNum1 = Convert.ToInt32(txtAlternativeNum1C1.Text.ToString()); } if (labTypeCourse1.Text != String.Empty) { TypeCouseNum1 = labTypeCourse1.Text.ToString(); } if (txtReason.Text != String.Empty) { Reason = txtReason.Text.ToString(); } AlternativeSub obj = new AlternativeSub(); NowTimeUniversity timee = new NowTimeUniversity(); DataRow T = timee.drSearchYearANdSemester(); string semester = T["NowSemester"].ToString(); string Year = T["NowYear"].ToString(); string Date1 = labDate.Text.ToString(); if (obj.UpdateAlternativeSubject(row, ID, Year, semester, Date1, CourseNum1, TypeCouseNum1, AlternativeCourseNum1, Reason) == 1) { ddlCourse1.SelectedIndex = -1; ddlAlternativeCourse1.SelectedIndex = -1; txtReason.Text = ""; ddlAlternativeCourse1.SelectedIndex = -1; txtAlternativeNum1C1.Text = ""; txtNumberCourse1.Text = ""; labTypeCourse1.Text = ""; labHoursCourse1.Text = ""; labHoursAlternative.Text = ""; SentMail s = new SentMail(); s.sendemailAcadimic(ID); } errorLabel.Visible = false; } else { errorLabel.Text = "التوقيع المدخل خاطئ أو كلمة المرور"; errorLabel.Visible = true; } }
protected void btnSave_Click(object sender, EventArgs e) { bool Result = false; int ID = Convert.ToInt32(Session["ID"].ToString()); string Path = ""; string Data = labNumberStudent.Text.ToString() + txtCourseNum1.Text.ToString() + txtCourseNum2.Text.ToString() + txtCourseNum3.Text.ToString() + txtCourseNum4.Text.ToString() + txtDateCourse1.Text.ToString() + txtDateCourse2.Text.ToString() + txtDateCourse3.Text.ToString() + txtDateCourse4.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) { int row = Convert.ToInt32(Request.QueryString["id"]); int CourseNum1 = 0; int CourseNum2 = 0; int CourseNum3 = 0; int CourseNum4 = 0; if (txtCourseNum1.Text != string.Empty) { CourseNum1 = Convert.ToInt32(txtCourseNum1.Text.ToString()); } if (txtCourseNum2.Text != string.Empty) { CourseNum2 = Convert.ToInt32(txtCourseNum2.Text.ToString()); } if (txtCourseNum3.Text != string.Empty) { CourseNum3 = Convert.ToInt32(txtCourseNum3.Text.ToString()); } if (txtCourseNum4.Text != string.Empty) { CourseNum4 = Convert.ToInt32(txtCourseNum4.Text.ToString()); } string ExamCourse1Date = txtDateCourse1.Text.ToString(); string ExamCourse2Date = txtDateCourse2.Text.ToString(); string ExamCourse3Date = txtDateCourse3.Text.ToString(); string ExamCourse4Date = txtDateCourse4.Text.ToString(); string Reason = txtReason.Text.ToString(); string strReasonFile = ""; string strReasonFile2 = ""; if (fuDetiels1.HasFile) { strReasonFile = fuDetiels1.FileName.ToString(); fuDetiels1.SaveAs(Server.MapPath("../UploadFiles") + "/" + fuDetiels1.FileName); } if (fuDetiels2.HasFile) { strReasonFile2 = fuDetiels2.FileName.ToString(); fuDetiels2.SaveAs(Server.MapPath("../UploadFiles") + "/" + fuDetiels2.FileName); } string date = labDate.Text.ToString(); AbsenceExam obj11 = new AbsenceExam(); NowTimeUniversity timee = new NowTimeUniversity(); DataRow T = timee.drSearchYearANdSemester(); string semester = T["NowSemester"].ToString(); string Year = T["NowYear"].ToString(); if (obj11.UpdateAbsenceExam(row, ID, date, Year, semester, CourseNum1, ExamCourse1Date, CourseNum2, ExamCourse2Date, CourseNum3, ExamCourse3Date, CourseNum4, ExamCourse4Date, Reason, strReasonFile, strReasonFile2, 1) == 1) { txtReason.Text = ""; txtCourseNum1.Text = ""; ddlCourse1.SelectedIndex = -1; ddlCourse2.SelectedIndex = -1; ddlCourse3.SelectedIndex = -1; ddlCourse4.SelectedIndex = -1; labTeacher1.Text = ""; labTeacher2.Text = ""; labTeacher3.Text = ""; labTeacher4.Text = ""; SentMail s = new SentMail(); s.sendemailDean(ID); } errorLabel.Visible = false; } else { errorLabel.Text = "التوقيع المدخل خاطئ"; errorLabel.Visible = true; } }
protected void btnSave_Click(object sender, EventArgs e) { bool Result = false; int ID = Convert.ToInt32(Session["ID"]); string Path = ""; string Data = txtNumCourse1.Text.ToString() + txtNumCourse2.Text.ToString() + txtNumCourse3.Text.ToString() + txtNmberHours.Text.ToString() + txtNumHourAfter.Text.ToString() + DateTime.Today.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 Reson = ""; int NumHoursResginter; int NumpullHours; int CourseNum1 = 0; int CourseNum2 = 0; int CourseNum3 = 0; if (txtNumCourse1.Text != string.Empty) { CourseNum1 = Convert.ToInt32(txtNumCourse1.Text.ToString()); } if (txtNumCourse2.Text != string.Empty) { CourseNum2 = Convert.ToInt32(txtNumCourse2.Text.ToString()); } if (txtNumCourse3.Text != string.Empty) { CourseNum3 = Convert.ToInt32(txtNumCourse3.Text.ToString()); } if (txtNmberHours.Text != string.Empty) { NumHoursResginter = Convert.ToInt32(txtNmberHours.Text.ToString()); } if (txtNumHourAfter.Text != string.Empty) { NumpullHours = Convert.ToInt32(txtNumHourAfter.Text.ToString()); } if (txtReason.Text != string.Empty) { Reson = txtReason.Text.ToString(); } string Course1time = txtTimeCourse1.Text.ToString(); string Course2time = txtTimeCourse2.Text.ToString(); string Course3time = txtTimeCourse3.Text.ToString(); int NumHourREG = Convert.ToInt32(txtNmberHours.Text.ToString()); int NumHourAFpull = Convert.ToInt32(txtNumHourAfter.Text.ToString()); string DateNow = DateTime.Today.ToString(); int roww = Convert.ToInt32(Request.QueryString["id"]); PullCourseClass obj = new PullCourseClass(); if (obj.UpdatePullCourse(roww, ID, CourseNum1, CourseNum2, CourseNum3, DateNow, Reson, Course1time, Course2time, Course3time, NumHourREG, NumHourAFpull, "", "", 0, "", "", 0, 0, 5) == 1) { Response.Redirect("PullCourseDisplay.aspx"); } errorLabel.Visible = false; } else { errorLabel.Text = "التوقيع المدخل خاطئ"; errorLabel.Visible = true; } }