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


C# DatabaseHelper.AddParameter方法代码示例

本文整理汇总了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;
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:31,代码来源:AutomationJob.cs

示例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;
     }
 }
开发者ID:shekar348,项目名称:1PointOne,代码行数:33,代码来源:ListMaster.cs

示例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];
 }
开发者ID:shekar348,项目名称:1PointOne,代码行数:10,代码来源:SegmentMaster.cs

示例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];
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:13,代码来源:CategoryTemplateMaster.cs

示例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];
 }
开发者ID:shekar348,项目名称:1PointOne,代码行数:15,代码来源:UnSubscribeDetail.cs

示例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;
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:15,代码来源:ContactDeleted.cs

示例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;
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:16,代码来源:ImportJob.cs

示例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;
     }
 }
开发者ID:shekar348,项目名称:1PointOne,代码行数:25,代码来源:ContactMaster.cs

示例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];
 }
开发者ID:shekar348,项目名称:1PointOne,代码行数:9,代码来源:UnSubscribeDetail.cs

示例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];
 }
开发者ID:shekar348,项目名称:1PointOne,代码行数:9,代码来源:UnSubscribeDetail.cs

示例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;
            }
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:19,代码来源:ListContactMaster.cs

示例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];
 }
开发者ID:shekar348,项目名称:1PointOne,代码行数:10,代码来源:RecipientMaster.cs

示例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;
            }
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:20,代码来源:CountOpenedEmails.aspx.cs

示例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;
     }
 }
开发者ID:shekar348,项目名称:1PointOne,代码行数:20,代码来源:Campaign.cs

示例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;
            }
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:41,代码来源:AdvanceListMaster.cs


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