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


C# ClsBAL.GetAPIID方法代码示例

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


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

示例1: GetCityIDsOfProviders

        private BusesSearchFilter GetCityIDsOfProviders(BusesSearchFilter objBusesSearchFilter, ClientAPIDetails objClientAPIDetails,
            int sourceId, int destinationId, String dateofjourney)
        {
            DataSet dsProviders = new DataSet();
            if (objClientAPIDetails.ProviderName != "MORNINGSTAR")
            {
                ClsBAL bal = new ClsBAL();
                bal.ProviderID = objClientAPIDetails.ProviderID;
                bal.sourceId = sourceId;
                bal.destionationId = destinationId;
                dsProviders = bal.GetAPIID();

                //DataTable DtRSources = new DataTable();
                //DataSet DsRSources = new DataSet();
                //DsRSources.ReadXml(System.Web.HttpContext.Current.Server.MapPath("~/App_Data/" + "SourcesAPI.xml"));
                //IEnumerable<DataRow> API_Source_ID = from i in DsRSources.Tables[0].AsEnumerable()
                //                                     where i.Field<string>("Source_ID") == sourceId.ToString() && i.Field<string>("Provider_Id") == objClientAPIDetails.ProviderID.ToString()
                //                                     select i;
                //if (API_Source_ID.Count() > 0)
                //{
                //    DtRSources = API_Source_ID.CopyToDataTable();
                //    DataSet ds = new DataSet();
                //    ds.Tables.Add(DtRSources);

                //}

            }
            else
            {
                ClsBAL bal = new ClsBAL();
                bal.ProviderID = 102;
                bal.sourceId = sourceId;
                bal.destionationId = destinationId;
                dsProviders = bal.GetAPIID();
            }

            //DataSet dsProviders = ExecuteDataSet("SELECT " + objClientAPIDetails.ProviderName + " FROM dbo.tbl_Sources WHERE Source_ID = '" + sourceId + "' " +
            //                                       "SELECT " + objClientAPIDetails.ProviderName + " FROM dbo.tbl_Sources WHERE Source_ID = '" + destinationId + "'");

            if (dsProviders.Tables[0].Rows.Count > 0 && dsProviders.Tables[1].Rows.Count > 0)
            {
            if (objClientAPIDetails.ProviderName == "BITLA")
            {
                foreach (DataRow bsdr in dsProviders.Tables[0].Rows)
                {
                    if (source_ids.ToString() == "")
                    {
                        source_ids = bsdr[0].ToString();
                    }
                    else
                    {
                        source_ids = source_ids + "," + bsdr[0].ToString();
                    }
                }
                foreach (DataRow bddr in dsProviders.Tables[1].Rows)
                {
                    if (Destination_Ids.ToString() == "")
                    {
                        Destination_Ids = bddr[0].ToString();
                    }
                    else
                    {
                        Destination_Ids = Destination_Ids + "," + bddr[0].ToString();
                    }
                }
            }
            else if (objClientAPIDetails.ProviderName == "TICKETGOOSE")
            {
                foreach (DataRow tsdr in dsProviders.Tables[0].Rows)
                {
                    if (Tsource_ids.ToString() == "")
                    {
                        Tsource_ids = tsdr[0].ToString();
                    }
                    else
                    {
                        Tsource_ids = Tsource_ids + "," + tsdr[0].ToString();
                    }
                }
                foreach (DataRow tddr in dsProviders.Tables[1].Rows)
                {
                    if (TDestination_Ids.ToString() == "")
                    {
                        TDestination_Ids = tddr[0].ToString();
                    }
                    else
                    {
                        TDestination_Ids = TDestination_Ids + "," + tddr[0].ToString();
                    }
                }
            }
            else if (objClientAPIDetails.ProviderName == "MORNINGSTAR")
            {
                foreach (DataRow msdr in dsProviders.Tables[0].Rows)
                {
                    if (Msource_ids.ToString() == "")
                    {
                        Msource_ids = msdr[0].ToString();
                    }
                    else
//.........这里部分代码省略.........
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:101,代码来源:WebModelClass.cs

示例2: GETBITLROUTES

        private AvailableTrips GETBITLROUTES(BusesSearchFilter objBusesSearchFilter, ClientAPIDetails objClientAPIDetails,
           int sourceId, int destinationId, String dateofjourney)
        {
            ClsBAL bal = new ClsBAL();
            bal.ProviderID = objClientAPIDetails.ProviderID;
            bal.sourceId = sourceId;
            bal.destionationId = destinationId;
            DataSet dsProviders = bal.GetAPIID();

            //DataSet dsProviders = ExecuteDataSet("SELECT " + objClientAPIDetails.ProviderName + " FROM dbo.tbl_Sources WHERE Source_ID = '" + sourceId + "' " +
            //                                       "SELECT " + objClientAPIDetails.ProviderName + " FROM dbo.tbl_Sources WHERE Source_ID = '" + destinationId + "'");

            if (dsProviders.Tables[0].Rows.Count > 0 && dsProviders.Tables[1].Rows.Count > 0)
            {
                if (objClientAPIDetails.ProviderName == "BITLA")
                {
                    for (int k = 0; k < dsProviders.Tables.Count; k++)
                    {

                        BSID = dsProviders.Tables[0].Rows[k][0].ToString() == "" ? 0 : int.Parse(dsProviders.Tables[0].Rows[k][0].ToString());
                        BDID = dsProviders.Tables[1].Rows[k][0].ToString() == "" ? 0 : Convert.ToInt32(dsProviders.Tables[1].Rows[k][0]);
                        if (BSID > 0 && BDID > 0)
                        {
                            BDate = dateofjourney;
                            BURL = objClientAPIDetails.APIURL + "/";
                            BConsumerKey = objClientAPIDetails.ConsumerKey;
                            BCOnsumerSecretKey = objClientAPIDetails.ConsumerSecret;
                            BPID = objClientAPIDetails.ProviderID;
                            BProviderName = objClientAPIDetails.ProviderName;
                            Tbus = BITLA(BURL, BConsumerKey, BCOnsumerSecretKey, BPID, BProviderName, BSID, BDID, BDate);
                            bus = trips(Tbus);
                        }
                    }
                }
            }

            dsProviders.Dispose();
            return bus;
        }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:39,代码来源:WebModelClass.cs


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