/// <summary> /// Purpose:This function will be used to Get Client Medication Summary Data /// </summary> private void GetClientSummaryData() { try { objectClientMedications = new ClientMedication(); objectCommonFunctions = new ApplicationCommonFunctions(); CommonFunctions.Event_Trap(this); _DataSetClientSummary = new DataSet(); if (Session["DataSetClientSummary"] != null) { _DataSetClientSummary = (DataSet)Session["DataSetClientSummary"]; } } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) { ex.Data["CustomExceptionInformation"] = ""; } else { ex.Data["CustomExceptionInformation"] = ""; } if (ex.Data["DatasetInfo"] == null) { ex.Data["DatasetInfo"] = _DataSetClientSummary; } Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this); } finally { objectClientMedications = null; objectCommonFunctions = null; } }
public System.Data.DataSet ValidateLogin(string userCode, string cPassword) { try { UserInfo objUser = new UserInfo(); return(objUser.ValidateLogin(userCode, ApplicationCommonFunctions.GetEncryptedData(cPassword, "Y"))); } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) { ex.Data["CustomExceptionInformation"] = null; } else { ex.Data["CustomExceptionInformation"] = ""; } if (ex.Data["DatasetInfo"] == null) { ex.Data["DatasetInfo"] = null; } throw (ex); } }
/// <summary> /// Handles the selected Index Change of DropDwon Clients /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void DropDownListClients_SelectedIndexChanged(object sender, EventArgs e) { string ClientId = ""; string ExternalClientId = ""; string UserCode = ""; DataTable DataTableClientsList = new DataTable(); DataTableClientsList.Clear(); DataSet dsExternalClientInfo = new DataSet(); try { Streamline.UserBusinessServices.ApplicationCommonFunctions objApplicationCommonFunctions; objApplicationCommonFunctions = new Streamline.UserBusinessServices.ApplicationCommonFunctions(); Session["ExternalClientInformation"] = null; if (DropDownListClients.SelectedIndex > 0 && DropDownListClients.SelectedIndex == 1) { Session["LoadMgt"] = null; // fillComboBoxes(); DropDownListClients.SelectedIndex = -1; //ScriptManager.RegisterStartupScript(LabelClientScript, LabelClientScript.GetType(), ClientID.ToString(), "MedicationMgt.ShowClientSearchDiv(" + ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).Client.ClientId + ");", true); ScriptManager.RegisterStartupScript(LabelClientScript, LabelClientScript.GetType(), ClientID.ToString(), "ShowClientSearchDiv(" + ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).Client.ClientId + ");", true); } else if (DropDownListClients.SelectedIndex > 0 && DropDownListClients.Text != "View Different Patients") { //Added by chandan for update/Insert the External Client information in streamline database if (System.Configuration.ConfigurationSettings.AppSettings["ExternalInterface"].ToString().ToUpper() == "TRUE") { ClientId = DropDownListClients.SelectedValue; UserCode = ((Streamline.BaseLayer.StreamlineIdentity)Context.User.Identity).UserCode; DataTableClientsList = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).Clients; if (DataTableClientsList.Rows.Count > 0) { DataRow[] dr = DataTableClientsList.Select("clientid=" + ClientId + ""); ExternalClientId = dr[0]["ExternalClientId"].ToString(); } if (ExternalClientId != "") { //We are passing Externalclientid as clientid to the external interface dsExternalClientInfo = objApplicationCommonFunctions.GetExternalClientInfo(ExternalClientId); //dsExternalClientInfo = objApplicationCommonFunctions.GetExternalClientInfo(Convert.ToInt32(ExternalClientId)); Session["ExternalClientInformation"] = dsExternalClientInfo; if (dsExternalClientInfo != null) { if (dsExternalClientInfo.Tables.Count > 0) { objApplicationCommonFunctions.UpdateExternalInformation(dsExternalClientInfo, UserCode); } } } } //SetClient(Convert.ToInt32(DropDownListClients.SelectedValue)); ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).RefreshData = true; ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).SetClientInformation(Convert.ToInt32(DropDownListClients.SelectedValue), true); GetClientSummaryData(); } } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) { ex.Data["CustomExceptionInformation"] = ""; } else { ex.Data["CustomExceptionInformation"] = ""; } if (ex.Data["DatasetInfo"] == null) { ex.Data["DatasetInfo"] = null; } Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this); } finally { DataTableClientsList = null; dsExternalClientInfo = null; } }
/// <summary> /// Purpose:This function will be used to Get Client Medication Summary Data /// </summary> private void GetClientSummaryData() { Streamline.UserBusinessServices.DataSets.DataSetClientMedications DataSetClientMedications; try { objectClientMedications = new ClientMedication(); objectCommonFunctions = new ApplicationCommonFunctions(); CommonFunctions.Event_Trap(this); string _ClientRowIdentifier = ""; string _ClinicianrowIdentifier = ""; DataSetClientMedications = new Streamline.UserBusinessServices.DataSets.DataSetClientMedications(); try { _ClinicianrowIdentifier = ((Streamline.BaseLayer.StreamlineIdentity)Context.User.Identity).ClinicianRowIdentifier; } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) { ex.Data["CustomExceptionInformation"] = ""; } string ParseMessage = ex.Message; if (ParseMessage.Contains("Object") == true) { throw new Exception("Session Expired"); } } _ClientRowIdentifier = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).Client.ClientRowIdentifier; if (_ClientRowIdentifier != "" && _ClinicianrowIdentifier != "") { _DataSetClientSummary = objectClientMedications.DownloadClientMedicationSummary(_ClientRowIdentifier, _ClinicianrowIdentifier); Session["DataSetClientMedications"] = null; Session["DataSetPrescribedClientMedications"] = null;//Added As per task#3323 By Pradeep on 4 March 2011 Session["DataSetClientSummary"] = _DataSetClientSummary; DataSetClientMedications.EnforceConstraints = false; DataSetClientMedications.Tables["ClientMedications"].Merge(_DataSetClientSummary.Tables["ClientMedications"]); DataSetClientMedications.Tables["ClientMedicationInstructions"].Merge(_DataSetClientSummary.Tables["ClientMedicationInstructions"]); //Activate the MedicationClientPersonalInformation Control MedicationClientPersonalInformation1.showEditableAllergyList = true; MedicationClientPersonalInformation1.Activate(); LabelClientName.Text = ""; LabelClientName.Text = _DataSetClientSummary.Tables["ClientInformation"].Rows[0]["ClientInformationLabel"].ToString(); //DataSetClientSummary.Tables["ClientInformation"].Rows[0]["ClientInformationLabel"].ToString(); } } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) { ex.Data["CustomExceptionInformation"] = ""; } else { ex.Data["CustomExceptionInformation"] = ""; } if (ex.Data["DatasetInfo"] == null) { ex.Data["DatasetInfo"] = _DataSetClientSummary; } Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this); } finally { objectClientMedications = null; objectCommonFunctions = null; } }