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


C# Data.DBCommandWrapper类代码示例

本文整理汇总了C#中Microsoft.Practices.EnterpriseLibrary.Data.DBCommandWrapper的典型用法代码示例。如果您正苦于以下问题:C# DBCommandWrapper类的具体用法?C# DBCommandWrapper怎么用?C# DBCommandWrapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DBCommandWrapper类属于Microsoft.Practices.EnterpriseLibrary.Data命名空间,在下文中一共展示了DBCommandWrapper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddParametersFromCache

        /// <summary>
        /// <para>Adds parameters to a command using the cache</para>
        /// </summary>
        /// <param name="command">
        /// <para>The command to add the parameters.</para>
        /// </param>
        protected virtual void AddParametersFromCache(DBCommandWrapper command)
        {
            IDataParameter[] parameters = this.cache.GetCachedParameterSet(command.Command);

            foreach (IDataParameter p in parameters)
            {
                command.Command.Parameters.Add(p);
            }
        }
开发者ID:bnantz,项目名称:NCS-V1-1,代码行数:15,代码来源:ParameterCache.cs

示例2: FillParameters

        /// <summary>
        /// <para>
        /// Populates the parameter collection for a command wrapper from the cache 
        /// or performs a round-trip to the database to query the parameters
        /// </para>
        /// </summary>
        /// <param name="command">
        /// <para>The command to add the parameters.</para>
        /// </param>
        /// <param name="parameterToken">
        /// <para>The token used to delimit parameters.</para>
        /// </param>
        public void FillParameters(DBCommandWrapper command, char parameterToken)
        {
            if (AlreadyCached(command))
            {
                AddParametersFromCache(command);
            }
            else
            {
                command.DiscoverParameters(parameterToken);
                IDataParameter[] copyOfParameters = CreateParameterCopy(command);

                this.cache.AddParameterSetToCache(command.Command, copyOfParameters);
            }

            command.AssignParameterValues();
        }
开发者ID:bnantz,项目名称:NCS-V1-1,代码行数:28,代码来源:ParameterCache.cs

示例3: FillRolesDuty

		private DataSet FillRolesDuty(int getTeaNumber)
		{
			getRolseDutyCommand = "GetRolesDuty";
			dbCommandWrapper = dbRoles.GetStoredProcCommandWrapper(getRolseDutyCommand);
			dbCommandWrapper.AddInParameter("@getTeaNumber",DbType.Int32,getTeaNumber);
			return dbRoles.ExecuteDataSet(dbCommandWrapper);
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:7,代码来源:RolesDataAccess.cs

示例4: CheckTeaDuty

		private void CheckTeaDuty()
		{
			checkTeaDutyCommand = "RecTeacherWorkingDaysPerWeek";
			dbCommandWrapper = dbPrepareForCheck.GetStoredProcCommandWrapper(checkTeaDutyCommand);
			dbCommandWrapper.CommandTimeout = 180;
			dbPrepareForCheck.ExecuteNonQuery(dbCommandWrapper);
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:7,代码来源:PrepareForStuCheckInfoDataAccess.cs

示例5: SaveTeaAlternate

		private void SaveTeaAlternate()
		{
			saveAlternateCommand = "SaveAlternate";
			dbCommandWrapper = dbPrepareForCheck.GetStoredProcCommandWrapper(saveAlternateCommand);
			dbCommandWrapper.CommandTimeout = 180;
			dbPrepareForCheck.ExecuteNonQuery(dbCommandWrapper);
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:7,代码来源:PrepareForStuCheckInfoDataAccess.cs

示例6: CheckAbsDoneYesterday

		private void CheckAbsDoneYesterday()
		{
			checkAbsDoneYesterdayCommand = "CheckAbsDoneYesterday";
			dbCommandWrapper = dbPrepareForCheck.GetStoredProcCommandWrapper(checkAbsDoneYesterdayCommand);
			dbCommandWrapper.CommandTimeout = 600;
			dbPrepareForCheck.ExecuteNonQuery(dbCommandWrapper);
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:7,代码来源:PrepareForStuCheckInfoDataAccess.cs

示例7: FillAbsentStudent

		private void FillAbsentStudent()
		{
			fillAbsentStudentCommand = "FillAbsentStudent";
			dbCommandWrapper = dbPrepareForCheck.GetStoredProcCommandWrapper(fillAbsentStudentCommand);
			dbCommandWrapper.CommandTimeout = 180;
			dbPrepareForCheck.ExecuteNonQuery(dbCommandWrapper);
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:7,代码来源:PrepareForStuCheckInfoDataAccess.cs

示例8: FillGradeData

		private DataSet FillGradeData(string gradeName,string gradeNumber)
		{
			getGradeInfoCommand = "GetGradeList";
			dbCommandWrapper = dbAccess.GetStoredProcCommandWrapper(getGradeInfoCommand);
			dbCommandWrapper.AddInParameter("@GradeName",DbType.String,gradeName);
			dbCommandWrapper.AddInParameter("@GradeNumber",DbType.String,gradeNumber);
			return dbAccess.ExecuteDataSet(dbCommandWrapper);
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:8,代码来源:StuInfoDataAccess.cs

示例9: Fill2DaysAbs

		private DataSet Fill2DaysAbs(string getGrade,string getClass,DateTime getDate)
		{
			get2DaysAbsCommand = "Get2DaysAbsence";
			dbCommandWrapper = dbVisit.GetStoredProcCommandWrapper(get2DaysAbsCommand);
			dbCommandWrapper.AddInParameter("@stuGrade",DbType.String,getGrade);
			dbCommandWrapper.AddInParameter("@stuClass",DbType.String,getClass);
			dbCommandWrapper.AddInParameter("@getDate",DbType.DateTime,getDate);
			return dbVisit.ExecuteDataSet(dbCommandWrapper);
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:9,代码来源:StuVisitInfoDataAccess.cs

示例10: FillFinanStuInfo

		private DataSet FillFinanStuInfo(string getGrade,string getClass,string getName,string getNumber)
		{
			getFinanStuInfoCommand = "GetFinanStuInfo";
			dbCommandWrapper = dbContiAbs.GetStoredProcCommandWrapper(getFinanStuInfoCommand);
			dbCommandWrapper.AddInParameter("@stuGrade",DbType.String,getGrade);
			dbCommandWrapper.AddInParameter("@stuClass",DbType.String,getClass);
			dbCommandWrapper.AddInParameter("@stuName",DbType.String,getName);
			dbCommandWrapper.AddInParameter("@stuNumber",DbType.String,getNumber);
			return dbContiAbs.ExecuteDataSet(dbCommandWrapper);
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:10,代码来源:FinanInfoDataAccess.cs

示例11: FillStuInfoData

		//查询学生信息表,返回数据集
		private DataSet FillStuInfoData(string stuGrade,string stuClass,
			string stuName,string stuNumber)
		{
			getStuInfoCommand = "GetStudentInfo";
			dbCommandWrapper = dbAccess.GetStoredProcCommandWrapper(getStuInfoCommand);
			dbCommandWrapper.AddInParameter("@StuGrade",DbType.String,stuGrade);
			dbCommandWrapper.AddInParameter("@StuClass",DbType.String,stuClass);
			dbCommandWrapper.AddInParameter("@StuName",DbType.String,stuName);
			dbCommandWrapper.AddInParameter("@StuNumber",DbType.String,stuNumber);
			return dbAccess.ExecuteDataSet(dbCommandWrapper);
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:12,代码来源:StuInfoDataAccess.cs

示例12: FillAbsentDaysInMonth

		private DataSet FillAbsentDaysInMonth(int getNumber,DateTime getDate)
		{
			getAbsentDaysInMonthCommand = "GetAbsentDaysInMonth";
			dbCommandWrapper = dbVisit.GetStoredProcCommandWrapper(getAbsentDaysInMonthCommand);
			dbCommandWrapper.AddInParameter("@getStuNumber",DbType.Int16,getNumber);
			dbCommandWrapper.AddInParameter("@getDate",DbType.DateTime,getDate);
			dbCommandWrapper.AddOutParameter("getAbsSum",DbType.Int32,4);
			DataSet dsAbsentDaysInMonth = dbVisit.ExecuteDataSet(dbCommandWrapper);
			GetAbsSum = Convert.ToInt32(dbCommandWrapper.GetParameterValue("@getAbsSum"));
			return dsAbsentDaysInMonth;
		}	
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:11,代码来源:StuVisitInfoDataAccess.cs

示例13: FillTeaNumbers

		private int FillTeaNumbers(string getWeekDay,string getDutyID,string getDept)
		{
			getTeaNumbersCommand = "GetTeaNumberInDuty";
			dbCommandWrapper = dbRealtimeInfo.GetStoredProcCommandWrapper(getTeaNumbersCommand);
			dbCommandWrapper.AddInParameter("@getDept",DbType.String,getDept);
			dbCommandWrapper.AddInParameter("@getWeekDay",DbType.String,getWeekDay);
			dbCommandWrapper.AddInParameter("@getDutyID",DbType.String,getDutyID);
			dbCommandWrapper.AddOutParameter("@getTeaNumbers",DbType.Int32,4);
			dbRealtimeInfo.ExecuteNonQuery(dbCommandWrapper);
			return Convert.ToInt32(dbCommandWrapper.GetParameterValue("@getTeaNumbers"));
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:11,代码来源:RealtimeInfo_TeacherDataAccess.cs

示例14: FillTeacherRealTimeInfoWithNoDuty

		private void FillTeacherRealTimeInfoWithNoDuty(string dept,string getWeekDay,  ref int total, ref int attend, ref int leave)
		{
			string getRealTimeInfoWithNoDuty = "GetTeacher_RealTimeInfo_WithNoDuty";
			dbCommandWrapper = dbRealtimeInfo.GetStoredProcCommandWrapper(getRealTimeInfoWithNoDuty);
			dbCommandWrapper.AddInParameter("@getDayOfWeek", DbType.String, getWeekDay);
			dbCommandWrapper.AddInParameter("@getDept", DbType.String, dept);
			DataSet dsInfo = dbRealtimeInfo.ExecuteDataSet(dbCommandWrapper);
			total = Convert.ToInt32(dsInfo.Tables[0].Rows[0][0]);
			attend = Convert.ToInt32(dsInfo.Tables[1].Rows[0][0]);
			leave =  Convert.ToInt32(dsInfo.Tables[2].Rows[0][0]);
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:11,代码来源:RealtimeInfo_TeacherDataAccess.cs

示例15: FillRealtime

		private DataSet FillRealtime(DateTime getDate,string getGrade,string getClass,int getState,int needSum)
		{
			getRealtimeInfoCommand = "GetRealTimeInfo";
			dbCommandWrapper = dbRealtime.GetStoredProcCommandWrapper(getRealtimeInfoCommand);
			dbCommandWrapper.AddInParameter("@getDate",DbType.String,getDate.Date.ToString("yyyy-MM-dd"));
			dbCommandWrapper.AddInParameter("@getGrade",DbType.String,getGrade);
			dbCommandWrapper.AddInParameter("@getClass",DbType.String,getClass);
			dbCommandWrapper.AddInParameter("@getState",DbType.Int32,getState);
			dbCommandWrapper.AddInParameter("@needSum",DbType.Int32,needSum);
			return dbRealtime.ExecuteDataSet(dbCommandWrapper);
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:11,代码来源:RealtimeInfoDataAccess.cs


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