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; } }