protected void Page_Load(object sender, EventArgs e) { Encryption64 e64 = new Encryption64(); reqid = e64.Decrypt(Request.QueryString.Get("reqid").Replace(" ", "+")); labid = Convert.ToInt64(e64.Decrypt(Request.QueryString.Get("labid").Replace(" ", "+"))); userid = Session["userid"].ToString(); load_gsk_address(); load_lab(); load_sender(); //2 - Auto Print Pop-up Page.ClientScript.RegisterStartupScript(this.GetType(), "Print", "javascript:window.print();", true); }
protected void Page_Init(object sender, EventArgs e) { Encryption64 e64 = new Encryption64(); reqid = e64.Decrypt(Request.QueryString.Get("reqid").Replace(" ", "+")); ds_analytics.requestsDataTable req_dt = requests.getRequestbyReqid(reqid); if (req_dt.Count > 0) { req_row = req_dt[0]; } else { Response.Write("<script>alert('No request found .');</script>"); } //create dynamic gv_test_sample in Page_Init while sending to lab if (req_row.statusid == 3) { build_gv_ts_lab_selection(); if (!IsPostBack) { dt_test_sample_global = get_dt_ts_lab_selection(); bind_gv_ts_lab_selection(dt_test_sample_global); } else { } } }
protected void Page_Init(object sender, EventArgs e) { Encryption64 e64 = new Encryption64(); reqid = e64.Decrypt(Request.QueryString.Get("re").Replace(" ", "+")); userid = e64.Decrypt(Request.QueryString.Get("us").Replace(" ", "+")); ds_analytics.requestsDataTable req_dt = requests.getRequestbyReqid(reqid); if (req_dt.Count > 0) { req_row = req_dt[0]; } else { Response.Write("<script>alert('No request found.');</script>"); } }
protected void Page_Init(object sender, EventArgs e) { mode = Request.QueryString.Get("mode"); user = Request.QueryString.Get("user"); Encryption64 e64 = new Encryption64(); process_reqid = e64.Decrypt(Request.QueryString.Get("process_reqid").Replace(" ", "+")); ds_analytics.requestsDataTable req_dt = requests.getRequestbyReqid(process_reqid); process_req_row = req_dt[0]; userid = Session["userid"].ToString(); no_samples = Convert.ToInt32(e64.Decrypt(Request.QueryString.Get("nosample").Replace(" ", "+"))); no_tests = Convert.ToInt32(e64.Decrypt(Request.QueryString.Get("notest").Replace(" ", "+"))); no_samples_intab = int.Parse(System.Configuration.ConfigurationManager.AppSettings["no_samples_intab"].ToString()); if (!IsPostBack) { lbl_status.Text = other.getStatustext(1); rtype = e64.Decrypt(Request.QueryString.Get("rtype").Replace(" ", "+")); set_page_ddl(); bind_page_ddl(); set_page_samples(); bind_page_tests(); build_dt_test_sample(); build_gv_test_sample(); bind_gv_test_sample(); Page.Validate(); } else { rtype = Request.Form[ddl_typerequest.UniqueID]; set_page_samples(); build_gv_test_sample(); Page.Validate(); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { //Request.Url.Query. //J+Fi3cckJGykN93BzxEj5ofKKC5mmeLQxTmlM16/kk0P9Vma7virrNAvnfLWttJ8H1qIsJeCgTcdvEs6zWB4rahyeCcZ4SDQ6OCkYFzvn+g= .Replace("%2f", "/") if (Request.QueryString != null) { //Uri uri = new Uri(Request.Url.AbsoluteUri, UriKind.Absolute); if (!string.IsNullOrEmpty(Request.QueryString.ToString())) { string decryptedQueryString = Encryption64.Decrypt(HttpUtility.UrlDecode(Convert.ToString(Request.QueryString)), GlobalVariables.g_s_encryptionKey); //string[] queryStringArray = decryptedQueryString.Split('&'); NameValueCollection queryString = new NameValueCollection(); //foreach (string value in queryStringArray) //{ // string[] splitValues = value.Split('='); // queryString.Add(splitValues[0], splitValues[1]); //} queryString = HttpUtility.ParseQueryString(decryptedQueryString); if (queryString["empAutoId"] != null && queryString["oldPassword"] != null && queryString["companyAutoId"] != null) { hid_empAutoId.Value = queryString["empAutoId"]; hid_oldPassword.Value = queryString["oldPassword"]; hid_companyAutoId.Value = queryString["companyAutoId"]; //hid_empAutoId.Value = Convert.ToString(Request.QueryString["empAutoId"]); //hid_oldPassword.Value = Convert.ToString(Request.QueryString["oldPassword"]); g_b_FillDropDownList(cmbEmployee); cmbEmployee.Enabled = false; cmbEmployee.SelectedValue = Convert.ToString(hid_empAutoId.Value); txtOldPassword.Text = Convert.ToString(hid_oldPassword.Value); } //txtOldPassword.TextMode = TextBoxMode.Password; } } } } catch (FormatException) { Response.Redirect(GlobalVariables.g_s_URL_permissionDenied); } catch (CryptographicException) { btnUpdate.Enabled = false; lblMsg.Text = "URL Invalid"; } catch (Exception ex) { btnUpdate.Enabled = false; lblMsg.Text = ex.Message; lblMsg.ForeColor = System.Drawing.Color.Tomato; } }
protected void Page_Load(object sender, EventArgs e) { Encryption64 e64 = new Encryption64(); reqid = e64.Decrypt(Request.QueryString.Get("reqid").Replace(" ", "+")); labid = Convert.ToInt64(e64.Decrypt(Request.QueryString.Get("labid").Replace(" ", "+"))); req_reference = projects.getProjectByPrjid(requests.getRequestbyReqid(reqid)[0].projectid)[0].projectname.Substring(0, 3) + reqid; //First three letters of project name + reqid if (!IsPostBack) { DataTable dt_SampleTestLab = labresult.getSampleTestLabByJoining(reqid); //1 - Filter for only selected lab DataRow[] d_rows = dt_SampleTestLab.Select("labid = '" + labid.ToString() + "'"); DataTable dt_SampleTestLab_filtered = dt_SampleTestLab.Clone(); foreach (DataRow dr in d_rows) { dt_SampleTestLab_filtered.ImportRow(dr); } //2 - Finding Unique Samples DataView view = new DataView(dt_SampleTestLab_filtered); dt_SampleTestLab_filtered = view.ToTable(true, "sampleid", "sample_quantity"); //3 - Bind Repeater Repeater1.DataSource = dt_SampleTestLab_filtered; Repeater1.DataBind(); //4 - Bind Lab Address etc. ds_analytics.m_labsRow lab_row = m_labs.getLabByLabid(labid)[0]; lbl_name1.Text = lab_row.contact_person; lbl_name2.Text = lab_row.key_acc_person; lbl_lab_name.Text = lab_row.labname; lbl_lab_add.Text = lab_row.address; lbl_lab_city.Text = lab_row.city; lbl_email1.Text = lab_row.email1; lbl_mbl1.Text = lab_row.mbl1; lbl_phn1.Text = lab_row.phn1; //5 - Auto Print Pop-up Page.ClientScript.RegisterStartupScript(this.GetType(), "Print", "javascript:window.print();", true); } }
protected void Page_Init(object sender, EventArgs e) { Encryption64 e64 = new Encryption64(); no_samples = Convert.ToInt32(e64.Decrypt(Request.QueryString.Get("nosample").Replace(" ", "+"))); no_tests = Convert.ToInt32(e64.Decrypt(Request.QueryString.Get("notest").Replace(" ", "+"))); userid = Session["userid"].ToString(); no_samples_intab = int.Parse(System.Configuration.ConfigurationManager.AppSettings["no_samples_intab"].ToString()); if (!IsPostBack) { ((MenuItem)((Menu)Master.FindControl("Menu1")).FindItem("Make Request")).Selected = true; lbl_status.Text = other.getStatustext(1); rtype = e64.Decrypt(Request.QueryString.Get("rtype").Replace(" ", "+")); set_page_ddl(); set_page_samples(); set_page_tests(); build_dt_test_sample(); build_gv_test_sample(); bind_gv_test_sample(); Page.Validate(); } else { rtype = Request.Form[ddl_typerequest.UniqueID]; set_page_samples(); //rebuilding dynamic controls with same ID is necessary on each postback build_gv_test_sample(); //showing validators in each postback Page.Validate(); } }
protected void Page_Load(object sender, EventArgs e) { Encryption64 e64 = new Encryption64(); reqid = e64.Decrypt(Request.QueryString.Get("reqid").Replace(" ", "+")); ds_analytics.requestsDataTable req_dt = requests.getRequestbyReqid(reqid); if (req_dt.Count > 0) { req_row = req_dt[0]; prj_row = projects.getProjectByPrjid(req_row.projectid)[0]; this.Title = prj_row.projectname + "_" + req_row.reqdate.ToString("yyyy_MM") + "_" + reqid + ".pdf"; if (!string.IsNullOrEmpty(Request.QueryString.Get("action")) && (Request.QueryString.Get("action").ToLower() == "pdf")) { strPdfFileName = this.Title; isPDFrequest = true; } } else { Response.Write("<script>alert('No request found.');</script>"); } if (!IsPostBack) { bind_req_header(); bind_req_samples(); if (req_row.statusid > 5) { pnl_LabResults.Visible = true; bind_lab_results(); } bind_req_tests(); bind_test_samples(); } if (!isPDFrequest) { // Auto Pop-up for print request Page.ClientScript.RegisterStartupScript(this.GetType(), "Print", "javascript:window.print();", true); } }
protected void Page_Load(object sender, EventArgs e) { Encryption64 e64 = new Encryption64(); reqid = e64.Decrypt(Request.QueryString.Get("reqid").Replace(" ", "+")); if (!IsPostBack) { //Fetching sample_test_lab data DataTable dt_SampleTestLab = labresult.getSampleTestLabByJoining(reqid); DataView dv = dt_SampleTestLab.DefaultView; string[] columnNames = { "labid", "labname", "email1", "city", "contact_person", "mbl1" }; DataTable dt_unique_labs = dv.ToTable(true, columnNames); Repeater1.DataSource = dt_unique_labs; Repeater1.DataBind(); } else { } }
protected void Page_Load(object sender, EventArgs e) { Encryption64 e64 = new Encryption64(); if (!IsPostBack) { ((MenuItem)((Menu)Master.FindControl("Menu1")).FindItem("Projects")).Selected = true; ViewState["SortOrder"] = " ASC"; long prjid = Convert.ToInt64(e64.Decrypt(Request.QueryString.Get("prj").Replace(" ", "+"))); //Header Bound ds_analytics.projectsRow prj_row = projects.getProjectByPrjid(prjid)[0]; lbl_name.Text = prj_row.projectname; lbl_type.Text = prj_row.projecttype; lbl_category.Text = prj_row.projectcategory; lbl_brand.Text = prj_row.projectbrand; if (!prj_row.IscreatedateNull()) { lbl_start.Text = prj_row.createdate.ToString("dd/MM/yyyy"); } if (!prj_row.IscompletiondateNull()) { lbl_end.Text = prj_row.completiondate.ToString("dd/MM/yyyy"); } if (!prj_row.IsbudgetNull()) { lbl_budget.Text = Convert.ToString(prj_row.budget); } cb_active.Checked = prj_row.isactive; //GridView ds_analytics.requestsDataTable req_dt = requests.getAllRequestsByProjID(prjid); gv_requests.DataSource = req_dt; gv_requests.DataBind(); ViewState["dtStored"] = req_dt; } else { } }
public static string DecryptString(string str) { Encryption64 oES = new Encryption64(); return(oES.Decrypt(str, "@n!k$en1")); }
public static string DecryptQueryString(string strQueryString) { Encryption64 oES = new Encryption64(); return(oES.Decrypt(strQueryString, "!#$a54?3")); }
/// <summary> /// Decrypt query string. /// </summary> /// <param name="encryptedStrings">Encrypted query string.</param> /// <param name="key">Key, being used to decrypt.</param> /// <remarks>The query string object replaces '+' character with an empty character.</remarks> /// <returns></returns> public static string DecryptQueryStrings(string encryptedStrings, string key) { return(Encryption64.Decrypt(encryptedStrings.Replace(" ", "+"), key)); }
/// <summary> /// Decode a ecoded string value /// </summary> /// <param name="encodedvalue"></param> /// <returns></returns> public static string ToDecoding(string encodedvalue) { return(Encryption64.Decrypt(encodedvalue, "1A2B3C4D")); }