public void Accept(int ID) { ShowStatusClass obj = new ShowStatusClass(); if (obj.AcceptHeadShowStatus(ID) == 1) { fillGv(); } }
protected void btnSaveHead_Click(object sender, EventArgs e) { bool Result = false; int ID = Convert.ToInt32(Session["ID"].ToString()); string Path = ""; string Data = labDate.Text.ToString() + labStudentNumber.Text.ToString() + rbtAceptHead.SelectedValue.ToString(); if (fuSignatureHead.HasFile) { string Private = fuSignatureHead.FileName.ToString(); Path = System.Web.HttpContext.Current.Server.MapPath("Test") + "/" + Private; string Pasword = txtPassSign.Text.ToString(); fuSignatureHead.SaveAs(Server.MapPath("Test") + "/" + fuSignatureHead.FileName); SignatureEmployee newSig = new SignatureEmployee(); string strencrypt = newSig.encrypet(Data, Path, Pasword); Result = newSig.Decreypt(strencrypt, ID); } if (Result == true) { ShowStatusClass obj = new ShowStatusClass(); int id = Convert.ToInt32(Request.QueryString["id"]); int AcceptHead = Convert.ToInt32(rbtAceptHead.SelectedValue.ToString()); string HeadDec = txtDescriptionHead.Text.ToString(); if (obj.AcceptHeadShowStatus(id, AcceptHead, HeadDec) == 1) { DataRow dr = obj.drgetform(id); int STUid = Convert.ToInt32(dr["StudentID"].ToString()); SentMail s = new SentMail(); s.sendemailDean(STUid); Response.Redirect("ProcessRequest.aspx"); } errorHead.Visible = false; } else { errorHead.Text = "التوقيع المدخل خاطئ او كلمة المرور"; errorHead.Visible = true; } }