本文整理汇总了C#中ReplyPositiveBL.DatabaseHelper.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# DatabaseHelper.Dispose方法的具体用法?C# DatabaseHelper.Dispose怎么用?C# DatabaseHelper.Dispose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ReplyPositiveBL.DatabaseHelper
的用法示例。
在下文中一共展示了DatabaseHelper.Dispose方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InsertandReturnID
public bool InsertandReturnID(ref int JobId)
{
bool ExecutionState = false;
DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
// Pass the value of '_importJobID' as parameter 'ImportJobID' of the stored procedure.
oDatabaseHelper.AddParameter("@ImportJobID", ImportJobID);
// Pass the value of '_staus' as parameter 'Staus' of the stored procedure.
oDatabaseHelper.AddParameter("@Staus", Staus);
// Pass the value of '_statusMessage' as parameter 'StatusMessage' of the stored procedure.
oDatabaseHelper.AddParameter("@StatusMessage", StatusMessage);
// Pass the value of '_updatedCount' as parameter 'UpdatedCount' of the stored procedure.
oDatabaseHelper.AddParameter("@UpdatedCount", UpdatedCount);
// Pass the value of '_insertedCount' as parameter 'InsertedCount' of the stored procedure.
oDatabaseHelper.AddParameter("@InsertedCount", InsertedCount);
// Pass the value of '_duplicateCount' as parameter 'DuplicateCount' of the stored procedure.
oDatabaseHelper.AddParameter("@DuplicateCount", DuplicateCount);
// Pass the value of '_invalidCount' as parameter 'InvalidCount' of the stored procedure.
oDatabaseHelper.AddParameter("@InvalidCount", InvalidCount);
// Pass the value of '_startTime' as parameter 'StartTime' of the stored procedure.
oDatabaseHelper.AddParameter("@StartTime", StartTime);
// Pass the value of '_endTime' as parameter 'EndTime' of the stored procedure.
oDatabaseHelper.AddParameter("@EndTime", EndTime);
// The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);
oDatabaseHelper.AddParameter("@Id", -1, System.Data.ParameterDirection.Output);
oDatabaseHelper.ExecuteScalar("sp_ImportHistory_Insert_ReturnId", ref ExecutionState);
JobId = Convert.ToInt32(oDatabaseHelper.GetParameterValue("@Id"));
oDatabaseHelper.Dispose();
return ExecutionState;
}
示例2: 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;
}
示例3: 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];
}
示例4: 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];
}
示例5: 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];
}
示例6: 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];
}
示例7: SelectAllByToday
public static ContactDeleteds SelectAllByToday(string ConnectionString)
{
DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
bool ExecutionState = false;
// The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
IDataReader dr = oDatabaseHelper.ExecuteReader("sp_ContactDeleted_SelectAll_ByToday", ref ExecutionState);
ContactDeleteds ContactDeleteds = PopulateObjectsFromReader(dr, ConnectionString);
dr.Close();
oDatabaseHelper.Dispose();
return ContactDeleteds;
}
示例8: 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];
}
示例9: selectAllForLaunchCampaigns
//This method will Select all te campaigns from the table CampaignMaster which are not included in CampaignJob
public static CampaignMasters selectAllForLaunchCampaigns(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("@ErrorCode", -1, System.Data.ParameterDirection.Output);
IDataReader dr = oDatabaseHelper.ExecuteReader("sp_CampaignJob_selectAllForLaunchCampaigns", ref ExecutionState);
CampaignMasters CampaignMasters = PopulateObjectsFromReader(dr,ConnectionString);
dr.Close();
oDatabaseHelper.Dispose();
return CampaignMasters;
}
示例10: SelectAllByDays
public static AutomationJobs SelectAllByDays(int days, 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("@DAYS", days);
IDataReader dr = oDatabaseHelper.ExecuteReader("sp_AutomationJob_SelectAll_ByDays", ref ExecutionState);
AutomationJobs ContactMasters = PopulateObjectsFromReader(dr, ConnectionString);
dr.Close();
oDatabaseHelper.Dispose();
return ContactMasters;
}
示例11: SelectAllCategoryNames
public static DataTable SelectAllCategoryNames(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("@ErrorCode", -1, System.Data.ParameterDirection.Output);
//IDataReader dr = oDatabaseHelper.ExecuteReader("sp_CategoryTemplateMaster_SelectAllCategoryNames", ref ExecutionState);
//CategoryTemplateMasters CategoryTemplateMasters = PopulateObjectsFromReader(dr, ConnectionString);
//dr.Close();
DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_CategoryTemplateMaster_SelectAllCategoryNames", ref ExecutionState);
oDatabaseHelper.Dispose();
return ds.Tables[0];
}
示例12: 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;
}
示例13: GetAllAdvancedImportContactsPageWise
public static DataTable GetAllAdvancedImportContactsPageWise(string ConnectionString, string OrderBy, string sortdir, int pageSize, int pageIndex, out int rowCount)
{
DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
bool ExecutionState = false;
oDatabaseHelper.AddParameter("@orderby", OrderBy);
oDatabaseHelper.AddParameter("@dir", sortdir);
oDatabaseHelper.AddParameter("@PageIndex", pageIndex);
oDatabaseHelper.AddParameter("@PageSize", pageSize);
oDatabaseHelper.AddParameter("@Count", -1, System.Data.ParameterDirection.Output);
oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);
DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_RecipienMaster_GetAllContacts_PageWise", ref ExecutionState);
rowCount = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@Count"].Value);
oDatabaseHelper.Dispose();
return ds.Tables[0];
}
示例14: 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;
}
示例15: 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;
}
}