protected void EditSave_Click(object sender, EventArgs e) { string path = serverpath + @"\Handlers\bf.pke"; if (File.Exists(path)) { StreamReader reader = new StreamReader(path, true); file_string = reader.ReadToEnd(); reader.Close(); if (file_string != null) { string oldValue = file_string.Substring(0, file_string.IndexOf("</BitStrength>") + 14); file_string = file_string.Replace(oldValue, ""); } } if (z.e_regadmin(edit_xname.Text, ody.EncryptString(edit_xpass.Text, file_len, file_string), edit_xrole.SelectedValue, ody.EncryptString(edit_xemail.Text, file_len, file_string), edit_telephone1.Text, edit_telephone2.Text, "pt", pwalletID, getAdmins.SelectedValue, edit_status.SelectedValue, sup_doc2, Server.MapPath("~/"), Designation.Text) > 0) { x_edit_tbl = 0; x_edit_succ = 1; } }
protected void EditSave_Click(object sender, EventArgs e) { string keydir = serverpath + "\\Handlers\\bf.pke"; if (File.Exists(keydir)) { StreamReader streamReader = new StreamReader(keydir, true); file_string = streamReader.ReadToEnd(); streamReader.Close(); if (file_string != null) { string bitStrengthString = file_string.Substring(0, file_string.IndexOf("</BitStrength>") + 14); file_string = file_string.Replace(bitStrengthString, ""); } } /////////////////////////////////////////////////////////////////////////////////////////////////////////////// Odyssey ody = new Odyssey(); if (this.z.e_regadmin(this.edit_xname.Text, ody.EncryptString(this.edit_xpass.Text, file_len, file_string), this.edit_xrole.SelectedValue, ody.EncryptString(this.edit_xemail.Text, file_len, file_string), this.edit_telephone1.Text, this.edit_telephone2.Text, "tm", this.pwalletID, this.getAdmins.SelectedValue, this.edit_status.SelectedValue) > 0) { this.x_edit_tbl = 0; this.x_edit_succ = 1; } }
protected void Save_Click(object sender, EventArgs e) { string path = serverpath + @"\Handlers\bf.pke"; if (File.Exists(path)) { StreamReader reader = new StreamReader(path, true); file_string = reader.ReadToEnd(); reader.Close(); if (file_string != null) { string oldValue = file_string.Substring(0, file_string.IndexOf("</BitStrength>") + 14); file_string = file_string.Replace(oldValue, ""); } } if (xnewpass1.Text != "") { xnewpass1_text = xnewpass1.Text; } if (xnewpass2.Text != "") { xnewpass2_text = xnewpass2.Text; } if (Session["Newpass"] != null) { xnewpass1_text = Session["Newpass"].ToString(); } if (z.e_xadminz(adminID, ody.EncryptString(xnewpass1_text, file_len, file_string)) != "0") { Response.Redirect("./login.aspx"); } else { Response.Redirect("./cp.aspx"); } }
protected void Save_Click(object sender, EventArgs e) { string keydir = serverpath + "\\Handlers\\bf.pke"; if (File.Exists(keydir)) { StreamReader streamReader = new StreamReader(keydir, true); file_string = streamReader.ReadToEnd(); streamReader.Close(); if (file_string != null) { string bitStrengthString = file_string.Substring(0, file_string.IndexOf("</BitStrength>") + 14); file_string = file_string.Replace(bitStrengthString, ""); } } /////////////////////////////////////////////////////////////////////////////////////////////////////////////// Odyssey ody = new Odyssey(); string pass = "******"; this.regID = this.z.a_regadmin(this.xname.Text, this.xrole.SelectedValue, ody.EncryptString(this.xemail.Text, file_len, file_string), this.xtelephone1.Text, this.xtelephone2.Text, "tm", this.pwalletID, ody.EncryptString(pass, file_len, file_string)); if (this.regID != "0") { this.x_add_tbl = 0; this.x_add_succ = 1; } }