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


C# SQLHandler.ExecuteAsObject方法代码示例

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


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

示例1: getTickerObject

 public TickerInfo getTickerObject(int tickerID)
 {
     List<KeyValuePair<string, object>> Parameter = new List<KeyValuePair<string, object>>();
     Parameter.Add(new KeyValuePair<string, object>("@tickerID", tickerID));
     SQLHandler sqlH = new SQLHandler();
     return sqlH.ExecuteAsObject<TickerInfo>("[usp_TickerGetByTickerID]", Parameter);
 }
开发者ID:Dashboard-X,项目名称:Aspxcommerce,代码行数:7,代码来源:TickerProvider.cs

示例2: GetActiveTemplate

 /// <summary>
 ///Connect to database and obtain active template.
 /// </summary>
 /// <param name="PortalID">PortalID</param>
 /// <returns>Object of TemplateInfo class.</returns>
 public static TemplateInfo GetActiveTemplate(int PortalID)
 {   
     SQLHandler sagesql = new SQLHandler();
     List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
     return (sagesql.ExecuteAsObject<TemplateInfo>("usp_sftemplate_GetActiveTemplate",ParaMeterCollection));
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:12,代码来源:TemplateDataProvider.cs

示例3: LoadSettingtoControl

    private void LoadSettingtoControl()
    {
        try
        {
            ddlSubscriptionType.Items.Clear();
            BindSubscriptionTypeList();

            List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@UserModuleID", usermoduleIDControl));
            ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", GetPortalID));
            SQLHandler objSql = new SQLHandler();
            NewsLetterSettingsInfo newsLetterSettingObj = objSql.ExecuteAsObject<NewsLetterSettingsInfo>("dbo.sp_NewsLetterSettingsGetAll", ParaMeterCollection);

            if (newsLetterSettingObj != null)
            {
                ddlSubscriptionType.SelectedIndex = ddlSubscriptionType.Items.IndexOf(ddlSubscriptionType.Items.FindByValue(newsLetterSettingObj.SubscriptionType.ToString()));
                txtSubscriptionModuleTitle.Text = newsLetterSettingObj.SubscriptionModuleTitle.ToString();
                txtSubscriptionHelpText.Text = newsLetterSettingObj.SubscriptionHelpText.ToString();
                txtTextBoxWaterMark.Text = newsLetterSettingObj.TextBoxWaterMarkText.ToString()!=""?newsLetterSettingObj.TextBoxWaterMarkText.ToString():"Email Address Required";
                txtSubmitButtonText.Text = newsLetterSettingObj.SubmitButtonText.ToString();
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
开发者ID:electrono,项目名称:veg-web,代码行数:27,代码来源:SubscriptionSetting.ascx.cs

示例4: GetNewsLetterSettings

 private void GetNewsLetterSettings()
 {
     List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@UserModuleID", usermoduleIDControl));
     ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", GetPortalID));
     SQLHandler objSql = new SQLHandler();
     newsLetterSettingObj = objSql.ExecuteAsObject<NewsLetterSettingsInfo>("dbo.sp_NewsLetterSettingsGetAll", ParaMeterCollection);
     lblHelpText.Text = "<p>" + newsLetterSettingObj.SubscriptionHelpText.ToString() + "</p>";
     txtWatermarkExtender.WatermarkText = newsLetterSettingObj.TextBoxWaterMarkText.ToString() != "" ? newsLetterSettingObj.TextBoxWaterMarkText.ToString() : "Email Address Required";
     btnSubscribe.Text = newsLetterSettingObj.SubmitButtonText.ToString();
     btnSubscribe.ToolTip = newsLetterSettingObj.SubmitButtonText.ToString();
 }
开发者ID:electrono,项目名称:veg-web,代码行数:12,代码来源:Subscription.ascx.cs

示例5: GetHeaderItemsCount

 public HeaderItemsCount GetHeaderItemsCount(AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List<KeyValuePair<string, object>> parameter = CommonParmBuilder.GetFullParam(aspxCommonObj);
         SQLHandler sqlH = new SQLHandler();
         return sqlH.ExecuteAsObject<HeaderItemsCount>("[usp_Aspx_GetHeaderItemsCount]", parameter);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:13,代码来源:AspxHeaderProvider.cs

示例6: NotificationGetAll

 public static NotificationGetAllInfo NotificationGetAll(AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List<KeyValuePair<string, object>> parameterCollection = CommonParmBuilder.GetParamSP(aspxCommonObj);
         SQLHandler sqlH = new SQLHandler();
         NotificationGetAllInfo listInfo = sqlH.ExecuteAsObject<NotificationGetAllInfo>("[dbo].[usp_Aspx_NotificationGetAll]", parameterCollection);
         return listInfo;
     }
     catch (Exception e)
     {
         throw e;
     }
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:14,代码来源:AdminNotificationProvider.cs

示例7: GetPaymentGatewaysSetting

 /// <summary>
 /// Connects to database and returns  Payment Gateways and their setting values.
 /// </summary>
 /// <param name="portalID">portalID</param>
 /// <returns>PaymentGatewayInfo object containg settingkey and values of Payment Gateway.</returns>
 public PaymentGatewayInfo GetPaymentGatewaysSetting(int portalID)
 {
     try
     {
         List<KeyValuePair<string, object>> Param = new List<KeyValuePair<string, object>>();
         Param.Add(new KeyValuePair<string, object>("@PortalID", portalID));
         SQLHandler sqlh = new SQLHandler();
         return sqlh.ExecuteAsObject<PaymentGatewayInfo>("usp_PaymentGatewaySetting_GetSettingValue", Param);
     }
     catch
     {
         throw;
     }
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:19,代码来源:PaymentDataProvider.cs

示例8: GetOrderStatusDetailByOrderStatusID

  public static OrderStatusListInfo GetOrderStatusDetailByOrderStatusID(AspxCommonInfo aspxCommonObj,int OrderStatusID)
 {
     try
     {
         List<KeyValuePair<string, object>> parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         parameter.Add(new KeyValuePair<string, object>("@OrderStatusID", OrderStatusID));
         SQLHandler sqlH = new SQLHandler();
         OrderStatusListInfo lstOrderStat = sqlH.ExecuteAsObject<OrderStatusListInfo>("[dbo].[usp_Aspx_GetOrderStatusDetailByOrderStatusID]", parameter);
         return lstOrderStat;
     }
     catch (Exception e)
     {
         throw e;
     }
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:15,代码来源:AspxOrderStatusMgntProvider.cs

示例9: GetLatestItemSetting

 public LatestItemSettingInfo GetLatestItemSetting(AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List<KeyValuePair<string, object>> parameterCollection = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         SQLHandler sqlH = new SQLHandler();
         LatestItemSettingInfo objLatestSetting = new LatestItemSettingInfo();
         objLatestSetting = sqlH.ExecuteAsObject<LatestItemSettingInfo>("[dbo].[usp_Aspx_LatestItemSettingGet]", parameterCollection);
         return objLatestSetting;
     }
     catch (Exception e)
     {
         throw e;
     }
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:15,代码来源:AspxLatestItemsProvider.cs

示例10: GetYouMayAlsoLikeSetting

 public YouMayAlsoLikeSettingInfo GetYouMayAlsoLikeSetting(AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List<KeyValuePair<string, object>> paramCol = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         SQLHandler sqlH = new SQLHandler();
         YouMayAlsoLikeSettingInfo view =
             sqlH.ExecuteAsObject<YouMayAlsoLikeSettingInfo>("[dbo].[usp_Aspx_YouMayAlsoLikeSettingGet]", paramCol);
         return view;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:15,代码来源:AspxYouMayAlsoLikeProvider.cs

示例11: GetAllStoreSettings

 public static StoreSettingInfo GetAllStoreSettings(AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List<KeyValuePair<string, object>> parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         SQLHandler sqlH = new SQLHandler();
         StoreSettingInfo DefaultStoreSettings;
         DefaultStoreSettings = sqlH.ExecuteAsObject<StoreSettingInfo>("usp_Aspx_GetAllStoreSettings", parameter);
         return DefaultStoreSettings;
     }
     catch (Exception e)
     {
         throw e;
     }
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:15,代码来源:AspxStoreSetProvider.cs

示例12: GetCorporateBannerDetailsByBannerID

        //public sp_PagePortalGetByCustomPrefixResult GetAllPagesLists(string prefix, System.Nullable<bool>  isActive, System.Nullable<bool>  isDeleted, System.Nullable<int> portalID, string username, System.Nullable<bool> isVisible, System.Nullable<bool> isRequiredPage)
        //{
        //    try
        //    {
        //        List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
        //        ParaMeterCollection.Add(new KeyValuePair<string, object>("@prefix", prefix));
        //        ParaMeterCollection.Add(new KeyValuePair<string, object>("@IsActive", isActive));
        //        ParaMeterCollection.Add(new KeyValuePair<string, object>("@IsDeleted", isDeleted));
        //        ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", portalID));
        //        ParaMeterCollection.Add(new KeyValuePair<string, object>("@Username", username));
        //        ParaMeterCollection.Add(new KeyValuePair<string, object>("@IsVisible", isVisible));
        //        ParaMeterCollection.Add(new KeyValuePair<string, object>("@IsRequiredPage", isRequiredPage));
        //        SQLHandler objsql = new SQLHandler();
        //        return objsql.ExecuteAsObject<sp_PagePortalGetByCustomPrefixResult>("[dbo].[sp_PagePortalGetByCustomPrefix]", ParaMeterCollection);
        //    }
        //    catch (Exception e)
        //    {
        //        throw e;
        //    }
        //}

        public BannerInfo GetCorporateBannerDetailsByBannerID(int BannerID, int PortalID)
        {
            try
            {
                List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
                ParaMeterCollection.Add(new KeyValuePair<string, object>("@BannerID", BannerID));
                ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
                SQLHandler objsql = new SQLHandler();
                return objsql.ExecuteAsObject<BannerInfo>("[dbo].[usp_CorporateBannerGetByBannerID]", ParaMeterCollection);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
开发者ID:electrono,项目名称:veg-web,代码行数:36,代码来源:BannerSqlProvider.cs

示例13: HtmlCommentGetByHTMLCommentID

 /// <summary>
 /// Connects to database and returns HTML comments by HTMLCommentID
 /// </summary>
 /// <param name="PortalID">portalID</param>
 /// <param name="HTMLCommentID">HTMLCommentID</param>
 /// <returns>Returns HTML Comments</returns>
 public HTMLContentInfo HtmlCommentGetByHTMLCommentID(int PortalID, int HTMLCommentID)
 {
     try
     {
         List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
         ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
         ParaMeterCollection.Add(new KeyValuePair<string, object>("@HTMLCommentID", HTMLCommentID));
         SQLHandler sq = new SQLHandler();
         return sq.ExecuteAsObject<HTMLContentInfo>("dbo.sp_HtmlCommentGetByHTMLCommentID", ParaMeterCollection);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:21,代码来源:HTMLDataProvider.cs

示例14: GetHeaderSetting

 public static HeaderSettingInfo GetHeaderSetting(AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List<KeyValuePair<string, object>> parameterCollection = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         SQLHandler sqlHandle = new SQLHandler();
         HeaderSettingInfo objHeadSetting = new HeaderSettingInfo();
         objHeadSetting = sqlHandle.ExecuteAsObject<HeaderSettingInfo>("[usp_Aspx_GetHeaderSettings]", parameterCollection);
         return objHeadSetting;
     }
     catch (Exception e)
     {
         throw e;
     }
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:15,代码来源:AspxHeaderProvider.cs

示例15: GetSystemEventStartUpDetails

        /// <summary>
        /// Connects to database and returns the startup control's details  by portalStartUpID.
        /// </summary>
        /// <param name="PortalStartUpID">PortalStartUpID</param>
        /// <returns>Details of startup event.</returns>
        public SystemEventStartUpInfo GetSystemEventStartUpDetails(int PortalStartUpID)
        {
            try
            {
                string sp = "[dbo].[usp_GetSystemEventStartUpDetails]";
                SQLHandler SQLH = new SQLHandler();
                List<KeyValuePair<string, object>> ParamCollInput = new List<KeyValuePair<string, object>>();
                ParamCollInput.Add(new KeyValuePair<string, object>("@PortalStartUpID", PortalStartUpID));
                return SQLH.ExecuteAsObject<SystemEventStartUpInfo>(sp, ParamCollInput);
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:21,代码来源:SystemStartupController.cs


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