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


C# DatabaseHelper.ExecuteReader方法代码示例

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


在下文中一共展示了DatabaseHelper.ExecuteReader方法的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: SelectAllByToday

        public static ContactDeleteds SelectAllByToday(string ConnectionString)
        {
            DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
            bool ExecutionState = false;

            // The parameter '@ErrorCode' will contain the status after execution of the stored procedure.

            IDataReader dr = oDatabaseHelper.ExecuteReader("sp_ContactDeleted_SelectAll_ByToday", ref ExecutionState);
            ContactDeleteds ContactDeleteds = PopulateObjectsFromReader(dr, ConnectionString);
            dr.Close();
            oDatabaseHelper.Dispose();
            return ContactDeleteds;
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:13,代码来源:ContactDeleted.cs

示例3: SelectAllByDays

        public static AutomationJobs SelectAllByDays(int days, String ConnectionString)
        {
            DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
            bool ExecutionState = false;

            // The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
            oDatabaseHelper.AddParameter("@DAYS", days);

            IDataReader dr = oDatabaseHelper.ExecuteReader("sp_AutomationJob_SelectAll_ByDays", ref ExecutionState);
            AutomationJobs ContactMasters = PopulateObjectsFromReader(dr, ConnectionString);
            dr.Close();
            oDatabaseHelper.Dispose();
            return ContactMasters;
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:14,代码来源:AutomationJob.cs

示例4: selectAllForLaunchCampaigns

        //This method will Select all te campaigns from the table CampaignMaster which are not included in CampaignJob
        public static CampaignMasters selectAllForLaunchCampaigns(String ConnectionString)
        {
            DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
            bool ExecutionState = false;

            // The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
            oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);

            IDataReader dr = oDatabaseHelper.ExecuteReader("sp_CampaignJob_selectAllForLaunchCampaigns", ref ExecutionState);
            CampaignMasters CampaignMasters = PopulateObjectsFromReader(dr,ConnectionString);
            dr.Close();
            oDatabaseHelper.Dispose();
            return CampaignMasters;
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:15,代码来源:CampaignMaster.cs

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

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

示例7: SelectAllDomianLast90Days

        //Vikas Kumar Bhatnagar on 04thJuly2011
        public static CampaignJobs SelectAllDomianLast90Days(string ConnectionString)
        {
            DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
            bool ExecutionState = false;

            // The parameter '@ErrorCode' will contain the status after execution of the stored procedure.

            IDataReader dr = oDatabaseHelper.ExecuteReader("TotalDeliverCountByDomainLast90Days", ref ExecutionState);
            CampaignJobs CampaignJobs = PopulateObjectsFromReaderNew(dr, ConnectionString);
            dr.Close();
            oDatabaseHelper.Dispose();
            return CampaignJobs;
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:14,代码来源:CampaignJob.cs

示例8: SelectAllDomianByWeek

        /// <summary>
        /// </summary>
        /// <param name="days"></param>
        /// <param name="ConnectionString"></param>
        /// <returns></returns>
        //Vikas Kumar Bhatnagar on 04thJuly2011
        public static CampaignJobs SelectAllDomianByWeek(String ConnectionString, ref DateTime from, ref DateTime to)
        {
            DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
            bool ExecutionState = false;

            // The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
            // oDatabaseHelper.AddParameter("@DAYS", days);

            IDataReader dr = oDatabaseHelper.ExecuteReader("TotalDeliverCountByDomainLast7Days", ref ExecutionState);
            CampaignJobs ContactMasters = PopulateObjectsFromReaderNew(dr, ConnectionString);
            dr.Close();
            oDatabaseHelper.Dispose();
            return ContactMasters;
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:20,代码来源:CampaignJob.cs

示例9: SearchContacts

        //swaraj on 23rd apr 2010
        //this method is used to search the contacts depends on search criteria
        public static DataTable SearchContacts(string WhereCondn, string connectionstring, int ListId)
        {
            bool ExcutionState = false;
            DatabaseHelper obDatahelper = new DatabaseHelper(connectionstring);
            obDatahelper.AddParameter("@whereCondition", WhereCondn);
            obDatahelper.AddParameter("@ListId", ListId);
            obDatahelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);
            SqlDataReader drContactMaster = (SqlDataReader)obDatahelper.ExecuteReader("sp_ListContactMaster_SelectBySearchCondition_Proc", ref ExcutionState);
            DataTable dt = new DataTable();
            // Add the table columns.
            for (int i = 0; i < drContactMaster.FieldCount; i++)
                dt.Columns.Add(drContactMaster.GetName(i), drContactMaster.GetFieldType(i));

            while (drContactMaster.Read())
            {
                DataRow r = dt.NewRow();
                // Assign DataReader values to DataRow.
                for (int i = 0; i < drContactMaster.FieldCount; i++)
                    r[i] = drContactMaster[i];
                dt.Rows.Add(r);
            }

            drContactMaster.Close();
            return dt;
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:27,代码来源:ListContactMaster.cs

示例10: InsertWithDefaultValues

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

示例11: InsertWithDefaultValues

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

示例12: SelectAllByForeignKeyFromAdvancedImportJob

        /// <summary>
        /// This method will get row(s) from the database using the value of the field specified 
        /// along with the details of the child table.
        /// </summary>
        ///
        /// <param name="pk" type="AdvancedImportJobPrimaryKey">Primary Key information based on which data is to be fetched.</param>
        ///
        /// <returns>object of class AdvancedFieldMaps</returns>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			7/4/2012 2:40:13 PM				Created function
        /// 
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        public static AdvancedFieldMaps SelectAllByForeignKeyFromAdvancedImportJob(AdvancedImportJobPrimaryKey pk)
        {
            DatabaseHelper oDatabaseHelper = new DatabaseHelper();
            bool ExecutionState = false;
            AdvancedFieldMaps obj = null;

            // 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);

            IDataReader dr=oDatabaseHelper.ExecuteReader("sp_AdvancedFieldMap_SelectAllByForeignKeyAdvancedImportJob", ref ExecutionState);
            obj = new AdvancedFieldMaps();
            obj = AdvancedFieldMap.PopulateObjectsFromReaderWithCheckingReader(dr, oDatabaseHelper);

            dr.Close();
            oDatabaseHelper.Dispose();
            return obj;
        }
开发者ID:shekar348,项目名称:1PointOne,代码行数:43,代码来源:AdvancedFieldMapBase.cs

示例13: InsertWithDefaultValues

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

示例14: InsertWithDefaultValues

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

示例15: InsertWithDefaultValues

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


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