/// <summary> /// 构造 /// </summary> /// <param name = "dataSource">数据源</param> /// <param name = "commandType">命令类型</param> public UpdateCommandCondition(DataTable dataSource, UpdateCommandType commandType) : this() { this.dataSource = dataSource; //.GetChanges(DataRowState.Added | DataRowState.Modified | DataRowState.Deleted); UpdateCommandType = commandType; }
/// <summary> /// 构造 /// </summary> /// <param name = "dataSource">数据源</param> /// <param name = "commandType">命令类型</param> public UpdateCommandCondition(DataTable dataSource, UpdateCommandType commandType) : this() { this.dataSource = dataSource; //.GetChanges(DataRowState.Added | DataRowState.Modified | DataRowState.Deleted); UpdateCommandType = commandType; }
///<summary> /// 更新DataTable ///</summary> ///<param name = "dataSource">数据源</param> ///<param name = "commandType">命令</param> ///<param name = "updateBehavior">更新行为</param> public void UpdateDataTable(DataTable dataSource, UpdateCommandType commandType, DataUpdateBehavior updateBehavior) { var updateCommandColl = new UpdateCommandConditionCollections(updateBehavior) { { dataSource, commandType, updateBehavior } }; UpdateDataTable(updateCommandColl); }
public Command(UpdateCommandType type, object data, IDbMapping mapping) { this.type = type; this.data = data; this.mapping = mapping; }
/// <summary> /// 构造 /// </summary> /// <param name = "dataSource">数据源</param> /// <param name = "commandType">命令类型</param> /// <param name = "updateBehavior">更新行为</param> public UpdateCommandCondition(DataTable dataSource, UpdateCommandType commandType, DataUpdateBehavior updateBehavior) : this(dataSource, commandType) { UpdateBehavior = updateBehavior; }
/// <summary> /// 构造 /// </summary> /// <param name = "dataSource">数据源</param> /// <param name = "commandType">命令类型</param> /// <param name = "updateBehavior">更新行为</param> public UpdateCommandCondition(DataTable dataSource, UpdateCommandType commandType, DataUpdateBehavior updateBehavior) : this(dataSource, commandType) { UpdateBehavior = updateBehavior; }