本文整理汇总了C#中ReplyPositiveBL.DatabaseHelper.AddParameter方法的典型用法代码示例。如果您正苦于以下问题:C# DatabaseHelper.AddParameter方法的具体用法?C# DatabaseHelper.AddParameter怎么用?C# DatabaseHelper.AddParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ReplyPositiveBL.DatabaseHelper
的用法示例。
在下文中一共展示了DatabaseHelper.AddParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTop5AutomationJobs
public static DataTable GetTop5AutomationJobs(int Status, String ConnectionString)
{
DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
bool ExecutionState = false;
// Pass the specified field and its value to the stored procedure.
oDatabaseHelper.AddParameter("@Status", Status);
// The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);
SqlDataReader drCampaigns = (SqlDataReader)oDatabaseHelper.ExecuteReader("sp_AutomationJob_GetTop5CampaignJobs", ref ExecutionState);
//CampaignJobs CampaignJobs = PopulateObjectsFromReader(dr, ConnectionString);
//dr.Close();
DataTable dt = new DataTable();
// Add the table columns.
for (int i = 0; i < drCampaigns.FieldCount; i++)
dt.Columns.Add(drCampaigns.GetName(i), drCampaigns.GetFieldType(i));
while (drCampaigns.Read())
{
DataRow r = dt.NewRow();
// Assign DataReader values to DataRow.
for (int i = 0; i < drCampaigns.FieldCount; i++)
r[i] = drCampaigns[i];
dt.Rows.Add(r);
}
drCampaigns.Close();
oDatabaseHelper.Dispose();
return dt;
}
示例2: SearchDomainLookup
public static DataTable SearchDomainLookup(string ConnectionString, string Domain, string ListIds)
{
try
{
using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
{
bool ExecutionState = false;
//StringBuilder whereCondition = new StringBuilder();
//Domain = Domain.Replace("'", "''");
//Domain = Domain.Replace("%", "[%]");
//Domain = Domain.Replace("_", "[_]");
//if (!string.IsNullOrEmpty(Domain))
//{
// if (whereCondition.Length > 0)
// whereCondition.Append(" OR %" + Domain + "%");
// else whereCondition.Append(" %" + Domain + "%");
//}
//if (whereCondition.Length == 0)
//{
// whereCondition.Append("1=1");
//}
string whereCondition = "%" + Domain + "%";
oDatabaseHelper.AddParameter("@ListIDs", ListIds.ToString());
oDatabaseHelper.AddParameter("@whereCondition", whereCondition.ToString());
DataSet dataSet = oDatabaseHelper.ExecuteDataSet("sp_ListMaster_SearchDomainName", ref ExecutionState);
return dataSet.Tables[0];
}
}
catch (Exception ex)
{
throw ex;
}
}
示例3: getSegmentDetails
public static DataTable getSegmentDetails(long segmentId, string ConnectionString)
{
DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
bool ExecutionState = false;
oDatabaseHelper.AddParameter("@SegmentID", segmentId);
oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);
DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_SegmentMaster_GetSegmentDetails", ref ExecutionState);
oDatabaseHelper.Dispose();
return ds.Tables[0];
}
示例4: SelectAllTemplateNames
public static DataTable SelectAllTemplateNames(string ConnectionString, int CategoryID)
{
DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
bool ExecutionState = false;
oDatabaseHelper.AddParameter("@CategoryID", CategoryID);
// The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);
DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_CategoryTemplateMaster_SelectAllTemplateNames", ref ExecutionState);
oDatabaseHelper.Dispose();
return ds.Tables[0];
}
示例5: GetUnSubDetailsByContactId
public static DataTable GetUnSubDetailsByContactId(string ConnectionString, string ContactID, string EmailID)
{
DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
bool ExecutionState = false;
// The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
oDatabaseHelper.AddParameter("@ContactID", ContactID);
if (EmailID != string.Empty)
oDatabaseHelper.AddParameter("@EmailId", EmailID);
else
oDatabaseHelper.AddParameter("@EmailId", DBNull.Value);
oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);
DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_GetGlobalUnSubscribeDetails_ByContactId", ref ExecutionState);
oDatabaseHelper.Dispose();
return ds.Tables[0];
}
示例6: SelectAllByMonths
public static ContactDeleteds SelectAllByMonths(DateTime FromDate, DateTime ToDate, String ConnectionString)
{
DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
bool ExecutionState = false;
// The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
oDatabaseHelper.AddParameter("@FromDate", FromDate);
oDatabaseHelper.AddParameter("@ToDate", ToDate);
IDataReader dr = oDatabaseHelper.ExecuteReader("sp_ContactDeleted_SelectAll_ByMonths", ref ExecutionState);
ContactDeleteds ContactMasters = PopulateObjectsFromReader(dr, ConnectionString);
dr.Close();
oDatabaseHelper.Dispose();
return ContactMasters;
}
示例7: SelectAllBasedOnListID
public static ImportJobs SelectAllBasedOnListID(string listID,string ConnectionString)
{
DatabaseHelper oDatabaseHelper = new DatabaseHelper();
bool ExecutionState = false;
// Pass the specified field and its value to the stored procedure.
oDatabaseHelper.AddParameter("@ListID", listID);
// The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);
IDataReader dr = oDatabaseHelper.ExecuteReader("sp_ImportJob_SelectAllBasedOnListID", ref ExecutionState);
ImportJobs ImportJobs = PopulateObjectsFromReader(dr,ConnectionString);
dr.Close();
oDatabaseHelper.Dispose();
return ImportJobs;
}
示例8: BindAllContactsTargetedByAssignCamp_Unsub_Search
public static DataTable BindAllContactsTargetedByAssignCamp_Unsub_Search(string where, string ConnectionString, string CampignID, string orderby, string dir, int pageIndex, int pageSize, out int Count)
{
try
{
using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
{
bool ExecutionState = false;
oDatabaseHelper.AddParameter("@whereCondition", where);
oDatabaseHelper.AddParameter("@AssignedCampaignID", CampignID);
oDatabaseHelper.AddParameter("@orderby", orderby);
oDatabaseHelper.AddParameter("@dir", dir);
oDatabaseHelper.AddParameter("@PageIndex", pageIndex);
oDatabaseHelper.AddParameter("@PageSize", pageSize);
oDatabaseHelper.AddParameter("@Count", -1, System.Data.ParameterDirection.Output);
DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_ListContactMaster_ShowContactsTargetedWithAssignCampaignID_Pagewise_Search", ref ExecutionState);
Count = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@Count"].Value);
oDatabaseHelper.Dispose();
return ds.Tables[0];
}
}
catch (Exception ex)
{
throw ex;
}
}
示例9: GetContactStatusByEmailIdsWithActiveStatus
public static DataTable GetContactStatusByEmailIdsWithActiveStatus(string ConnectionString, DataTable tblEmailAddress)
{
DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
bool ExecutionState = false;
oDatabaseHelper.AddParameter("@TableEmailIds", tblEmailAddress);
DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_SelectContactStatusByEmailId_Active", ref ExecutionState);
oDatabaseHelper.Dispose();
return ds.Tables[0];
}
示例10: GetAllBounceAndUnsubDetailsByType
public static DataTable GetAllBounceAndUnsubDetailsByType(string ConnectionString, string Type)
{
DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
bool ExecutionState = false;
oDatabaseHelper.AddParameter("@Type", Type);
DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_GetAllBounceAndUnsubRecipientsByType", ref ExecutionState);
oDatabaseHelper.Dispose();
return ds.Tables[0];
}
示例11: ChangeContactStatusByList
public static bool ChangeContactStatusByList(long contactID, bool status, string ConnectionString)
{
try
{
using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
{
bool ExecutionState = false;
oDatabaseHelper.AddParameter("@ContactID", contactID);
oDatabaseHelper.AddParameter("@Status", status);
oDatabaseHelper.ExecuteNonQuery("sp_ListContactMaster_ChangeContactStatus", ref ExecutionState);
}
return true;
}
catch (Exception ex)
{
throw ex;
}
}
示例12: GetAllRecipientsByListMasterIds
public static DataTable GetAllRecipientsByListMasterIds(StringBuilder strbSelectedLists, string ConnectionString)
{
DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
bool ExecutionState = false;
// The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
oDatabaseHelper.AddParameter("@listids", strbSelectedLists.ToString());
DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_GetAllRecipientsByListMasterIds", ref ExecutionState);
oDatabaseHelper.Dispose();
return ds.Tables[0];
}
示例13: insertEmailOpenedDetails
public void insertEmailOpenedDetails(Int64 contactID, Int64 campaignID, string ipAddress, string userAgent)
{
try
{
using (DatabaseHelper oDatabaseHelper = new DatabaseHelper())
{
bool ExecutionState = false;
oDatabaseHelper.AddParameter("@ContactID", contactID);
oDatabaseHelper.AddParameter("@CampaignID", campaignID);
oDatabaseHelper.AddParameter("@IPAddress", ipAddress);
oDatabaseHelper.AddParameter("@UserAgent", userAgent);
int IsSuccess = oDatabaseHelper.ExecuteNonQuery("sp_EmailOpenDetails_CustomProc", ref ExecutionState);
}
}
catch (Exception ex)
{
throw ex;
}
}
示例14: getAllMailingLinkUrls
public DataTable getAllMailingLinkUrls(String ConnectionString, string MailingName, string orderby, string dir)
{
try
{
using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
{
bool ExecutionState = false;
oDatabaseHelper.AddParameter("@MailingName", MailingName);
oDatabaseHelper.AddParameter("@orderby", orderby);
oDatabaseHelper.AddParameter("@dir", dir);
DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_ContactMaster_GetLinkURLsByCampName_AMMRpt", ref ExecutionState);
oDatabaseHelper.Dispose();
return ds.Tables[0];
}
}
catch (Exception ex)
{
throw ex;
}
}
示例15: AdvanceSearchSelectLookup
public static DataTable AdvanceSearchSelectLookup(string ConnectionString, string ListName)
{
try
{
using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
{
bool ExecutionState = false;
StringBuilder whereCondition = new StringBuilder();
ListName = ListName.Replace("'", "''");
ListName = ListName.Replace("%", "[%]");
ListName = ListName.Replace("_", "[_]");
if (!string.IsNullOrEmpty(ListName))
{
if (whereCondition.Length > 0)
whereCondition.Append(" OR ListName LIKE '%" + ListName + "%'");
else whereCondition.Append(" ListName LIKE '%" + ListName + "%'");
}
if (whereCondition.Length == 0)
{
whereCondition.Append("1=1");
}
oDatabaseHelper.AddParameter("@whereCondition", whereCondition.ToString());
oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);
DataSet dataSet = oDatabaseHelper.ExecuteDataSet("sp_AdvanceListMaster_SearchSelectNew", ref ExecutionState);
return dataSet.Tables[0];
}
}
catch (Exception ex)
{
throw ex;
}
}