本文整理汇总了C#中SQLHandler类的典型用法代码示例。如果您正苦于以下问题:C# SQLHandler类的具体用法?C# SQLHandler怎么用?C# SQLHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SQLHandler类属于命名空间,在下文中一共展示了SQLHandler类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: DeleteSearchTerm
public static void DeleteSearchTerm(string Ids, AspxCommonInfo aspxCommonObj)
{
List<KeyValuePair<string, object>> parameter = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
parameter.Add(new KeyValuePair<string, object>("@SearchTermID", Ids));
SQLHandler sqlH = new SQLHandler();
sqlH.ExecuteNonQuery("usp_Aspx_DeleteSearchTerm", parameter);
}
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:7,代码来源:AspxSearchTermMgntProvider.cs
示例2: GetAllRoles
public static List<Roles> GetAllRoles(int portalID,bool isAll,string userName)
{
List<Roles> lstRoles = new List<Roles>();
string StoredProcedureName = "sp_PortalRoleList";
SQLHandler sagesql = new SQLHandler();
List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", portalID));
ParaMeterCollection.Add(new KeyValuePair<string, object>("@IsAll", isAll));
ParaMeterCollection.Add(new KeyValuePair<string, object>("@UserName", userName));
SqlDataReader SQLReader = null;
try
{
SQLReader = sagesql.ExecuteAsDataReader(StoredProcedureName, ParaMeterCollection);
while (SQLReader.Read())
{
Roles obj = new Roles();
obj.RoleID = new Guid(SQLReader["RoleID"].ToString());
obj.RoleName = SQLReader["RoleName"].ToString();
lstRoles.Add(obj);
}
}
catch(Exception)
{
}
finally
{
if (SQLReader != null)
{
SQLReader.Close();
}
}
return lstRoles;
}
开发者ID:RexSystemsbd,项目名称:SageFrameV2.1Source,代码行数:35,代码来源:PermissionHelper.cs
示例3: AddUpdateCoupons
public void AddUpdateCoupons(int couponID, int couponTypeID, string couponCode, string couponAmount, string validateFrom, string validateTo,
string isActive, int storeID, int portalID, string cultureName, string userName, string settingIDs, string settingValues, string portalUser_UserName)
{
try
{
List<KeyValuePair<string, object>> parameter = new List<KeyValuePair<string, object>>();
parameter.Add(new KeyValuePair<string, object>("@CouponID", couponID));
parameter.Add(new KeyValuePair<string, object>("@CouponTypeID", couponTypeID));
parameter.Add(new KeyValuePair<string, object>("@CouponCode", couponCode));
parameter.Add(new KeyValuePair<string, object>("@CouponAmount", couponAmount));
parameter.Add(new KeyValuePair<string, object>("@ValidateFrom", validateFrom));
parameter.Add(new KeyValuePair<string, object>("@ValidateTo", validateTo));
parameter.Add(new KeyValuePair<string, object>("@IsActive", isActive));
parameter.Add(new KeyValuePair<string, object>("@StoreID", storeID));
parameter.Add(new KeyValuePair<string, object>("@PortalID", portalID));
parameter.Add(new KeyValuePair<string, object>("@CultureName", cultureName));
parameter.Add(new KeyValuePair<string, object>("@UserName", userName));
parameter.Add(new KeyValuePair<string, object>("@SettingIDs", settingIDs));
parameter.Add(new KeyValuePair<string, object>("@SettingValues", settingValues));
parameter.Add(new KeyValuePair<string, object>("@portalUser_UserName", portalUser_UserName));
SQLHandler sqlH = new SQLHandler();
sqlH.ExecuteNonQuery("usp_Aspx_AddUpdateCoupons", parameter);
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:Dashboard-X,项目名称:Aspxcommerce,代码行数:28,代码来源:CouponManageSQLProvider.cs
示例4: GetAttributesInputType
/// <summary>
/// To Bind Attribute Type dropdown
/// </summary>
/// <returns></returns>
public List<AttributesInputTypeInfo> GetAttributesInputType()
{
List<AttributesInputTypeInfo> ml;
SQLHandler sqlH = new SQLHandler();
ml = sqlH.ExecuteAsList<AttributesInputTypeInfo>("dbo.usp_Aspx_AttributesInputTypeGetAll");
return ml;
}
开发者ID:Dashboard-X,项目名称:Aspxcommerce,代码行数:11,代码来源:ItemAttributesManagementSqlProvider.cs
示例5: GetRoleIDByRoleName
/// <summary>
/// Connects to database and returns roles details by role name.
/// </summary>
/// <param name="RoleName">Role name.</param>
/// <returns>Role details.</returns>
public RolesManagementInfo GetRoleIDByRoleName(string RoleName)
{
SqlDataReader reader = null;
try
{
SQLHandler SQLH = new SQLHandler();
List<KeyValuePair<string, object>> ParamCollInput = new List<KeyValuePair<string, object>>();
ParamCollInput.Add(new KeyValuePair<string, object>("@RoleName", RoleName));
reader = SQLH.ExecuteAsDataReader("[dbo].[sp_GetRoleIDByRoleName]", ParamCollInput);
RolesManagementInfo objList = new RolesManagementInfo();
while (reader.Read())
{
objList.ApplicationId = new Guid(reader["ApplicationId"].ToString());
objList.RoleId = new Guid(reader["RoleId"].ToString());
objList.RoleName = reader["RoleName"].ToString();
objList.LoweredRoleName = reader["LoweredRoleName"].ToString();
objList.Description = reader["Description"].ToString();
}
reader.Close();
return objList;
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (reader != null)
{
reader.Close();
}
}
}
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:39,代码来源:RolesManagementProvider.cs
示例6: ParseIPN
public void ParseIPN(int orderId, string transId, string status, int storeId, int portalId, string userName, int customerId, string sessionCode)
{
var ph = new PayPalHandler();
try
{
var ot = new OrderDetailsCollection();
var odinfo = new OrderDetailsInfo();
var cms = new CartManageSQLProvider();
var cf = new CommonInfo {StoreID = storeId, PortalID = portalId, AddedBy = userName};
// UpdateOrderDetails
var sqlH = new SQLHandler();
// use split to split array we already have using "=" as delimiter
// WcfSession ws = new WcfSession();
odinfo.OrderID = orderId;//ws.GetSessionVariable("OrderID");
odinfo.ResponseReasonText = status;
odinfo.TransactionID = transId;
ot.ObjOrderDetails = odinfo;
ot.ObjCommonInfo = cf;
odinfo.OrderStatusID = 8;
AspxOrderController.UpdateOrderDetails(ot);
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:30,代码来源:PayPalHandler.cs
示例7: GetPricingRuleAttributes
public static List<PricingRuleAttributeInfo> GetPricingRuleAttributes(AspxCommonInfo aspxCommonObj)
{
SQLHandler sqlHandler = new SQLHandler();
List<KeyValuePair<string, object>> paramList = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
List<PricingRuleAttributeInfo> lstPriceRuleAttr = sqlHandler.ExecuteAsList<PricingRuleAttributeInfo>("usp_Aspx_GetPricingRuleAttr", paramList);
return lstPriceRuleAttr;
}
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:7,代码来源:AspxCatalogPriceRuleProvider.cs
示例8: AddProfile
public int AddProfile(string Name, int PropertyTypeID, string DataType, bool IsRequired, bool IsActive, DateTime AddedOn, int PortalID, string AddedBy)
{
try
{
string sp = "[dbo].[sp_ProfileAdd]";
SQLHandler SQLH = new SQLHandler();
List<KeyValuePair<string, object>> ParamCollInput = new List<KeyValuePair<string, object>>();
ParamCollInput.Add(new KeyValuePair<string, object>("@Name", Name));
ParamCollInput.Add(new KeyValuePair<string, object>("@PropertyTypeID", PropertyTypeID));
ParamCollInput.Add(new KeyValuePair<string, object>("@DataType", DataType));
ParamCollInput.Add(new KeyValuePair<string, object>("@IsRequired", IsRequired));
ParamCollInput.Add(new KeyValuePair<string, object>("@IsActive", IsActive));
ParamCollInput.Add(new KeyValuePair<string, object>("@AddedOn", AddedOn));
ParamCollInput.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
ParamCollInput.Add(new KeyValuePair<string, object>("@AddedBy", AddedBy));
int PID = SQLH.ExecuteNonQueryAsGivenType<int>(sp, ParamCollInput, "@ProfileID");
return PID;
}
catch (Exception)
{
throw;
}
}
开发者ID:RexSystemsbd,项目名称:SageFrameV2.1Source,代码行数:26,代码来源:ProfileManagementProvider.cs
示例9: btnSubmit_Click
protected void btnSubmit_Click(object sender, EventArgs e)
{
if(passBox.Text == confirmBox.Text)
{
SQLHandler sql = new SQLHandler();
int status = sql.CreateUser(emailBox.Text, passBox.Text, nameBox.Text);
if(status == 0)
{
statusLabel.ForeColor = Color.Green;
statusLabel.Text = "User created successfully!";
}
else if(status == 1)
{
statusLabel.ForeColor = Color.Red;
statusLabel.Text = "Backend error, please try again.";
}
else if (status == 2)
{
statusLabel.ForeColor = Color.Red;
statusLabel.Text = "Name already taken.";
}
else if (status == 3)
{
statusLabel.ForeColor = Color.Red;
statusLabel.Text = "Email already being used.";
}
}
else
{
statusLabel.ForeColor = Color.Red;
statusLabel.Text = "Passwords doesn't match!";
}
}
开发者ID:Gallopsalot,项目名称:SurveyPortal,代码行数:33,代码来源:Register.aspx.cs
示例10: NotificationSaveUpdateSettings
public static void NotificationSaveUpdateSettings(NotificationSettingsInfo saveUpdateInfo, AspxCommonInfo aspxCommonObj)
{
try
{
List<KeyValuePair<string, object>> parameterCollection = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
parameterCollection.Add(new KeyValuePair<string, object>("@AllActive", saveUpdateInfo.AllActive));
parameterCollection.Add(new KeyValuePair<string, object>("@UserNotificationActive", saveUpdateInfo.UserNotificationActive));
parameterCollection.Add(new KeyValuePair<string, object>("@UserNotificationCount", saveUpdateInfo.UserNotificationCount));
parameterCollection.Add(new KeyValuePair<string, object>("@SubscriptionNotificationActive ", saveUpdateInfo.SubscriptionNotificationActive));
parameterCollection.Add(new KeyValuePair<string, object>("@SubscriptionNotificationCount", saveUpdateInfo.SubscriptionNotificationCount));
parameterCollection.Add(new KeyValuePair<string, object>("@OutofStockNotificationActive", saveUpdateInfo.OutofStockNotificationActive));
parameterCollection.Add(new KeyValuePair<string, object>("@OutofStockNotificationCount", saveUpdateInfo.OutofStockNotificationCount));
parameterCollection.Add(new KeyValuePair<string, object>("@ItemsLowStockNotificationActive", saveUpdateInfo.ItemsLowStockNotificationActive));
parameterCollection.Add(new KeyValuePair<string, object>("@ItemsLowStockCount", saveUpdateInfo.ItemsLowStockCount));
parameterCollection.Add(new KeyValuePair<string, object>("@OrdersNotificationAtive", saveUpdateInfo.OrdersNotificationAtive));
parameterCollection.Add(new KeyValuePair<string, object>("@OrdersNotificationCount", saveUpdateInfo.OrdersNotificationCount));
SQLHandler sqlH = new SQLHandler();
sqlH.ExecuteNonQuery("[dbo].[usp_Aspx_NotificationSaveUpdateSettings]", parameterCollection);
}
catch (Exception e)
{
throw e;
}
}
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:25,代码来源:AdminNotificationProvider.cs
示例11: 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
示例12: 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
示例13: 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
示例14: ContactUsGetAll
public List<ContactUsInfo> ContactUsGetAll(int portalID)
{
List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", portalID));
SQLHandler sqlH = new SQLHandler();
return sqlH.ExecuteAsList<ContactUsInfo>("sp_ContactUsGetAll", ParaMeterCollection);
}
开发者ID:RexSystemsbd,项目名称:SageFrameV2.1Source,代码行数:7,代码来源:ContactUsDataProvider.cs
示例15: SaveLinks
public void SaveLinks(List<CDNInfo> objInfo)
{
SQLHandler sagesql = new SQLHandler();
string sp = "[dbo].[usp_CDNSaveLink]";
foreach (CDNInfo cdn in objInfo)
{
List<KeyValuePair<string, object>> ParamCollInput = new List<KeyValuePair<string, object>>();
ParamCollInput.Add(new KeyValuePair<string, object>("@URL", cdn.URL));
ParamCollInput.Add(new KeyValuePair<string, object>("@IsJS", cdn.IsJS));
ParamCollInput.Add(new KeyValuePair<string, object>("@URLOrder", cdn.URLOrder));
ParamCollInput.Add(new KeyValuePair<string, object>("@PortalID", cdn.PortalID));
ParamCollInput.Add(new KeyValuePair<string, object>("@Mode", cdn.Mode));
try
{
sagesql.ExecuteNonQuery(sp, ParamCollInput);
}
catch (Exception)
{
throw;
}
}
}
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:26,代码来源:CDNProvider.cs
示例16: GetAttributesInputType
/// <summary>
/// To Bind Attribute Type dropdown
/// </summary>
/// <returns></returns>
public List<AttributesInputTypeInfo> GetAttributesInputType()
{
List<AttributesInputTypeInfo> ml = new List<AttributesInputTypeInfo>();
SQLHandler Sq = new SQLHandler();
ml = Sq.ExecuteAsList<AttributesInputTypeInfo>("dbo.usp_ASPX_AttributesInputTypeGetAll");
return ml;
}
开发者ID:electrono,项目名称:veg-web,代码行数:11,代码来源:ItemAttributesManagementSqlProvider.cs
示例17: GetUserAgent
public string GetUserAgent(int PortalID, bool IsActive)
{
string sp = "[dbo].[usp_UserAgentGetType]";
SQLHandler sagesql = new SQLHandler();
string content = "";
SqlDataReader reader = null;
try
{
List<KeyValuePair<string, object>> paramColl = new List<KeyValuePair<string, object>>();
paramColl.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
paramColl.Add(new KeyValuePair<string, object>("@IsActive", IsActive));
reader = sagesql.ExecuteAsDataReader(sp, paramColl);
while (reader.Read())
{
content = reader["AgentMode"] as string;
}
}
catch (Exception)
{
throw;
}
finally
{
if (reader != null)
{
reader.Close();
}
}
return content;
}
开发者ID:RexSystemsbd,项目名称:SageFrameV2.1Source,代码行数:31,代码来源:UserAgentProvider.cs
示例18: UpdateStoreLocation
public static bool UpdateStoreLocation(AspxCommonInfo aspxCommonObj, string storeName, String storeDescription, string streetName, string localityName, string city, string state, string country, string zip, double latitude, double longitude)
{
List<KeyValuePair<string, object>> parameterCollection = CommonParmBuilder.GetParamSPU(aspxCommonObj);
parameterCollection.Add(new KeyValuePair<string, object>("@StoreName", storeName));
parameterCollection.Add(new KeyValuePair<string, object>("@StoreDescription", storeDescription));
parameterCollection.Add(new KeyValuePair<string, object>("@StreetName", streetName));
parameterCollection.Add(new KeyValuePair<string, object>("@LocalityName", localityName));
parameterCollection.Add(new KeyValuePair<string, object>("@City", city));
parameterCollection.Add(new KeyValuePair<string, object>("@State", state));
parameterCollection.Add(new KeyValuePair<string, object>("@Country", country));
parameterCollection.Add(new KeyValuePair<string, object>("@ZIP", zip));
parameterCollection.Add(new KeyValuePair<string, object>("@Latitude", latitude));
parameterCollection.Add(new KeyValuePair<string, object>("@Longitude", longitude));
try
{
SQLHandler sqlH = new SQLHandler();
sqlH.ExecuteNonQuery("usp_Aspx_StoreLocatorLocationUpdate", parameterCollection);
return true;
}
catch (Exception e)
{
return false;
throw e;
}
}
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:25,代码来源:AspxStoreLocateProvider.cs
示例19: AddUpdateSageFrameSearchSetting
public void AddUpdateSageFrameSearchSetting(SageFrameSearchSettingInfo objSearchSettingInfo, int PortalID, string CultureName, string AddedBy)
{
try
{
string SettingKeys = string.Empty;
string SettingValues = string.Empty;
//Pre pare Key value for the save;
SettingKeys = "SearchButtonType#SearchButtonText#SearchButtonImage#SearchResultPerPage#SearchResultPageName#MaxSearchChracterAllowedWithSpace";
SettingValues = objSearchSettingInfo.SearchButtonType.ToString() + "#" + objSearchSettingInfo.SearchButtonText + "#" +
objSearchSettingInfo.SearchButtonImage + "#" + objSearchSettingInfo.SearchResultPerPage.ToString() +
"#" + objSearchSettingInfo.SearchResultPageName +
"#" + objSearchSettingInfo.MaxSearchChracterAllowedWithSpace.ToString();
List<KeyValuePair<string, string>> ParaMeterCollection = new List<KeyValuePair<string, string>>();
ParaMeterCollection.Add(new KeyValuePair<string, string>("@SettingKeys", SettingKeys));
ParaMeterCollection.Add(new KeyValuePair<string, string>("@SettingValues", SettingValues));
ParaMeterCollection.Add(new KeyValuePair<string, string>("@CultureName", CultureName));
ParaMeterCollection.Add(new KeyValuePair<string, string>("@PortalID", PortalID.ToString()));
ParaMeterCollection.Add(new KeyValuePair<string, string>("@AddedBy", AddedBy));
SQLHandler sagesql = new SQLHandler();
sagesql.ExecuteNonQuery("dbo.sp_SageFrameSearchSettingValueAddUpdate", ParaMeterCollection);
}
catch (Exception e)
{
throw e;
}
}
开发者ID:electrono,项目名称:veg-web,代码行数:30,代码来源:SageFrameSearch.cs
示例20: GetRobots
/// <summary>
/// Connects to database and returns RobotsInfo list for given PortalID.
/// </summary>
/// <param name="PortalID">PortalID</param>
/// <returns>RobotsInfo List</returns>
public static List<RobotsInfo> GetRobots(int PortalID)
{
List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>();
ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
SqlDataReader reader = null;
try
{
SQLHandler Objsql = new SQLHandler();
reader = Objsql.ExecuteAsDataReader("[dbo].[usp_SEOGetRobots]", ParaMeterCollection);
List<RobotsInfo> lstRobots = new List<RobotsInfo>();
while (reader.Read())
{
lstRobots.Add(new RobotsInfo(reader["PageName"].ToString(), reader["TabPath"].ToString(), reader["SEOName"].ToString(), reader["Description"].ToString()));
}
return lstRobots;
}
catch (Exception)
{
throw;
}
finally
{
if (reader != null)
{
reader.Close();
}
}
}
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:36,代码来源:RobotsDataProvider.cs
注:本文中的SQLHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论