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; }
//prashanth //Insertion of Links and returning the PK after insertion. public int InsertandReturnPrimaryKey() { bool ExecutionState = false; DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_linkURL' as parameter 'LinkURL' of the stored procedure. oDatabaseHelper.AddParameter("@LinkURL", this.LinkURL); // Pass the value of '_linkName' as parameter 'LinkName' of the stored procedure. oDatabaseHelper.AddParameter("@LinkName", this.LinkName); // Pass the value of '_recordClicks' as parameter 'RecordClicks' of the stored procedure. oDatabaseHelper.AddParameter("@RecordClicks", this.RecordClicks); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); // The parameter '@LinkDetailID' will contain the LinkDetailID after execution of the stored procedure. oDatabaseHelper.AddParameter("@LinkDetailID", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_LinkDetails_InsertandReturnPrimarykey", ref ExecutionState);//ExecuteNonQuery("sp_ContactMaster_InsertandReturnPrimarykey", ref ExecutionState); int intLinkDetailID = (int)oDatabaseHelper.GetParameterValue("@LinkDetailID"); oDatabaseHelper.Dispose(); return intLinkDetailID; }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// <param name="getBackValues" type="bool">Whether to get the default values inserted, from the database</param> /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 1/8/2010 12:24:52 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool InsertWithDefaultValues(bool getBackValues) { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_id' as parameter 'ID' of the stored procedure. oDatabaseHelper.AddParameter("@ID", _idNonDefault); // Pass the value of '_campaignID' as parameter 'CampaignID' of the stored procedure. oDatabaseHelper.AddParameter("@CampaignID", _campaignIDNonDefault); // Pass the value of '_contactID' as parameter 'ContactID' of the stored procedure. oDatabaseHelper.AddParameter("@ContactID", _contactIDNonDefault); // Pass the value of '_openedDate' as parameter 'OpenedDate' of the stored procedure. oDatabaseHelper.AddParameter("@OpenedDate", _openedDateNonDefault); // Pass the value of '_iPAddress' as parameter 'IPAddress' of the stored procedure. oDatabaseHelper.AddParameter("@IPAddress", _iPAddressNonDefault); // Pass the value of '_userAgent' as parameter 'UserAgent' of the stored procedure. oDatabaseHelper.AddParameter("@UserAgent", _userAgentNonDefault); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); if(!getBackValues ) { oDatabaseHelper.ExecuteScalar("sp_EmailOpenDetails_Insert_WithDefaultValues", ref ExecutionState); } else { IDataReader dr=oDatabaseHelper.ExecuteReader("sp_EmailOpenDetails_Insert_WithDefaultValues_AndReturn", ref ExecutionState); if (dr.Read()) { PopulateObjectFromReader(this,dr); } dr.Close(); } oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will Delete row(s) from the database using the value of the field specified /// </summary> /// /// <param name="field" type="EmailOpenDetailFields">Field of the class EmailOpenDetail</param> /// <param name="fieldValue" type="object">Value for the field specified.</param> /// /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 1/8/2010 12:24:52 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public static bool DeleteByField(string field, object fieldValue, String ConnectionString) { DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString); bool ExecutionState = false; // Pass the specified field and its value to the stored procedure. oDatabaseHelper.AddParameter("@Field",field); oDatabaseHelper.AddParameter("@Value", fieldValue ); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_EmailOpenDetails_DeleteByField", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will Update one new row into the database using the property Information /// </summary> /// /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 11/21/2009 4:19:24 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool Update() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_id' as parameter 'ID' of the stored procedure. oDatabaseHelper.AddParameter("@ID", _id); // Pass the value of '_importJobID' as parameter 'ImportJobID' of the stored procedure. oDatabaseHelper.AddParameter("@ImportJobID", _importJobID); // Pass the value of '_sourceField' as parameter 'SourceField' of the stored procedure. oDatabaseHelper.AddParameter("@SourceField", _sourceField); // Pass the value of '_destinationField' as parameter 'DestinationField' of the stored procedure. oDatabaseHelper.AddParameter("@DestinationField", _destinationField); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_FieldMap_Update", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
public bool UpdateDeliveryTabCampJob() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_id' as parameter 'ID' of the stored procedure. oDatabaseHelper.AddParameter("@ID", _id); // Pass the value of '_scheduledDatetime' as parameter 'ScheduledDatetime' of the stored procedure. oDatabaseHelper.AddParameter("@ScheduledDatetime", _scheduledDatetime); // Pass the value of '_status' as parameter 'Status' of the stored procedure. oDatabaseHelper.AddParameter("@Status", _status); // Pass the value of '_sendType' as parameter 'SendType' of the stored procedure. oDatabaseHelper.AddParameter("@SendType", _sendType); oDatabaseHelper.ExecuteScalar("sp_CampaignJob_Update_DeliveryTab", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// <param name="getBackValues" type="bool">Whether to get the default values inserted, from the database</param> /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 2/3/2010 4:14:00 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool InsertWithDefaultValues(bool getBackValues) { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_id' as parameter 'ID' of the stored procedure. oDatabaseHelper.AddParameter("@ID", _idNonDefault); // Pass the value of '_campaignMasterID' as parameter 'CampaignMasterID' of the stored procedure. oDatabaseHelper.AddParameter("@CampaignMasterID", _campaignMasterIDNonDefault); // Pass the value of '_scheduledDatetime' as parameter 'ScheduledDatetime' of the stored procedure. oDatabaseHelper.AddParameter("@ScheduledDatetime", _scheduledDatetimeNonDefault); // Pass the value of '_createdDatetime' as parameter 'CreatedDatetime' of the stored procedure. oDatabaseHelper.AddParameter("@CreatedDatetime", _createdDatetimeNonDefault); // Pass the value of '_status' as parameter 'Status' of the stored procedure. oDatabaseHelper.AddParameter("@Status", _statusNonDefault); // Pass the value of '_statusMessage' as parameter 'StatusMessage' of the stored procedure. oDatabaseHelper.AddParameter("@StatusMessage", _statusMessageNonDefault); // Pass the value of '_deliveredCount' as parameter 'DeliveredCount' of the stored procedure. oDatabaseHelper.AddParameter("@DeliveredCount", _deliveredCountNonDefault); // Pass the value of '_openCount' as parameter 'OpenCount' of the stored procedure. oDatabaseHelper.AddParameter("@OpenCount", _openCountNonDefault); // Pass the value of '_clickCount' as parameter 'ClickCount' of the stored procedure. oDatabaseHelper.AddParameter("@ClickCount", _clickCountNonDefault); // Pass the value of '_bounceCount' as parameter 'BounceCount' of the stored procedure. oDatabaseHelper.AddParameter("@BounceCount", _bounceCountNonDefault); // Pass the value of '_optoutCount' as parameter 'OptoutCount' of the stored procedure. oDatabaseHelper.AddParameter("@OptoutCount", _optoutCountNonDefault); // Pass the value of '_sendType' as parameter 'SendType' of the stored procedure. oDatabaseHelper.AddParameter("@SendType", _sendTypeNonDefault); // Pass the value of '_totalRecipients' as parameter 'TotalRecipients' of the stored procedure. oDatabaseHelper.AddParameter("@TotalRecipients", _totalRecipientsNonDefault); // Pass the value of '_unSubscribeCount' as parameter 'UnSubscribeCount' of the stored procedure. oDatabaseHelper.AddParameter("@UnSubscribeCount", _unSubscribeCountNonDefault); // Pass the value of '_startTime' as parameter 'StartTime' of the stored procedure. oDatabaseHelper.AddParameter("@StartTime", _startTimeNonDefault); // Pass the value of '_completionTime' as parameter 'CompletionTime' of the stored procedure. oDatabaseHelper.AddParameter("@CompletionTime", _completionTimeNonDefault); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); if(!getBackValues ) { oDatabaseHelper.ExecuteScalar("sp_CampaignJob_Insert_WithDefaultValues", ref ExecutionState); } else { IDataReader dr=oDatabaseHelper.ExecuteReader("sp_CampaignJob_Insert_WithDefaultValues_AndReturn", ref ExecutionState); if (dr.Read()) { PopulateObjectFromReader(this,dr); } dr.Close(); } oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// <param name="getBackValues" type="bool">Whether to get the default values inserted, from the database</param> /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 7/28/2012 02:17:32 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool InsertWithDefaultValues(bool getBackValues) { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(); // Pass the value of '_listContactId' as parameter 'ListContactId' of the stored procedure. oDatabaseHelper.AddParameter("@ListContactId", _listContactIdNonDefault); // Pass the value of '_listMasterID' as parameter 'ListMasterID' of the stored procedure. oDatabaseHelper.AddParameter("@ListMasterID", _listMasterIDNonDefault); // Pass the value of '_contactId' as parameter 'ContactId' of the stored procedure. oDatabaseHelper.AddParameter("@ContactId", _contactIdNonDefault); // Pass the value of '_clientId' as parameter 'ClientId' of the stored procedure. oDatabaseHelper.AddParameter("@ClientId", _clientIdNonDefault); // Pass the value of '_createdDate' as parameter 'CreatedDate' of the stored procedure. oDatabaseHelper.AddParameter("@CreatedDate", _createdDateNonDefault); // Pass the value of '_modifiedDate' as parameter 'ModifiedDate' of the stored procedure. oDatabaseHelper.AddParameter("@ModifiedDate", _modifiedDateNonDefault); // Pass the value of '_createdBy' as parameter 'CreatedBy' of the stored procedure. oDatabaseHelper.AddParameter("@CreatedBy", _createdByNonDefault); // Pass the value of '_modifiedBy' as parameter 'ModifiedBy' of the stored procedure. oDatabaseHelper.AddParameter("@ModifiedBy", _modifiedByNonDefault); // Pass the value of '_isActive' as parameter 'IsActive' of the stored procedure. oDatabaseHelper.AddParameter("@IsActive", _isActiveNonDefault); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); if(!getBackValues ) { oDatabaseHelper.ExecuteScalar("sp_AdvanceListContactMaster_Insert_WithDefaultValues", ref ExecutionState); } else { IDataReader dr=oDatabaseHelper.ExecuteReader("sp_AdvanceListContactMaster_Insert_WithDefaultValues_AndReturn", ref ExecutionState); if (dr.Read()) { PopulateObjectFromReader(this,dr); } dr.Close(); } oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// <param name="getBackValues" type="bool">Whether to get the default values inserted, from the database</param> /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 07/27/2010 11:57:21 AM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool InsertWithDefaultValues(bool getBackValues) { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_exceptionLogID' as parameter 'ExceptionLogID' of the stored procedure. //oDatabaseHelper.AddParameter("@ExceptionLogID", _exceptionLogIDNonDefault); // Pass the value of '_date' as parameter 'Date' of the stored procedure. oDatabaseHelper.AddParameter("@Date", _dateNonDefault); // Pass the value of '_type' as parameter 'Type' of the stored procedure. oDatabaseHelper.AddParameter("@Type", _typeNonDefault); // Pass the value of '_message' as parameter 'Message' of the stored procedure. oDatabaseHelper.AddParameter("@Message", _messageNonDefault); // Pass the value of '_stackTrace' as parameter 'StackTrace' of the stored procedure. oDatabaseHelper.AddParameter("@StackTrace", _stackTraceNonDefault); // Pass the value of '_userID' as parameter 'UserID' of the stored procedure. oDatabaseHelper.AddParameter("@UserID", _userIDNonDefault); // Pass the value of '_isCompleted' as parameter 'IsCompleted' of the stored procedure. oDatabaseHelper.AddParameter("@IsCompleted", _isCompletedNonDefault); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); if(!getBackValues ) { oDatabaseHelper.ExecuteScalar("sp_ExceptionLog_Insert_WithDefaultValues", ref ExecutionState); } else { IDataReader dr=oDatabaseHelper.ExecuteReader("sp_ExceptionLog_Insert_WithDefaultValues_AndReturn", ref ExecutionState); if (dr.Read()) { PopulateObjectFromReader(this,dr); } dr.Close(); } oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 07/27/2010 11:57:21 AM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool Insert() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_exceptionLogID' as parameter 'ExceptionLogID' of the stored procedure. //oDatabaseHelper.AddParameter("@ExceptionLogID", _exceptionLogID); // Pass the value of '_date' as parameter 'Date' of the stored procedure. oDatabaseHelper.AddParameter("@Date", _date); // Pass the value of '_type' as parameter 'Type' of the stored procedure. oDatabaseHelper.AddParameter("@Type", _type); // Pass the value of '_message' as parameter 'Message' of the stored procedure. oDatabaseHelper.AddParameter("@Message", _message); // Pass the value of '_stackTrace' as parameter 'StackTrace' of the stored procedure. oDatabaseHelper.AddParameter("@StackTrace", _stackTrace); // Pass the value of '_userID' as parameter 'UserID' of the stored procedure. oDatabaseHelper.AddParameter("@UserID", _userID); // Pass the value of '_isCompleted' as parameter 'IsCompleted' of the stored procedure. oDatabaseHelper.AddParameter("@IsCompleted", _isCompleted); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_ExceptionLog_Insert", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
//Ganesh on 30nov09 //This method will insert a new job in CampaignMaster table. public int insertCampainMaster(CampaignMaster objCampaignMaster) { try { using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString)) { bool ExecutionState = false; oDatabaseHelper.AddParameter("@CampaignName", objCampaignMaster.CampaignName); oDatabaseHelper.AddParameter("@CampaignDescription", objCampaignMaster.CampaignDescription); oDatabaseHelper.AddParameter("@FromAddress", objCampaignMaster.FromAddress); oDatabaseHelper.AddParameter("@FromName", objCampaignMaster.FromName); oDatabaseHelper.AddParameter("@ReplytoAddress", objCampaignMaster.ReplytoAddress); oDatabaseHelper.AddParameter("@ReplaytoName", objCampaignMaster.ReplaytoName); oDatabaseHelper.AddParameter("@TemplateId", objCampaignMaster.TemplateId); oDatabaseHelper.AddParameter("@Subject", objCampaignMaster.Subject); oDatabaseHelper.AddParameter("@TrackReads", objCampaignMaster.TrackReads); oDatabaseHelper.AddParameter("@SelectCondition", objCampaignMaster.SelectCondition); oDatabaseHelper.AddParameter("@HTMLContent", objCampaignMaster.HTMLContent); oDatabaseHelper.AddParameter("@TextContent", objCampaignMaster.TextContent); oDatabaseHelper.AddParameter("@SuppressDomain", objCampaignMaster.SuppressDomain); oDatabaseHelper.AddParameter("@UnsubscribeText", objCampaignMaster.UnsubscribeText); oDatabaseHelper.AddParameter("@UnsubscribeLinkText", objCampaignMaster.UnsubscribeLinkText); oDatabaseHelper.AddParameter("@SuppressLists", objCampaignMaster.SuppressSelection); oDatabaseHelper.AddParameter("@AssignedCampaignID", objCampaignMaster.AssignedCampaignID); oDatabaseHelper.AddParameter("@CampaignID", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_CampaignMaster_Insert_CustomProc", ref ExecutionState); int CampaignID = (int)oDatabaseHelper.GetParameterValue("@CampaignID"); oDatabaseHelper.Dispose(); return CampaignID; } } catch (Exception ex) { throw ex; } }
public bool UpdateUserDetails() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); //// Pass the value of '_id' as parameter 'Id' of the stored procedure. //oDatabaseHelper.AddParameter("@Id", _id); //// Pass the value of '_userId' as parameter 'UserId' of the stored procedure. oDatabaseHelper.AddParameter("@UserId", _userId); // Pass the value of '_userName' as parameter 'UserName' of the stored procedure. oDatabaseHelper.AddParameter("@UserName", _userName); // Pass the value of '_firstName' as parameter 'FirstName' of the stored procedure. oDatabaseHelper.AddParameter("@FirstName", _firstName); // Pass the value of '_lastName' as parameter 'LastName' of the stored procedure. oDatabaseHelper.AddParameter("@LastName", _lastName); // Pass the value of '_address1' as parameter 'Address1' of the stored procedure. oDatabaseHelper.AddParameter("@Address1", _address1); // Pass the value of '_address2' as parameter 'Address2' of the stored procedure. oDatabaseHelper.AddParameter("@Address2", _address2); // Pass the value of '_workPhone' as parameter 'WorkPhone' of the stored procedure. oDatabaseHelper.AddParameter("@WorkPhone", _workPhone); // Pass the value of '_cellPhone' as parameter 'CellPhone' of the stored procedure. oDatabaseHelper.AddParameter("@CellPhone", _cellPhone); // Pass the value of '_Fax' as parameter 'Fax' of the stored procedure. oDatabaseHelper.AddParameter("@Fax", _fax); // Pass the value of '_homePhone' as parameter 'HomePhone' of the stored procedure. oDatabaseHelper.AddParameter("@HomePhone", _homePhone); oDatabaseHelper.AddParameter("@City", _city); // Pass the value of '_state' as parameter 'State' of the stored procedure. oDatabaseHelper.AddParameter("@State", _state); // Pass the value of '_country' as parameter 'Country' of the stored procedure. oDatabaseHelper.AddParameter("@Country", _country); // Pass the value of '_postalCode' as parameter 'PostalCode' of the stored procedure. oDatabaseHelper.AddParameter("@PostalCode", _postalCode); // Pass the value of '_emailAddress' as parameter 'EmailAddress' of the stored procedure. oDatabaseHelper.AddParameter("@EmailAddress", _emailAddress); // Pass the value of '_listTab' as parameter 'ListTab' of the stored procedure. oDatabaseHelper.AddParameter("@ListTab", _listTab); // Pass the value of '_campaignTab' as parameter 'CampaignTab' of the stored procedure. oDatabaseHelper.AddParameter("@CampaignTab", _campaignTab); // Pass the value of '_advancedTab' as parameter 'AdvancedTab' of the stored procedure. oDatabaseHelper.AddParameter("@AdvancedTab", _advancedTab); // Pass the value of '_reportsTab' as parameter 'ReportsTab' of the stored procedure. oDatabaseHelper.AddParameter("@ReportsTab", _reportsTab); // Pass the value of '_campaignReportsTab' as parameter 'CampaignReportsTab' of the stored procedure. oDatabaseHelper.AddParameter("@CampaignReportsTab", _campaignReportsTab); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_UserInfo_UpdateUserDetails", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// <param name="getBackValues" type="bool">Whether to get the default values inserted, from the database</param> /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 2/15/2012 12:52:22 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool InsertWithDefaultValues(bool getBackValues) { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(); // Pass the value of '_id' as parameter 'Id' of the stored procedure. oDatabaseHelper.AddParameter("@Id", _idNonDefault); // Pass the value of '_userId' as parameter 'UserId' of the stored procedure. oDatabaseHelper.AddParameter("@UserId", _userIdNonDefault); // Pass the value of '_userName' as parameter 'UserName' of the stored procedure. oDatabaseHelper.AddParameter("@UserName", _userNameNonDefault); // Pass the value of '_firstName' as parameter 'FirstName' of the stored procedure. oDatabaseHelper.AddParameter("@FirstName", _firstNameNonDefault); // Pass the value of '_lastName' as parameter 'LastName' of the stored procedure. oDatabaseHelper.AddParameter("@LastName", _lastNameNonDefault); // Pass the value of '_address1' as parameter 'Address1' of the stored procedure. oDatabaseHelper.AddParameter("@Address1", _address1NonDefault); // Pass the value of '_address2' as parameter 'Address2' of the stored procedure. oDatabaseHelper.AddParameter("@Address2", _address2NonDefault); // Pass the value of '_workPhone' as parameter 'WorkPhone' of the stored procedure. oDatabaseHelper.AddParameter("@WorkPhone", _workPhoneNonDefault); // Pass the value of '_cellPhone' as parameter 'CellPhone' of the stored procedure. oDatabaseHelper.AddParameter("@CellPhone", _cellPhoneNonDefault); // Pass the value of '_Fax' as parameter 'Fax' of the stored procedure. oDatabaseHelper.AddParameter("@Fax", _fax); // Pass the value of '_homePhone' as parameter 'HomePhone' of the stored procedure. oDatabaseHelper.AddParameter("@HomePhone", _homePhone); oDatabaseHelper.AddParameter("@City", _cityNonDefault); // Pass the value of '_state' as parameter 'State' of the stored procedure. oDatabaseHelper.AddParameter("@State", _stateNonDefault); // Pass the value of '_country' as parameter 'Country' of the stored procedure. oDatabaseHelper.AddParameter("@Country", _countryNonDefault); // Pass the value of '_postalCode' as parameter 'PostalCode' of the stored procedure. oDatabaseHelper.AddParameter("@PostalCode", _postalCodeNonDefault); // Pass the value of '_emailAddress' as parameter 'EmailAddress' of the stored procedure. oDatabaseHelper.AddParameter("@EmailAddress", _emailAddressNonDefault); // Pass the value of '_listTab' as parameter 'ListTab' of the stored procedure. oDatabaseHelper.AddParameter("@ListTab", _listTabNonDefault); // Pass the value of '_campaignTab' as parameter 'CampaignTab' of the stored procedure. oDatabaseHelper.AddParameter("@CampaignTab", _campaignTabNonDefault); // Pass the value of '_advancedTab' as parameter 'AdvancedTab' of the stored procedure. oDatabaseHelper.AddParameter("@AdvancedTab", _advancedTabNonDefault); // Pass the value of '_reportsTab' as parameter 'ReportsTab' of the stored procedure. oDatabaseHelper.AddParameter("@ReportsTab", _reportsTabNonDefault); // Pass the value of '_campaignReportsTab' as parameter 'CampaignReportsTab' of the stored procedure. oDatabaseHelper.AddParameter("@CampaignReportsTab", _campaignReportsTabNonDefault); // Pass the value of '_logo' as parameter 'Logo' of the stored procedure. oDatabaseHelper.AddParameter("@Logo", _logoNonDefault); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); if(!getBackValues ) { oDatabaseHelper.ExecuteScalar("sp_UserInfo_Insert_WithDefaultValues", ref ExecutionState); } else { IDataReader dr=oDatabaseHelper.ExecuteReader("sp_UserInfo_Insert_WithDefaultValues_AndReturn", ref ExecutionState); if (dr.Read()) { PopulateObjectFromReader(this,dr); } dr.Close(); } oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will Update one new row into the database using the property Information /// </summary> /// /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 1/27/2010 1:13:46 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool Update() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_contactId' as parameter 'ContactId' of the stored procedure. oDatabaseHelper.AddParameter("@ContactId", _contactId); // Pass the value of '_importJobID' as parameter 'ImportJobID' of the stored procedure. oDatabaseHelper.AddParameter("@ImportJobID", _importJobID); // Pass the value of '_emailAddress' as parameter 'EmailAddress' of the stored procedure. oDatabaseHelper.AddParameter("@EmailAddress", _emailAddress); // Pass the value of '_firstName' as parameter 'FirstName' of the stored procedure. oDatabaseHelper.AddParameter("@FirstName", _firstName); // Pass the value of '_lastName' as parameter 'LastName' of the stored procedure. oDatabaseHelper.AddParameter("@LastName", _lastName); // Pass the value of '_address1' as parameter 'Address1' of the stored procedure. oDatabaseHelper.AddParameter("@Address1", _address1); // Pass the value of '_address2' as parameter 'Address2' of the stored procedure. oDatabaseHelper.AddParameter("@Address2", _address2); // Pass the value of '_createdDate' as parameter 'CreatedDate' of the stored procedure. oDatabaseHelper.AddParameter("@CreatedDate", _createdDate); // Pass the value of '_modifiedDate' as parameter 'ModifiedDate' of the stored procedure. oDatabaseHelper.AddParameter("@ModifiedDate", _modifiedDate); // Pass the value of '_createdBy' as parameter 'CreatedBy' of the stored procedure. oDatabaseHelper.AddParameter("@CreatedBy", _createdBy); // Pass the value of '_modifiedBy' as parameter 'ModifiedBy' of the stored procedure. oDatabaseHelper.AddParameter("@ModifiedBy", _modifiedBy); // Pass the value of '_clientId' as parameter 'ClientId' of the stored procedure. oDatabaseHelper.AddParameter("@ClientId", _clientId); // Pass the value of '_active' as parameter 'Active' of the stored procedure. oDatabaseHelper.AddParameter("@Active", _active); // Pass the value of '_makeVerified' as parameter 'MakeVerified' of the stored procedure. oDatabaseHelper.AddParameter("@MakeVerified", _makeVerified); // Pass the value of '_customField1' as parameter 'CustomField1' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField1", _customField1); // Pass the value of '_customField2' as parameter 'CustomField2' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField2", _customField2); // Pass the value of '_customField3' as parameter 'CustomField3' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField3", _customField3); // Pass the value of '_customField4' as parameter 'CustomField4' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField4", _customField4); // Pass the value of '_customField5' as parameter 'CustomField5' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField5", _customField5); // Pass the value of '_customField6' as parameter 'CustomField6' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField6", _customField6); // Pass the value of '_customField7' as parameter 'CustomField7' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField7", _customField7); // Pass the value of '_customField8' as parameter 'CustomField8' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField8", _customField8); // Pass the value of '_customField9' as parameter 'CustomField9' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField9", _customField9); // Pass the value of '_customField10' as parameter 'CustomField10' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField10", _customField10); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_ContactMasterTemp_Update", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// <param name="getBackValues" type="bool">Whether to get the default values inserted, from the database</param> /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 1/27/2010 1:13:46 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool InsertWithDefaultValues(bool getBackValues) { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_contactId' as parameter 'ContactId' of the stored procedure. oDatabaseHelper.AddParameter("@ContactId", _contactIdNonDefault); // Pass the value of '_importJobID' as parameter 'ImportJobID' of the stored procedure. oDatabaseHelper.AddParameter("@ImportJobID", _importJobIDNonDefault); // Pass the value of '_emailAddress' as parameter 'EmailAddress' of the stored procedure. oDatabaseHelper.AddParameter("@EmailAddress", _emailAddressNonDefault); // Pass the value of '_firstName' as parameter 'FirstName' of the stored procedure. oDatabaseHelper.AddParameter("@FirstName", _firstNameNonDefault); // Pass the value of '_lastName' as parameter 'LastName' of the stored procedure. oDatabaseHelper.AddParameter("@LastName", _lastNameNonDefault); // Pass the value of '_address1' as parameter 'Address1' of the stored procedure. oDatabaseHelper.AddParameter("@Address1", _address1NonDefault); // Pass the value of '_address2' as parameter 'Address2' of the stored procedure. oDatabaseHelper.AddParameter("@Address2", _address2NonDefault); // Pass the value of '_createdDate' as parameter 'CreatedDate' of the stored procedure. oDatabaseHelper.AddParameter("@CreatedDate", _createdDateNonDefault); // Pass the value of '_modifiedDate' as parameter 'ModifiedDate' of the stored procedure. oDatabaseHelper.AddParameter("@ModifiedDate", _modifiedDateNonDefault); // Pass the value of '_createdBy' as parameter 'CreatedBy' of the stored procedure. oDatabaseHelper.AddParameter("@CreatedBy", _createdByNonDefault); // Pass the value of '_modifiedBy' as parameter 'ModifiedBy' of the stored procedure. oDatabaseHelper.AddParameter("@ModifiedBy", _modifiedByNonDefault); // Pass the value of '_clientId' as parameter 'ClientId' of the stored procedure. oDatabaseHelper.AddParameter("@ClientId", _clientIdNonDefault); // Pass the value of '_active' as parameter 'Active' of the stored procedure. oDatabaseHelper.AddParameter("@Active", _activeNonDefault); // Pass the value of '_makeVerified' as parameter 'MakeVerified' of the stored procedure. oDatabaseHelper.AddParameter("@MakeVerified", _makeVerifiedNonDefault); // Pass the value of '_customField1' as parameter 'CustomField1' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField1", _customField1NonDefault); // Pass the value of '_customField2' as parameter 'CustomField2' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField2", _customField2NonDefault); // Pass the value of '_customField3' as parameter 'CustomField3' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField3", _customField3NonDefault); // Pass the value of '_customField4' as parameter 'CustomField4' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField4", _customField4NonDefault); // Pass the value of '_customField5' as parameter 'CustomField5' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField5", _customField5NonDefault); // Pass the value of '_customField6' as parameter 'CustomField6' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField6", _customField6NonDefault); // Pass the value of '_customField7' as parameter 'CustomField7' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField7", _customField7NonDefault); // Pass the value of '_customField8' as parameter 'CustomField8' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField8", _customField8NonDefault); // Pass the value of '_customField9' as parameter 'CustomField9' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField9", _customField9NonDefault); // Pass the value of '_customField10' as parameter 'CustomField10' of the stored procedure. oDatabaseHelper.AddParameter("@CustomField10", _customField10NonDefault); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); if(!getBackValues ) { oDatabaseHelper.ExecuteScalar("sp_ContactMasterTemp_Insert_WithDefaultValues", ref ExecutionState); } else { IDataReader dr=oDatabaseHelper.ExecuteReader("sp_ContactMasterTemp_Insert_WithDefaultValues_AndReturn", ref ExecutionState); if (dr.Read()) { PopulateObjectFromReader(this,dr,ConnectionString); } dr.Close(); } oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will Update one new row into the database using the property Information /// </summary> /// /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 7/31/2012 02:55:35 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool Update() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(); // Pass the value of '_id' as parameter 'ID' of the stored procedure. oDatabaseHelper.AddParameter("@ID", _id); // Pass the value of '_campaignId' as parameter 'CampaignId' of the stored procedure. oDatabaseHelper.AddParameter("@CampaignId", _campaignId); // Pass the value of '_listMasterID' as parameter 'ListMasterID' of the stored procedure. oDatabaseHelper.AddParameter("@ListMasterID", _listMasterID); // Pass the value of '_contactId' as parameter 'ContactId' of the stored procedure. oDatabaseHelper.AddParameter("@ContactId", _contactId); // Pass the value of '_supressedDomain' as parameter 'SupressedDomain' of the stored procedure. oDatabaseHelper.AddParameter("@SupressedDomain", _supressedDomain); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_DomineSupress_Update", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will Delete one row from the database using the property Information /// </summary> /// /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 7/28/2012 02:17:32 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool Delete() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(); // Pass the value of '_listContactId' as parameter 'ListContactId' of the stored procedure. oDatabaseHelper.AddParameter("@ListContactId", _listContactId); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_AdvanceListContactMaster_Delete", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will Update one new row into the database using the property Information /// </summary> /// /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 1/21/2011 3:16:54 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool Update() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_categoryID' as parameter 'CategoryID' of the stored procedure. oDatabaseHelper.AddParameter("@CategoryID", _categoryID); // Pass the value of '_categoryName' as parameter 'CategoryName' of the stored procedure. oDatabaseHelper.AddParameter("@CategoryName", _categoryName); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_CategoryMaster_Update", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will Update one new row into the database using the property Information /// </summary> /// /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 7/28/2012 02:17:32 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool Update() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(); // Pass the value of '_listContactId' as parameter 'ListContactId' of the stored procedure. oDatabaseHelper.AddParameter("@ListContactId", _listContactId); // Pass the value of '_listMasterID' as parameter 'ListMasterID' of the stored procedure. oDatabaseHelper.AddParameter("@ListMasterID", _listMasterID); // Pass the value of '_contactId' as parameter 'ContactId' of the stored procedure. oDatabaseHelper.AddParameter("@ContactId", _contactId); // Pass the value of '_clientId' as parameter 'ClientId' of the stored procedure. oDatabaseHelper.AddParameter("@ClientId", _clientId); // Pass the value of '_createdDate' as parameter 'CreatedDate' of the stored procedure. oDatabaseHelper.AddParameter("@CreatedDate", _createdDate); // Pass the value of '_modifiedDate' as parameter 'ModifiedDate' of the stored procedure. oDatabaseHelper.AddParameter("@ModifiedDate", _modifiedDate); // Pass the value of '_createdBy' as parameter 'CreatedBy' of the stored procedure. oDatabaseHelper.AddParameter("@CreatedBy", _createdBy); // Pass the value of '_modifiedBy' as parameter 'ModifiedBy' of the stored procedure. oDatabaseHelper.AddParameter("@ModifiedBy", _modifiedBy); // Pass the value of '_isActive' as parameter 'IsActive' of the stored procedure. oDatabaseHelper.AddParameter("@IsActive", _isActive); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_AdvanceListContactMaster_Update", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// <param name="getBackValues" type="bool">Whether to get the default values inserted, from the database</param> /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 4/12/2012 11:16:28 AM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool InsertWithDefaultValues(bool getBackValues) { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(); // Pass the value of '_complaintID' as parameter 'ComplaintID' of the stored procedure. oDatabaseHelper.AddParameter("@ComplaintID", _complaintIDNonDefault); // Pass the value of '_contactID' as parameter 'ContactID' of the stored procedure. oDatabaseHelper.AddParameter("@ContactID", _contactIDNonDefault); // Pass the value of '_bounceCategory' as parameter 'BounceCategory' of the stored procedure. oDatabaseHelper.AddParameter("@BounceCategory", _bounceCategoryNonDefault); // Pass the value of '_campaignID' as parameter 'CampaignID' of the stored procedure. oDatabaseHelper.AddParameter("@CampaignID", _campaignIDNonDefault); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); if(!getBackValues ) { oDatabaseHelper.ExecuteScalar("sp_MailComplaints_Insert_WithDefaultValues", ref ExecutionState); } else { IDataReader dr=oDatabaseHelper.ExecuteReader("sp_MailComplaints_Insert_WithDefaultValues_AndReturn", ref ExecutionState); if (dr.Read()) { PopulateObjectFromReader(this,dr); } dr.Close(); } oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will Update one new row into the database using the property Information /// </summary> /// /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 2/3/2010 4:14:00 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool Update() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_id' as parameter 'ID' of the stored procedure. oDatabaseHelper.AddParameter("@ID", _id); // Pass the value of '_campaignMasterID' as parameter 'CampaignMasterID' of the stored procedure. oDatabaseHelper.AddParameter("@CampaignMasterID", _campaignMasterID); // Pass the value of '_scheduledDatetime' as parameter 'ScheduledDatetime' of the stored procedure. oDatabaseHelper.AddParameter("@ScheduledDatetime", _scheduledDatetime); // Pass the value of '_createdDatetime' as parameter 'CreatedDatetime' of the stored procedure. oDatabaseHelper.AddParameter("@CreatedDatetime", _createdDatetime); // Pass the value of '_status' as parameter 'Status' of the stored procedure. oDatabaseHelper.AddParameter("@Status", _status); // Pass the value of '_statusMessage' as parameter 'StatusMessage' of the stored procedure. oDatabaseHelper.AddParameter("@StatusMessage", _statusMessage); // Pass the value of '_deliveredCount' as parameter 'DeliveredCount' of the stored procedure. oDatabaseHelper.AddParameter("@DeliveredCount", _deliveredCount); // Pass the value of '_openCount' as parameter 'OpenCount' of the stored procedure. oDatabaseHelper.AddParameter("@OpenCount", _openCount); // Pass the value of '_clickCount' as parameter 'ClickCount' of the stored procedure. oDatabaseHelper.AddParameter("@ClickCount", _clickCount); // Pass the value of '_bounceCount' as parameter 'BounceCount' of the stored procedure. oDatabaseHelper.AddParameter("@BounceCount", _bounceCount); // Pass the value of '_optoutCount' as parameter 'OptoutCount' of the stored procedure. oDatabaseHelper.AddParameter("@OptoutCount", _optoutCount); // Pass the value of '_sendType' as parameter 'SendType' of the stored procedure. oDatabaseHelper.AddParameter("@SendType", _sendType); // Pass the value of '_totalRecipients' as parameter 'TotalRecipients' of the stored procedure. oDatabaseHelper.AddParameter("@TotalRecipients", _totalRecipients); // Pass the value of '_unSubscribeCount' as parameter 'UnSubscribeCount' of the stored procedure. oDatabaseHelper.AddParameter("@UnSubscribeCount", _unSubscribeCount); // Pass the value of '_startTime' as parameter 'StartTime' of the stored procedure. oDatabaseHelper.AddParameter("@StartTime", _startTime); // Pass the value of '_completionTime' as parameter 'CompletionTime' of the stored procedure. oDatabaseHelper.AddParameter("@CompletionTime", _completionTime); // Pass the value of '_IsBillable' as parameter 'IsBillable' of the stored procedure. oDatabaseHelper.AddParameter("@IsBillable", _IsBillable); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_CampaignJob_Update", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will Update one new row into the database using the property Information /// </summary> /// /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 4/12/2012 11:16:28 AM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool Update() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(); // Pass the value of '_complaintID' as parameter 'ComplaintID' of the stored procedure. oDatabaseHelper.AddParameter("@ComplaintID", _complaintID); // Pass the value of '_contactID' as parameter 'ContactID' of the stored procedure. oDatabaseHelper.AddParameter("@ContactID", _contactID); // Pass the value of '_bounceCategory' as parameter 'BounceCategory' of the stored procedure. oDatabaseHelper.AddParameter("@BounceCategory", _bounceCategory); // Pass the value of '_campaignID' as parameter 'CampaignID' of the stored procedure. oDatabaseHelper.AddParameter("@CampaignID", _campaignID); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_MailComplaints_Update", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// <param name="getBackValues" type="bool">Whether to get the default values inserted, from the database</param> /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 11/21/2009 4:19:24 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool InsertWithDefaultValues(bool getBackValues) { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_id' as parameter 'ID' of the stored procedure. oDatabaseHelper.AddParameter("@ID", _idNonDefault); // Pass the value of '_importJobID' as parameter 'ImportJobID' of the stored procedure. oDatabaseHelper.AddParameter("@ImportJobID", _importJobIDNonDefault); // Pass the value of '_sourceField' as parameter 'SourceField' of the stored procedure. oDatabaseHelper.AddParameter("@SourceField", _sourceFieldNonDefault); // Pass the value of '_destinationField' as parameter 'DestinationField' of the stored procedure. oDatabaseHelper.AddParameter("@DestinationField", _destinationFieldNonDefault); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); if(!getBackValues ) { oDatabaseHelper.ExecuteScalar("sp_FieldMap_Insert_WithDefaultValues", ref ExecutionState); } else { IDataReader dr=oDatabaseHelper.ExecuteReader("sp_FieldMap_Insert_WithDefaultValues_AndReturn", ref ExecutionState); if (dr.Read()) { PopulateObjectFromReader(this,dr); } dr.Close(); } oDatabaseHelper.Dispose(); return ExecutionState; }
public void insertCustomLabel(CustomLabel objCustomLabel) { try { using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString)) { bool ExecutionState = false; oDatabaseHelper.AddParameter("@CampaignId", objCustomLabel.CampaignId); oDatabaseHelper.AddParameter("@TemplateId", objCustomLabel.TemplateId); oDatabaseHelper.AddParameter("@LinkURL", objCustomLabel.LinkURL); oDatabaseHelper.AddParameter("@CustomLabel", objCustomLabel.CustomLabel); oDatabaseHelper.ExecuteScalar("sp_CustomLabel", ref ExecutionState); int CampaignID = (int)oDatabaseHelper.GetParameterValue("@CampaignID"); oDatabaseHelper.Dispose(); } } catch (Exception ex) { throw ex; } }
/// <summary> /// This method will Delete one row from the database using the primary key information /// </summary> /// /// <param name="pk" type="EmailOpenDetailPrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 1/8/2010 12:24:52 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public static bool Delete(EmailOpenDetailPrimaryKey pk, String ConnectionString) { DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString); bool ExecutionState = false; // Pass the values of all key parameters to the stored procedure. System.Collections.Specialized.NameValueCollection nvc = pk.GetKeysAndValues(); foreach (string key in nvc.Keys) { oDatabaseHelper.AddParameter("@" + key,nvc[key] ); } // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_EmailOpenDetails_Delete", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// <param name="getBackValues" type="bool">Whether to get the default values inserted, from the database</param> /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 11/24/2009 12:37:33 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool InsertWithDefaultValues(bool getBackValues) { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_templateId' as parameter 'TemplateId' of the stored procedure. oDatabaseHelper.AddParameter("@TemplateId", _templateIdNonDefault); // Pass the value of '_templateName' as parameter 'TemplateName' of the stored procedure. oDatabaseHelper.AddParameter("@TemplateName", _templateNameNonDefault); // Pass the value of '_templateDescription' as parameter 'TemplateDescription' of the stored procedure. oDatabaseHelper.AddParameter("@TemplateDescription", _templateDescriptionNonDefault); // Pass the value of '_clientId' as parameter 'ClientId' of the stored procedure. oDatabaseHelper.AddParameter("@ClientId", _clientIdNonDefault); // Pass the value of '_hTMLContent' as parameter 'HTMLContent' of the stored procedure. oDatabaseHelper.AddParameter("@HTMLContent", _hTMLContentNonDefault); // Pass the value of '_textContent' as parameter 'TextContent' of the stored procedure. oDatabaseHelper.AddParameter("@TextContent", _textContentNonDefault); // Pass the value of '_modifiedBy' as parameter 'ModifiedBy' of the stored procedure. oDatabaseHelper.AddParameter("@ModifiedBy", _modifiedByNonDefault); // Pass the value of '_modifiedDate' as parameter 'ModifiedDate' of the stored procedure. oDatabaseHelper.AddParameter("@ModifiedDate", _modifiedDateNonDefault); // Pass the value of '_createdDate' as parameter 'CreatedDate' of the stored procedure. oDatabaseHelper.AddParameter("@CreatedDate", _createdDateNonDefault); // Pass the value of '_createdBy' as parameter 'CreatedBy' of the stored procedure. oDatabaseHelper.AddParameter("@CreatedBy", _createdByNonDefault); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); if(!getBackValues ) { oDatabaseHelper.ExecuteScalar("sp_TemplateMaster_Insert_WithDefaultValues", ref ExecutionState); } else { IDataReader dr=oDatabaseHelper.ExecuteReader("sp_TemplateMaster_Insert_WithDefaultValues_AndReturn", ref ExecutionState); if (dr.Read()) { PopulateObjectFromReader(this,dr); } dr.Close(); } oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will Delete one row from the database using the property Information /// </summary> /// /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 1/8/2010 12:24:52 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool Delete() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_id' as parameter 'ID' of the stored procedure. oDatabaseHelper.AddParameter("@ID", _id); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_EmailOpenDetails_Delete", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will Update one new row into the database using the property Information /// </summary> /// /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 11/24/2009 12:37:33 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool Update() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_templateId' as parameter 'TemplateId' of the stored procedure. oDatabaseHelper.AddParameter("@TemplateId", _templateId); // 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.ExecuteScalar("sp_TemplateMaster_Update", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will Update one new row into the database using the property Information /// </summary> /// /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 1/8/2010 12:24:52 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool Update() { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(ConnectionString); // Pass the value of '_id' as parameter 'ID' of the stored procedure. oDatabaseHelper.AddParameter("@ID", _id); // Pass the value of '_campaignID' as parameter 'CampaignID' of the stored procedure. oDatabaseHelper.AddParameter("@CampaignID", _campaignID); // Pass the value of '_contactID' as parameter 'ContactID' of the stored procedure. oDatabaseHelper.AddParameter("@ContactID", _contactID); // Pass the value of '_openedDate' as parameter 'OpenedDate' of the stored procedure. oDatabaseHelper.AddParameter("@OpenedDate", _openedDate); // Pass the value of '_iPAddress' as parameter 'IPAddress' of the stored procedure. oDatabaseHelper.AddParameter("@IPAddress", _iPAddress); // Pass the value of '_userAgent' as parameter 'UserAgent' of the stored procedure. oDatabaseHelper.AddParameter("@UserAgent", _userAgent); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); oDatabaseHelper.ExecuteScalar("sp_EmailOpenDetails_Update", ref ExecutionState); oDatabaseHelper.Dispose(); return ExecutionState; }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// <param name="getBackValues" type="bool">Whether to get the default values inserted, from the database</param> /// <returns>True if succeeded</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 7/31/2012 02:55:35 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// public bool InsertWithDefaultValues(bool getBackValues) { bool ExecutionState = false; oDatabaseHelper = new DatabaseHelper(); // Pass the value of '_id' as parameter 'ID' of the stored procedure. oDatabaseHelper.AddParameter("@ID", _idNonDefault); // Pass the value of '_campaignId' as parameter 'CampaignId' of the stored procedure. oDatabaseHelper.AddParameter("@CampaignId", _campaignIdNonDefault); // Pass the value of '_listMasterID' as parameter 'ListMasterID' of the stored procedure. oDatabaseHelper.AddParameter("@ListMasterID", _listMasterIDNonDefault); // Pass the value of '_contactId' as parameter 'ContactId' of the stored procedure. oDatabaseHelper.AddParameter("@ContactId", _contactIdNonDefault); // Pass the value of '_supressedDomain' as parameter 'SupressedDomain' of the stored procedure. oDatabaseHelper.AddParameter("@SupressedDomain", _supressedDomainNonDefault); // The parameter '@ErrorCode' will contain the status after execution of the stored procedure. oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output); if(!getBackValues ) { oDatabaseHelper.ExecuteScalar("sp_DomineSupress_Insert_WithDefaultValues", ref ExecutionState); } else { IDataReader dr=oDatabaseHelper.ExecuteReader("sp_DomineSupress_Insert_WithDefaultValues_AndReturn", ref ExecutionState); if (dr.Read()) { PopulateObjectFromReader(this,dr); } dr.Close(); } oDatabaseHelper.Dispose(); return ExecutionState; }