override protected void Page_Load(object sender, System.EventArgs e) { // this logic can be moved someplace else if better suited //Should take encrypted patientId and returns patientMRN, Last Name, First Name if (Request.QueryString.Get("epid") != null && !Request.QueryString.Get("epid").Equals("")) { int patientId = int.Parse(CustomCryptoHelper.Decrypt((string)Request.QueryString.Get("epid"))); // this clause is true only if you are arriving at this page by clicking on a patient // in a clinic list. Checks if the patient is in the Patients table, possibly not true since // patients can be deleted from the patients table if (Request.QueryString["verifyPatientId"] != null && Request.QueryString["verifyPatientId"].ToUpper() == "TRUE") { Patient pt = new Patient(); pt.Get(patientId); //if (pt.DataSourceView.Table.Rows.Count > 0) if (!pt.IsEmpty) { this.SetPatientSessionVariables(patientId); } else { //Response.Redirect("../PatientList/PatientListPage.aspx?selectedPatientDeleted=true"); Server.Transfer("../PatientLists/PatientListPage.aspx?selectedPatientDeleted=true"); } } else { this.SetPatientSessionVariables(patientId); } } base.Page_Load(sender, e); // disables view state }
protected override void Page_Load(object sender, EventArgs e) { // Verifiy items passed in url if (!string.IsNullOrEmpty(Request.QueryString["pIds"])) { // Get a list of patients for which to print label string pIds = CustomCryptoHelper.Decrypt(Request.QueryString["pIds"]); //string pIds = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34"; patientIds = pIds.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); MaxLabels = GetMaxLabelsPerPage(); //MaxLabels = 1; // Build List // Option 1. Bind to Repeater // Populates repeater with list of patient info //rptLabels.DataSource = data; //rptLabels.DataBind(); // Operion 2. Insert controls dynamically CreateChildControls(patientIds); } }
public static SqlConnection GetConnection() { string dbConnStr = System.Configuration.ConfigurationSettings.AppSettings["dbConnectionString"]; if (ConfigurationSettings.AppSettings["encryptDbConnectString"] != null && ConfigurationSettings.AppSettings["encryptDbConnectString"].ToString().Equals("true")) { dbConnStr = CustomCryptoHelper.Decrypt(dbConnStr); } return(new SqlConnection(dbConnStr)); }
public static SqlConnection GetConnection() { string dbConnStr = ConfigurationSettings.AppSettings["dbConnectionString"].ToString(); if (ConfigurationSettings.AppSettings["encryptDbConnectString"] != null && ConfigurationSettings.AppSettings["encryptDbConnectString"].ToString().Equals("true")) { dbConnStr = CustomCryptoHelper.Decrypt(dbConnStr); } SqlConnection conn = new System.Data.SqlClient.SqlConnection(); conn.ConnectionString = dbConnStr; return(conn); }
/// <summary> /// Returns the connection string for the Data Warehouse /// </summary> /// <returns></returns> public static SqlConnection GetWarehouseConnection() { string warehouseKey = "warehouseConnectionString"; string encryptWarehouseKey = "encryptWarehouseConnectionString"; string warehouseConnection = ConfigurationSettings.AppSettings[warehouseKey].ToString(); if (ConfigurationSettings.AppSettings[encryptWarehouseKey] != null && ConfigurationSettings.AppSettings[encryptWarehouseKey].ToString().ToLower().Equals("true")) { warehouseConnection = CustomCryptoHelper.Decrypt(warehouseConnection); } SqlConnection conn = new System.Data.SqlClient.SqlConnection(); conn.ConnectionString = warehouseConnection; return(conn); }
protected void Page_PreInit(object sender, EventArgs e) { if (Request.QueryString["patientIds"] != null && Request.QueryString["patientIds"].Length > 0) { string pIds = CustomCryptoHelper.Decrypt(Request.QueryString["patientIds"].ToString()); patientIds = pIds.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); if (Request.QueryString["surveyRuleType"] != null && Request.QueryString["surveyRuleType"].Length > 0) { _surveyRuleType = Request.QueryString["surveyRuleType"].ToString(); } string sourceFolder = Server.MapPath("../../../Modules/FollowUp/Surveys/"); BaseLongitudinalControl lControl = new BaseLongitudinalControl(); foreach (string pId in patientIds) { //get survey(s) due for patient string fileNames = GetSurveyPacketFileNames(_surveyRuleType, Int32.Parse(pId)); string[] fileNamesArray = fileNames.Split(','); // get page number(s) of any pages to skip string[] pagesToSkip = new string[] { String.Empty }; foreach (string fileName in fileNamesArray) { // if file is for coverletter (.xml) if (fileName.Contains(".xml")) { lControl = new BaseLongitudinalControl(); lControl = (BaseLongitudinalControl)this.LoadControl("~/Modules/FollowUp/LongitudinalFollowUp/LongitudinalLetter.ascx"); lControl.PatientId = Int32.Parse(pId); lControl.CoverLetterXmlFileName = fileName; _objMergePdf.AddControlPage(MergedFileForm, lControl); } else if (fileName.Contains(".pdf")) { _objMergePdf.AddFile(fileName, sourceFolder, pagesToSkip); } } } } }