Exemplo n.º 1
0
    protected void drdQuery_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownBC objBC = new DropDownBC();
        GenericCollection <QueryBE> QueryList = new GenericCollection <QueryBE>();

        QueryList = Session["QueryList"] as GenericCollection <QueryBE>;
        if (drdQuery.SelectedValue == "")
        {
            txtQuery.Text        = "";
            gvResults.DataSource = null;
            gvResults.DataBind();
            lblError.Visible = false;
            rowGrid.Visible  = false;
            return;
        }

        for (int i = 0; i < QueryList.Count; i++)
        {
            if (drdQuery.SelectedValue == QueryList[i].SNo.ToString())
            {
                txtQuery.Text = QueryList[i].Query;
                break;
            }
        }

        gvResults.DataSource = null;
        gvResults.DataBind();
        lblError.Visible = false;
        rowGrid.Visible  = false;
    }
Exemplo n.º 2
0
 private void PopulateTransactionType(string ServiceLineID, string ServiceID, string ServiceOptionID, string ServCompID)
 {
     try
     {
         DropDownBC objBC = new DropDownBC();
         GenericCollection <TransactionType> TransactionTypeList = new GenericCollection <TransactionType>();
         TransactionTypeList       = objBC.GetTransactionTypeList(ServiceLineID, ServiceID, ServiceOptionID, ServCompID);
         drdTxnType.DataTextField  = "TransactionTypeDesc";
         drdTxnType.DataValueField = "TransactionTypeID";
         drdTxnType.DataSource     = TransactionTypeList;
         drdTxnType.DataBind();
         if (drdTxnType != null)
         {
             foreach (ListItem li in drdTxnType.Items)
             {
                 li.Attributes["title"] = li.Text;
             }
         }
         drdTxnType.Items.Insert(0, new ListItem(String.Empty, String.Empty));
     }
     catch (Exception ex)
     {
         logFile.ErrorLogging(ex);
     }
 }
Exemplo n.º 3
0
 private void PopulateServiceComponentDropDown(string ServiceLineID, string ServiceID, string ServiceOptionID, string ServCompType)
 {
     try
     {
         DropDownBC objBC = new DropDownBC();
         GenericCollection <ServiceComponent> ServiceComponentList = new GenericCollection <ServiceComponent>();
         ServiceComponentList = objBC.GetServiceComponentList(ServiceLineID, ServiceID, ServiceOptionID, ServCompType);
         drdServiceComponentPartnerSearch.DataTextField  = "ServiceComponentDesc";
         drdServiceComponentPartnerSearch.DataValueField = "ServiceComponentDesc";
         drdServiceComponentPartnerSearch.DataSource     = ServiceComponentList;
         drdServiceComponentPartnerSearch.DataBind();
         //if (drdServiceComponentPartnerSearch != null)
         //{
         //    foreach (ListItem li in drdServiceComponentPartnerSearch.Items)
         //    {
         //        li.Attributes["title"] = li.Text;
         //    }
         //}
         drdServiceComponentPartnerSearch.Items.Insert(0, new ListItem(String.Empty, String.Empty));
     }
     catch (Exception ex)
     {
         logFile.ErrorLogging(ex);
     }
 }
Exemplo n.º 4
0
 private void PopulateServiceOptionDropDown(string ServiceLineID, string ServiceID)
 {
     try
     {
         DropDownBC objBC = new DropDownBC();
         GenericCollection <ServiceOption> ServiceOptionList = new GenericCollection <ServiceOption>();
         ServiceOptionList = objBC.GetServiceOptionList(ServiceLineID, ServiceID);
         drdServiceOptionSearch.DataTextField  = "ServiceOptionName";
         drdServiceOptionSearch.DataValueField = "ServiceOptionID";
         drdServiceOptionSearch.DataSource     = ServiceOptionList;
         drdServiceOptionSearch.DataBind();
         //if (drdServiceOptionSearch != null)
         //{
         //    foreach (ListItem li in drdServiceOptionSearch.Items)
         //    {
         //        foreach (ServiceOption obj in ServiceOptionList)
         //        {
         //            if (obj.ServiceOptionID.ToString() == li.Value)
         //                li.Attributes["title"] = obj.ServiceOptionBriefDesc;
         //        }
         //    }
         //}
         drdServiceOptionSearch.Items.Insert(0, new ListItem(String.Empty, String.Empty));
     }
     catch (Exception ex)
     {
         logFile.ErrorLogging(ex);
     }
 }
Exemplo n.º 5
0
    private void BindQueryDropDown()
    {
        DropDownBC objBC = new DropDownBC();
        GenericCollection <QueryBE> QueryList = new GenericCollection <QueryBE>();

        Session["QueryList"]    = Cache.Get("QueryList");
        QueryList               = Session["QueryList"] as GenericCollection <QueryBE>;
        drdQuery.DataTextField  = "QueryText";
        drdQuery.DataValueField = "SNo";
        drdQuery.DataSource     = QueryList;
        drdQuery.DataBind();
        drdQuery.Items.Insert(0, "");
    }
Exemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Cache["QueryList"] == null)
        {
            DropDownBC objBC = new DropDownBC();
            GenericCollection <QueryBE> QueryList = new GenericCollection <QueryBE>();
            QueryList = objBC.GetQueryList();
            Cache.Insert("QueryList", QueryList, null, DateTime.Now.AddDays(30), TimeSpan.Zero);
            Session["QueryList"] = QueryList;
        }

        if (!Page.IsPostBack)
        {
            BindQueryDropDown();
        }
    }
Exemplo n.º 7
0
 private void PopulateServiceComponentDropDown(DropDownList drd)
 {
     try
     {
         DropDownBC objBC = new DropDownBC();
         GenericCollection <PartnerBE> PartnerList = (GenericCollection <PartnerBE>)Session["ExtranetPartnerList"];
         drd.DataTextField  = "PartnerName";
         drd.DataValueField = "PartnerName";
         drd.DataSource     = PartnerList;
         drd.DataBind();
         drd.Items.Insert(0, new ListItem(String.Empty, String.Empty));
     }
     catch (Exception ex)
     {
         logFile.ErrorLogging(ex);
     }
 }