本文整理汇总了C#中Category.Clear方法的典型用法代码示例。如果您正苦于以下问题:C# Category.Clear方法的具体用法?C# Category.Clear怎么用?C# Category.Clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Category
的用法示例。
在下文中一共展示了Category.Clear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FillByWhereClause
public virtual int FillByWhereClause(Category.CategoriesDataTable dataTable, string whereClause, System.Data.OleDb.OleDbParameter[] parameters)
{
System.Data.OleDb.OleDbCommand command = new System.Data.OleDb.OleDbCommand();
command.Connection = this.Connection;
command.CommandText = @"SELECT CategoryID, CategoryName, Description,
Picture, CreateID, CreateUser, ModifyID, ModifyUser FROM Categories " +
whereClause + ";";
command.CommandType = System.Data.CommandType.Text;
if (null != parameters)
command.Parameters.AddRange(parameters);
this.Adapter.SelectCommand = command;
if ((this.ClearBeforeFill == true))
{
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
示例2: Fill
public virtual int Fill(Category.ChangeLogDataTable dataTable, int ID, System.Nullable<int> MAX_SequenceNumber_, System.Nullable<int> MAX_SequenceNumber_1, string ChangeUser) {
this.Adapter.SelectCommand = this.CommandCollection[0];
this.Adapter.SelectCommand.Parameters[0].Value = ((int)(ID));
if ((MAX_SequenceNumber_.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[1].Value = ((int)(MAX_SequenceNumber_.Value));
}
else {
this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
}
if ((MAX_SequenceNumber_1.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[2].Value = ((int)(MAX_SequenceNumber_1.Value));
}
else {
this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
}
if ((ChangeUser == null)) {
this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[3].Value = ((string)(ChangeUser));
}
if ((this.ClearBeforeFill == true)) {
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
示例3: FillBy
public virtual int FillBy(Category.CategoriesDataTable dataTable, int CategoryID) {
this.Adapter.SelectCommand = this.CommandCollection[1];
this.Adapter.SelectCommand.Parameters[0].Value = ((int)(CategoryID));
if ((this.ClearBeforeFill == true)) {
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}