• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Data.DBCommandWrapper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: FillMorningCheckInfoStat

		private DataSet FillMorningCheckInfoStat(DateTime getBegDate,DateTime getEndDate,string getGrade,
			string getClass,int getState,int needSum)
		{
			getMorningCheckInfoCommand = "GetInfoStat";
			dbCommandWrapper = dbInfoStat.GetStoredProcCommandWrapper(getMorningCheckInfoCommand);
			dbCommandWrapper.AddInParameter("@getBegDate",DbType.DateTime,getBegDate);
			dbCommandWrapper.AddInParameter("@getEndDate",DbType.DateTime,getEndDate);
			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 dbInfoStat.ExecuteDataSet(dbCommandWrapper);
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:13,代码来源:MorningCheckPrintDataAccess.cs


示例17: FillContiAbsForMess

		private DataSet FillContiAbsForMess(bool getState,string getGrade,string getClass,string getName,
			string getNumber,DateTime balanceMonth,int getNeedRestoreDays)
		{
			getContiAbsForMessCommand = "GetMessRestoreDays";
			dbCommandWrapper = dbContiAbs.GetStoredProcCommandWrapper(getContiAbsForMessCommand);
			dbCommandWrapper.AddInParameter("@getState",DbType.Boolean,getState);
			dbCommandWrapper.AddInParameter("@stuGrade",DbType.String,getGrade);
			dbCommandWrapper.AddInParameter("@stuClass",DbType.String,getClass);
			dbCommandWrapper.AddInParameter("@stuName",DbType.String,getName);
			dbCommandWrapper.AddInParameter("@stuNumber",DbType.String,getNumber);
			dbCommandWrapper.AddInParameter("@balanceMonth",DbType.DateTime,balanceMonth);
			dbCommandWrapper.AddInParameter("@getNeedRestoreDays",DbType.Int16,getNeedRestoreDays);
			return dbContiAbs.ExecuteDataSet(dbCommandWrapper);
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:14,代码来源:FinanInfoDataAccess.cs


示例18: InsertNutrition

		public int InsertNutrition(FoodMgmt foodMgmt)
		{
			insertNutritionCommand = "InsertNutrition";
			dbCommandWrapper = dbFoodMgmt.GetStoredProcCommandWrapper(insertNutritionCommand);
			dbCommandWrapper.AddInParameter("@foodCateName",DbType.String,foodMgmt.FoodCategory);
			dbCommandWrapper.AddInParameter("@foodName",DbType.String,foodMgmt.FoodName);
			dbCommandWrapper.AddInParameter("@foodProtein",DbType.Double,foodMgmt.Protein);
			dbCommandWrapper.AddInParameter("@foodFat",DbType.Double,foodMgmt.Fat);
			dbCommandWrapper.AddInParameter("@foodCarbohydrate",DbType.Double,foodMgmt.Carbohydrate);
			dbCommandWrapper.AddInParameter("@foodEnergy",DbType.Double,foodMgmt.Energy);
			dbCommandWrapper.AddInParameter("@foodRemark",DbType.String,foodMgmt.FoodRemark);
			dbCommandWrapper.AddOutParameter("@rowsAffected",DbType.Int16,16);
			dbFoodMgmt.ExecuteNonQuery(dbCommandWrapper);
			return Convert.ToInt32(dbCommandWrapper.GetParameterValue("@rowsAffected"));
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:15,代码来源:FoodManagementDataAccess.cs


示例19: GetRealtimeBackInfo_Graphic

		public void GetRealtimeBackInfo_Graphic(string getGrade,string getClass,DateTime getDate,ref int getHasGone,ref int getHasnotGone,ref int getStuNumbers)
		{
			getRealtimeBackInfo_GraphicCommand = "GetRealtimeBackStat_Graphic";
			dbCommandWrapper = dbRealtime.GetStoredProcCommandWrapper(getRealtimeBackInfo_GraphicCommand);
			dbCommandWrapper.AddInParameter("@getGrade",DbType.String,getGrade);
			dbCommandWrapper.AddInParameter("@getClass",DbType.String,getClass);
			dbCommandWrapper.AddInParameter("@getDate",DbType.DateTime,getDate);
			dbCommandWrapper.AddOutParameter("@getHasGone",DbType.Int32,4);
			dbCommandWrapper.AddOutParameter("@getHasnotGone",DbType.Int32,4);
			dbCommandWrapper.AddOutParameter("@getStuNumbers",DbType.Int32,4);
			dbRealtime.ExecuteNonQuery(dbCommandWrapper);

			getHasGone = Convert.ToInt32(dbCommandWrapper.GetParameterValue("@getHasGone"));
			getHasnotGone = Convert.ToInt32(dbCommandWrapper.GetParameterValue("@getHasnotGone"));
			getStuNumbers = Convert.ToInt32(dbCommandWrapper.GetParameterValue("@getStuNumbers"));
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:16,代码来源:RealtimeInfoDataAccess.cs


示例20: DoAttendCalcForClass

		public void DoAttendCalcForClass(string getGrade,string getClass,string getBegTime,
			string getEndTime,string getState)
		{
			doStuAttendCalcForClassCommand = "Student_AttendCalcForClass";
			dbCommandWrapper = dbAttendCalc.GetStoredProcCommandWrapper(doStuAttendCalcForClassCommand);
			dbCommandWrapper.AddInParameter("@setGrade",DbType.String,getGrade);
			dbCommandWrapper.AddInParameter("@setClass",DbType.String,getClass);
			dbCommandWrapper.AddInParameter("@setBegTime",DbType.String,getBegTime);
			dbCommandWrapper.AddInParameter("@setEndTime",DbType.String,getEndTime);
			dbCommandWrapper.AddInParameter("@setState",DbType.String,getState);
			dbCommandWrapper.AddOutParameter("@getStateAmount",DbType.Int32,4);
			dbCommandWrapper.AddOutParameter("@getAllStateAmount",DbType.Int32,4);
			dbCommandWrapper.AddOutParameter("@getStuAmount",DbType.Int32,4);
			dbAttendCalc.ExecuteDataSet(dbCommandWrapper);
			StateAmount = Convert.ToInt32(dbCommandWrapper.GetParameterValue("@getStateAmount"));
			StuAmount = Convert.ToInt32(dbCommandWrapper.GetParameterValue("@getStuAmount"));
			AllStateAmount = Convert.ToInt32(dbCommandWrapper.GetParameterValue("@getAllStateAmount"));
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:18,代码来源:StudentAttendCalcDataAccess.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Data.Database类代码示例发布时间:2022-05-26
下一篇:
C# Design.ConfigurationNodeChangedEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap