本文整理汇总了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);
}
示例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));
}
示例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);
}
}
示例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();
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}