当前位置: 首页>>代码示例>>C#>>正文


C# ClsBAL.GetSourcess方法代码示例

本文整理汇总了C#中BAL.ClsBAL.GetSourcess方法的典型用法代码示例。如果您正苦于以下问题:C# ClsBAL.GetSourcess方法的具体用法?C# ClsBAL.GetSourcess怎么用?C# ClsBAL.GetSourcess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BAL.ClsBAL的用法示例。


在下文中一共展示了ClsBAL.GetSourcess方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetCities

    public static List<string> GetCities(string prefixText)
    {
        try
        {
            DataSet ds = null;
            if (HttpContext.Current.Session["Cities"] != null)
            {
                ds = (DataSet)HttpContext.Current.Session["Cities"];
            }
            else
            {
                ClsBAL objBAL = new ClsBAL();
                ds = objBAL.GetSourcess();
            }

            string filteringquery = "SourceName LIKE'" + prefixText + "%'";
            DataRow[] dr = ds.Tables[0].Select(filteringquery);
            DataTable dtNew = new DataTable();
            dtNew = ds.Tables[0].Clone();
            foreach (DataRow drNew in dr)
            {
                dtNew.ImportRow(drNew);
            }

            List<string> airports = new List<string>();
            for (int i = 0; i < dtNew.Rows.Count; i++)
            {
                airports.Add(dtNew.Rows[i]["SourceName"].ToString().Trim());//+ " ||| " + dtNew.Rows[i]["ID"].ToString().Trim().ToString());
            }
            return airports;
        }
        catch (Exception)
        {
            throw;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:36,代码来源:Bus_Search1.aspx.cs

示例2: txtTo_TextChanged

    protected void txtTo_TextChanged(object sender, EventArgs e)
    {
        DataSet ds = null;
        if (HttpContext.Current.Session["Cities"] != null)
        {
            ds = (DataSet)HttpContext.Current.Session["Cities"];
        }
        else
        {
            ClsBAL objBAL = new ClsBAL();
            ds = objBAL.GetSourcess();
        }

        string filteringquery = "SourceName LIKE'" + txtTo.Text.ToString() + "%'";
        DataRow[] dr = ds.Tables[0].Select(filteringquery);
        DataTable dtNew = new DataTable();
        dtNew = ds.Tables[0].Clone();
        foreach (DataRow drNew in dr)
        {
            dtNew.ImportRow(drNew);
        }

        if (dtNew.Rows.Count >= 1)
        {
            HttpContext.Current.Session["ToCityId"] = dtNew.Rows[0]["ID"].ToString();
            txtFromDate.Focus();
        }
        else
        {
            HttpContext.Current.Session["ToCityId"] = null;
            ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('" + "Please enter valid city." + "');</script>", false);
            return;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:34,代码来源:Bus_Search1.aspx.cs

示例3: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        objArzooHotelAPILayer = ArzooHotelFactoryManager.GetArzooHotelAPILayerObject();
         objArzooHotelAPILayer.UserName = ArzooHotelConstants.USERNAME;
         objArzooHotelAPILayer.UserId = ArzooHotelConstants.USERID;
         objArzooHotelAPILayer.UserType = ArzooHotelConstants.USERTYPE;
         objArzooHotelAPILayer.Password = ArzooHotelConstants.PASSWORD;
         objArzooHotelAPILayer.PartnerId = ArzooHotelConstants.PARTNERID;
        //if (!IsPostBack)
        //{
        //  BindRemainders();
        //   BindNotices();
        //}
        try
        {
            kesineniDetails = new KesineniDetails();
            kesineniDetails.LoginId = KesineniConstants.LoginId;
            kesineniDetails.PassWord = KesineniConstants.Password;

            abhiBusDetails = new AbhiBusDetails();
            abhiBusDetails.Url = AbhiBusConstants.URL;

            bitlaDetails = new BitlaDetails();
            bitlaDetails.ApiKey = BitlaConstants.API_KEY;
            bitlaDetails.Url = BitlaConstants.URL;

            objCommon = new KABCommon(kesineniDetails, abhiBusDetails, bitlaDetails);
            this.Page.Title = "LoveJourney - Bus - Search";

            if (!IsPostBack)
            {

                Panel pnl = (Panel)this.Master.FindControl("pnl");
                pnl.Visible = false;

                pnlAdminDomesticFlights.Visible = false;
                BindRemainders();
                // BindNotices();
                 adminPanelBuses.Visible = false;
               // CheckPermission("Book Ticket", Session["Role"].ToString());
                 pnlAdminHotels.Visible = false;
                 #region DomesticFlights
                // CheckPermission("Domestic Availability", Session["Role"].ToString());
                 //  GetIntFlightsAvailability();
                 gdvFlights.Visible = true;
                 round.Visible = false;
        #endregion

                 #region BusesSearch

                 objDataSet = null;
                if (objDataSet == null)
                {
                    objBAL = new ClsBAL();
                    objDataSet = objBAL.GetSourcess();
                }
                if (objDataSet != null)
                {
                    if (objDataSet.Tables.Count > 0)
                    {
                        if (objDataSet.Tables[0].Rows.Count > 0)
                        {
                            ddlSources.DataSource = objDataSet.Tables[0];
                            ddlSources.DataTextField = "SourceName";
                            ddlSources.DataValueField = "ID";
                            ddlSources.DataBind();
                            ddlSources.Items.Insert(0, "----------");
                            ddlDestinations.Items.Clear();
                            ddlDestinations.Items.Insert(0, "----------");
                        }
                    }
                }
                ddlSources.SelectedValue = ddlSources.Items.FindByText("Hyderabad").Value;
                ddlSources_SelectedIndexChanged(sender, e);
                ddlDestinations.SelectedValue = ddlDestinations.Items.FindByText("Bangalore").Value;

                Session["DOJ"] = txtFromDate.Text.ToString();
                Session["From"] = ddlSources.SelectedItem.Text.ToString();
                Session["To"] = ddlDestinations.SelectedItem.Text.ToString();
                 #endregion

            }
        }
        catch (Exception)
        {
            throw;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:88,代码来源:AdminDashBoard.aspx.cs


注:本文中的BAL.ClsBAL.GetSourcess方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。