public string SendFax(int _pharmacyId, int _clientId, string _scriptFilePath, string _subject) { Streamline.UserBusinessServices.SharedTables objectSharedTables = new Streamline.UserBusinessServices.SharedTables(); DataSet DataSetPharmacies = objectSharedTables.getPharmacies(_clientId); DataRow[] drPharmacies = DataSetPharmacies.Tables[0].Select("PharmacyId=" + _pharmacyId); string _pharmacyName = ""; string _faxNumber = ""; if (drPharmacies.Length > 0) { _pharmacyName = drPharmacies[0]["PharmacyName"].ToString(); _faxNumber = drPharmacies[0]["FaxNumber"].ToString(); } FAXSERVRES _faxserver = FAXSERVRES.none; switch (System.Configuration.ConfigurationSettings.AppSettings["FaxServer"]) { case "faxcom": _faxserver = FAXSERVRES.faxcom; break; case "zetafax": _faxserver = FAXSERVRES.zetafax; break; case "RightFax": _faxserver = FAXSERVRES.rightfax; break; default: _faxserver = FAXSERVRES.faxcom; break; } if (_faxserver == FAXSERVRES.faxcom) { return(SendToFaxCom(_pharmacyName, _faxNumber, _scriptFilePath, _subject)); } else if (_faxserver == FAXSERVRES.zetafax) { return(SendToZetaFax(_pharmacyName, _faxNumber, _scriptFilePath, _subject)); } else if (_faxserver == FAXSERVRES.rightfax) { SendToRightFaxAsync(_pharmacyName, _faxNumber, _scriptFilePath, _subject); return("true"); } else { return("false"); } }
/// <summary> /// Mohit /// Fills the HealthCategoryData combo /// Nov-20-2009 /// </summary> private void FillHealthDataCombo() { DataSet DataSetHealthCategoryData = null; Streamline.UserBusinessServices.SharedTables objectSharedTables = null; objectSharedTables = new Streamline.UserBusinessServices.SharedTables(); try { DataSetHealthCategoryData = objectSharedTables.getHealthCategoryData(); CommonFunctions.Event_Trap(this); DataView dataViewHealthData = DataSetHealthCategoryData.Tables[0].DefaultView; dataViewHealthData.Sort = "CategoryName ASC"; DropDownListHealthData.DataSource = dataViewHealthData; DropDownListHealthData.DataTextField = "CategoryName"; DropDownListHealthData.DataValueField = "HealthDataCategoryId"; DropDownListHealthData.DataBind(); //drpData.Items.Insert(0, new ListItem("........Select Data........", "0")); if (Request.QueryString["HealthDataCategoryId"] != null) { DropDownListHealthData.SelectedValue = Convert.ToString(Request.QueryString["HealthDataCategoryId"]); } else { DropDownListHealthData.SelectedIndex = 0; } Session["dataSetHealthData"] = DataSetHealthCategoryData; } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) { ex.Data["CustomExceptionInformation"] = CommonFunctions.Event_FormatString("###Source Function Name - getHealthCategoryData(),ParameterCount 0 - ###"); } else { ex.Data["CustomExceptionInformation"] = CommonFunctions.Event_FormatString(ex.Data["CustomExceptionInformation"].ToString()); } if (ex.Data["DatasetInfo"] == null) { ex.Data["DatasetInfo"] = null; } Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this); } finally { } }
protected void lnkRefresh_Click(object sender, EventArgs e) { Streamline.UserBusinessServices.SharedTables objectSharedTables = null; try { string msg = "refresh"; if (PlaceHolderMain.Controls.Count > 0) { Control ctrl = PlaceHolderMain.Controls[0]; ((Streamline.BaseLayer.BaseActivityPage)ctrl).RefreshPage(); } // Code that runs on application startup objectSharedTables = new Streamline.UserBusinessServices.SharedTables(); objectSharedTables.getSharedTablesData(); objectSharedTables.getStaffClientsData(((StreamlineIdentity)Context.User.Identity).UserId); } catch (Exception ex) { } finally { objectSharedTables = null; } }
/// <summary> /// <Author>Loveena</Author> /// <Description>To Fill Pharmacies Drop-DownList for Sequence Number 1</Description> /// </summary> private void FillPrefferdPharmacy1(int dropDownNum, String SearchImage) { DataSet DataSetPharmacies = null; //added By Priya rEf:Task no:85 DataTable DataTableGetAllPharmacies = new DataTable(); //DataSetPharmacies = Streamline.UserBusinessServices.SharedTables.DataSetPharmacies; //Code added in ref to Task#2589 Streamline.UserBusinessServices.SharedTables objectSharedTables = null; objectSharedTables = new Streamline.UserBusinessServices.SharedTables(); string SessionGetAllPreferredPharmacies = string.Empty; DropDownList ddL = DropDownListPharmacy1; if (dropDownNum == 1) { SessionGetAllPreferredPharmacies = "GetAllPreferredPharmacies1"; ddL = DropDownListPharmacy1; } else if (dropDownNum == 2) { SessionGetAllPreferredPharmacies = "GetAllPreferredPharmacies2"; ddL = DropDownListPharmacy2; } else if (dropDownNum == 3) { SessionGetAllPreferredPharmacies = "GetAllPreferredPharmacies3"; ddL = DropDownListPharmacy3; } try { //added By Priya rEf:Task no:85 if (Request.QueryString["imgname"] == null) { Session[SessionGetAllPreferredPharmacies] = null; } DataSetPharmacies = objectSharedTables.getPharmacies(((Streamline.BaseLayer.StreamlinePrinciple)Context.User).Client.ClientId); CommonFunctions.Event_Trap(this); //added By Priya rEf:Task no:85 if (Session[SessionGetAllPreferredPharmacies] != null) { ddL.DataSource = GetEPCSPharmacies((DataTable)Session[SessionGetAllPreferredPharmacies]); } else { ddL.DataSource = GetEPCSPharmacies(DataSetPharmacies.Tables[0]); } ddL.DataTextField = "PharmacyName"; ddL.DataValueField = "PharmacyId"; ddL.DataBind(); int count = ddL.Items.Count; count = count + 1; ddL.Items.Insert(0, new ListItem("", "0")); ddL.SelectedIndex = 0; DataRow drNewPharmacies = null; if (Session[SessionGetAllPreferredPharmacies] == null) { DataTableGetAllPharmacies = DataSetPharmacies.Tables[0]; } else { DataTableGetAllPharmacies = (DataTable)Session[SessionGetAllPreferredPharmacies]; } DataRow[] _drClientId = (_DataSetClientSummary.Tables["ClientPharmacies"].Select("ClientId=" + ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).Client.ClientId + " AND SequenceNumber=" + dropDownNum + " AND ISNULL(RecordDeleted,'N')='N'")); if (_drClientId.Length > 0) { //Set the Selected Value for DropDownListPharmacy1 with the Sequence Number1. ddL.SelectedValue = _drClientId[0]["PharmacyId"].ToString(); } //added By Priya Ref: task 85 SDI Projects FY10 - Venture string pharmacyname = ""; string pharmacyId = ""; bool isExist = false; if (Request.QueryString["imgname"] != null) { string imgname = Request.QueryString["imgname"].ToString(); if (imgname != SearchImage) { string SelectedPharmacyValue = string.Empty; if (dropDownNum == 1) { SelectedPharmacyValue = Request.QueryString["DropDownValue1"].ToString(); } else if (dropDownNum == 2) { SelectedPharmacyValue = Request.QueryString["DropDownValue2"].ToString(); } else { SelectedPharmacyValue = Request.QueryString["DropDownValue3"].ToString(); } ddL.SelectedValue = SelectedPharmacyValue; } if (imgname == SearchImage) { pharmacyname = Request.QueryString["PharmacyName"].ToString(); pharmacyId = Request.QueryString["PharmacyId"].ToString(); int gridCount = ddL.Items.Count; for (int i = 0; i < gridCount; i++) { if (ddL.Items[i].Value == pharmacyId) { isExist = true; ddL.SelectedValue = pharmacyId; break; } } if (isExist == false) { drNewPharmacies = DataTableGetAllPharmacies.NewRow(); ddL.Items.Insert(count, new ListItem(pharmacyname, pharmacyId)); drNewPharmacies["PharmacyId"] = pharmacyId; drNewPharmacies["PharmacyName"] = pharmacyname; DataTableGetAllPharmacies.Rows.Add(drNewPharmacies); ddL.SelectedValue = pharmacyId; } Session[SessionGetAllPreferredPharmacies] = DataTableGetAllPharmacies; } } } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) { ex.Data["CustomExceptionInformation"] = CommonFunctions.Event_FormatString("###Source Function Name - FillPreferredPharmacy1(),ParameterCount 0 - ###"); } else if (ex.Data["DatasetInfo"] == null) { ex.Data["DatasetInfo"] = DataSetPharmacies; } Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this); } finally { DataSetPharmacies = null; } }