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


C# DatabaseHelper.ExecuteNonQuery方法代码示例

本文整理汇总了C#中ReplyPositiveBL.DatabaseHelper.ExecuteNonQuery方法的典型用法代码示例。如果您正苦于以下问题:C# DatabaseHelper.ExecuteNonQuery方法的具体用法?C# DatabaseHelper.ExecuteNonQuery怎么用?C# DatabaseHelper.ExecuteNonQuery使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ReplyPositiveBL.DatabaseHelper的用法示例。


在下文中一共展示了DatabaseHelper.ExecuteNonQuery方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DeleteAllContactsFromList

        public bool DeleteAllContactsFromList(long listId)
        {
            try
            {
                using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
                {
                    bool ExecutionState = false;
                    oDatabaseHelper.AddParameter("@ListID", listId);
                    int IsSuccess = oDatabaseHelper.ExecuteNonQuery("sp_AdvanceListContactMaster_DeleteAllContactsByListId_CustomProc", ref ExecutionState);

                }
                return true;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:18,代码来源:AdvanceListContactMaster.cs

示例2: 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

示例3: 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

示例4: deleteListFromListContactMaster

        public void deleteListFromListContactMaster(Int64 listIDToBeDeleted, Int64 contactID)
        {
            try
            {
                using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
                {
                    bool ExecutionState = false;
                    oDatabaseHelper.AddParameter("@ListID", listIDToBeDeleted);
                    oDatabaseHelper.AddParameter("@ContactID", contactID);
                    int IsSuccess = oDatabaseHelper.ExecuteNonQuery("sp_ListContactMaster_ListID_Delete_CustomProc", ref ExecutionState);

                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:18,代码来源:ListContactMaster.cs

示例5: UpdateColumnByNulls

 public void UpdateColumnByNulls(string customfield)
 {
     DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
     bool ExecutionState = false;
     oDatabaseHelper.AddParameter("@customfield", customfield);
     oDatabaseHelper.ExecuteNonQuery("sp_ContactMaster_Update_Column", ref ExecutionState);
     oDatabaseHelper.Dispose();
 }
开发者ID:shekar348,项目名称:1PointOne,代码行数:8,代码来源:ContactMaster.cs

示例6: RemoveMultipleContacts

 public void RemoveMultipleContacts(string ContactsTobeRemoved)
 {
     try
     {
         bool ExecutionState = false;
         DatabaseHelper ObDatabaseHelper = new DatabaseHelper(ConnectionString);
         ObDatabaseHelper.AddParameter("@ContactIDs", ContactsTobeRemoved);
         int IsSuccess = ObDatabaseHelper.ExecuteNonQuery("sp_ContactMaster_DeleteMultipleContacts_CustomProc", ref ExecutionState);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
开发者ID:shekar348,项目名称:1PointOne,代码行数:14,代码来源:ContactMaster.cs

示例7: unSubscribeContact

        private void unSubscribeContact(Int64 contactID, Int64 campaignID, string ipAddress, string reason, string notes, string whatToUnSub)
        {
            try
            {
                using (DatabaseHelper oDatabaseHelper = new DatabaseHelper())
                {
                    bool ExecutionState = false;
                    oDatabaseHelper.AddParameter("@ContactID", contactID);
                    oDatabaseHelper.AddParameter("@CampaignID", campaignID);
                    oDatabaseHelper.AddParameter("@IPAddress", ipAddress);
                    oDatabaseHelper.AddParameter("@OptOutReasonDesc", reason);
                    oDatabaseHelper.AddParameter("@OptOutAdditionalNotes", notes);
                    oDatabaseHelper.AddParameter("@WhatToUnSub", whatToUnSub);
                    int IsSuccess = oDatabaseHelper.ExecuteNonQuery("sp_UnSubscribeDetails_Insert_CustomProc", ref ExecutionState);

                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:22,代码来源:UnSubscribe.aspx.cs

示例8: InsertForwardDetails

        //Ganesh on 09feb10
        //This method will insert recipients forwarded to ForwardDetails table..
        public void InsertForwardDetails(Int64 campaignID, string forwardXMLData, int forwardCount, String ConnectionString)
        {
            try
            {

                using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
                {
                    bool ExecutionState = false;
                    oDatabaseHelper.AddParameter("@CampaignMasterID", campaignID);
                    oDatabaseHelper.AddParameter("@ForwardXML", forwardXMLData);
                    oDatabaseHelper.AddParameter("@ForwardCount", forwardCount);
                    int IsSuccess = oDatabaseHelper.ExecuteNonQuery("sp_ForwardDetals_Insert_CustomProc", ref ExecutionState);

                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:22,代码来源:CampaignJob.cs

示例9: RemoveMultipleFields

 public static void RemoveMultipleFields(string FieldIds, String ConnectionString)
 {
     try
     {
         bool ExecutionState = false;
         DatabaseHelper ObDatabaseHelper = new DatabaseHelper(ConnectionString);
         ObDatabaseHelper.AddParameter("@FieldIds", FieldIds);
         int IsSuccess = ObDatabaseHelper.ExecuteNonQuery("sp_ManageFields_DeleteMultipleByField", ref ExecutionState);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
开发者ID:shekar348,项目名称:1PointOne,代码行数:14,代码来源:ManageFieldsBase.cs

示例10: CreateClientInBilling

 private void CreateClientInBilling()
 {
     try
     {
         bool ExecutionState = false;
         string constr = ConfigurationManager.ConnectionStrings["BillingConnection"].ToString();
         DatabaseHelper objDbHelper = new DatabaseHelper(constr);
         objDbHelper.AddParameter("@firstName", txtCreateFirstName.Text);
         objDbHelper.AddParameter("@lastName", txtCreateLastname.Text);
         objDbHelper.AddParameter("@email", txtCreateEmail.Text);
         objDbHelper.AddParameter("@phone", "");
         objDbHelper.AddParameter("@stateCode", "");
         objDbHelper.AddParameter("@country", "");
         objDbHelper.AddParameter("@Active", ChkCreateStatus.Checked.ToString());
         objDbHelper.AddParameter("@ParentCompanyId", "");
         objDbHelper.AddParameter("@ClientCode", txtCreateUsername.Text);
         objDbHelper.AddParameter("@IntegratedSystemClientId", txtCreateUsername.Text);
         objDbHelper.AddParameter("@Option", "Add");
         objDbHelper.ExecuteNonQuery("addClientsFromIntegratedApplication", ref ExecutionState);
     }
     catch
     {
     }
 }
开发者ID:shekar348,项目名称:1PointOne,代码行数:24,代码来源:updateClient.aspx.cs

示例11: RemoveDuplicates

 public static void RemoveDuplicates(string ConnectionString)
 {
     bool ExecutionState = false;
     using (DatabaseHelper ObjDbase = new DatabaseHelper(ConnectionString))
     {
         int i = ObjDbase.ExecuteNonQuery("Sp_SuppressContacts_RemoveDuplicates_Proc", ref ExecutionState);
     }
 }
开发者ID:shekar348,项目名称:1PointOne,代码行数:8,代码来源:SuppressContactsBase.cs

示例12: unSubscribeContactCheck

        //Anwar
        private void unSubscribeContactCheck(Int64 contactID, Int64 campaignID, string ipAddress, string reason, string notes, string whatToUnSub, out int Count)
        {
            try
            {
                using (DatabaseHelper oDatabaseHelper = new DatabaseHelper())
                {
                    bool ExecutionState = false;
                    oDatabaseHelper.AddParameter("@ContactID", contactID);
                    oDatabaseHelper.AddParameter("@CampaignID", campaignID);
                    oDatabaseHelper.AddParameter("@IPAddress", ipAddress);
                    oDatabaseHelper.AddParameter("@OptOutReasonDesc", reason);
                    oDatabaseHelper.AddParameter("@OptOutAdditionalNotes", notes);
                    oDatabaseHelper.AddParameter("@WhatToUnSub", whatToUnSub);
                    oDatabaseHelper.AddParameter("@Count", -1, System.Data.ParameterDirection.Output);
                    int IsSuccess = oDatabaseHelper.ExecuteNonQuery("sp_UnSubscribeDetails_CheckAndInsert_CustomProc", ref ExecutionState);
                    Count = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@Count"].Value);

                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:25,代码来源:UnSubscribe.aspx.cs

示例13: InsertInToDomainSuppress_Bulk

        /// End Here
        /// 
        public int InsertInToDomainSuppress_Bulk(int CompaignId, string ListMasterIds, DataTable SupressedDomain)
        {
            try
            {
                using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
                {
                    bool ExecutionState = false;
                    oDatabaseHelper.AddParameter("@CampaignId", CompaignId);
                    oDatabaseHelper.AddParameter("@ListIds", ListMasterIds);
                    oDatabaseHelper.AddParameter("@DtDomainNames", SupressedDomain);
                    int IsSuccess = oDatabaseHelper.ExecuteNonQuery("sp_InsertInToDomainSuppress", ref ExecutionState);

                    return IsSuccess;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:22,代码来源:ListContactMaster.cs

示例14: InsertReturnID

        public int InsertReturnID()
        {
            bool ExecutionState = false;
            DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);

            // Pass the value of '_templateName' as parameter 'TemplateName' of the stored procedure.
            oDatabaseHelper.AddParameter("@TemplateName", TemplateName);
            // Pass the value of '_templateDescription' as parameter 'TemplateDescription' of the stored procedure.
            oDatabaseHelper.AddParameter("@TemplateDescription", TemplateDescription);
            // Pass the value of '_clientId' as parameter 'ClientId' of the stored procedure.
            oDatabaseHelper.AddParameter("@ClientId", ClientId);
            // Pass the value of '_hTMLContent' as parameter 'HTMLContent' of the stored procedure.
            oDatabaseHelper.AddParameter("@HTMLContent", HTMLContent);
            // Pass the value of '_textContent' as parameter 'TextContent' of the stored procedure.
            oDatabaseHelper.AddParameter("@TextContent", TextContent);
            // Pass the value of '_modifiedBy' as parameter 'ModifiedBy' of the stored procedure.
            oDatabaseHelper.AddParameter("@ModifiedBy", ModifiedBy);
            // Pass the value of '_modifiedDate' as parameter 'ModifiedDate' of the stored procedure.
            oDatabaseHelper.AddParameter("@ModifiedDate", ModifiedDate);
            // Pass the value of '_createdDate' as parameter 'CreatedDate' of the stored procedure.
            oDatabaseHelper.AddParameter("@CreatedDate", CreatedDate);
            // Pass the value of '_createdBy' as parameter 'CreatedBy' of the stored procedure.
            oDatabaseHelper.AddParameter("@CreatedBy", CreatedBy);
            // 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.ExecuteNonQuery("sp_TemplateMaster_Insert_ReturnId", ref ExecutionState);

            int id = (int)oDatabaseHelper.GetParameterValue("@Id");
            oDatabaseHelper.Dispose();

            return id;
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:35,代码来源:TemplateMaster.cs

示例15: SaveSuppressDomain

        public int SaveSuppressDomain(long ID, string SuppressDomain)
        {
            try
            {
                using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
                {
                    bool ExecutionState = false;
                    oDatabaseHelper.AddParameter("@CampaignId", ID);
                    oDatabaseHelper.AddParameter("@SuppressDomain", SuppressDomain);
                    int IsSuccess = oDatabaseHelper.ExecuteNonQuery("USP_SaveSuppressDomain", ref ExecutionState);

                    return IsSuccess;

                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:20,代码来源:ListContactMaster.cs


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