📄 marketbasedanalysisdatabase.cs
字号:
public event TransactionTableRowChangeEventHandler TransactionTableRowDeleted;
public event TransactionTableRowChangeEventHandler TransactionTableRowDeleting;
public void AddTransactionTableRow(TransactionTableRow row) {
this.Rows.Add(row);
}
public TransactionTableRow AddTransactionTableRow(string Transactions) {
TransactionTableRow rowTransactionTableRow = ((TransactionTableRow)(this.NewRow()));
rowTransactionTableRow.ItemArray = new object[] {
null,
Transactions};
this.Rows.Add(rowTransactionTableRow);
return rowTransactionTableRow;
}
public TransactionTableRow FindByTransactionID(int TransactionID) {
return ((TransactionTableRow)(this.Rows.Find(new object[] {
TransactionID})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
TransactionTableDataTable cln = ((TransactionTableDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new TransactionTableDataTable();
}
internal void InitVars() {
this.columnTransactionID = this.Columns["TransactionID"];
this.columnTransactions = this.Columns["Transactions"];
}
private void InitClass() {
this.columnTransactionID = new DataColumn("TransactionID", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnTransactionID);
this.columnTransactions = new DataColumn("Transactions", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnTransactions);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnTransactionID}, true));
this.columnTransactionID.AutoIncrement = true;
this.columnTransactionID.AutoIncrementSeed = 1;
this.columnTransactionID.AllowDBNull = false;
this.columnTransactionID.Unique = true;
this.columnTransactions.AllowDBNull = false;
}
private void InitClass(bool autoIncrement)
{
this.columnTransactionID = new DataColumn("TransactionID", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnTransactionID);
this.columnTransactions = new DataColumn("Transactions", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnTransactions);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {this.columnTransactionID}, true));
if (autoIncrement == true)
{
this.columnTransactionID.AutoIncrement = true;
this.columnTransactionID.AutoIncrementSeed = 1;
}
else
{
this.columnTransactionID.AutoIncrement = false;
}
this.columnTransactionID.AllowDBNull = false;
this.columnTransactionID.Unique = true;
this.columnTransactions.AllowDBNull = false;
}
public TransactionTableRow NewTransactionTableRow() {
return ((TransactionTableRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new TransactionTableRow(builder);
}
protected override System.Type GetRowType() {
return typeof(TransactionTableRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.TransactionTableRowChanged != null)) {
this.TransactionTableRowChanged(this, new TransactionTableRowChangeEvent(((TransactionTableRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.TransactionTableRowChanging != null)) {
this.TransactionTableRowChanging(this, new TransactionTableRowChangeEvent(((TransactionTableRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.TransactionTableRowDeleted != null)) {
this.TransactionTableRowDeleted(this, new TransactionTableRowChangeEvent(((TransactionTableRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.TransactionTableRowDeleting != null)) {
this.TransactionTableRowDeleting(this, new TransactionTableRowChangeEvent(((TransactionTableRow)(e.Row)), e.Action));
}
}
public void RemoveTransactionTableRow(TransactionTableRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class TransactionTableRow : DataRow {
private TransactionTableDataTable tableTransactionTable;
internal TransactionTableRow(DataRowBuilder rb) :
base(rb) {
this.tableTransactionTable = ((TransactionTableDataTable)(this.Table));
}
public int TransactionID {
get {
return ((int)(this[this.tableTransactionTable.TransactionIDColumn]));
}
set {
this[this.tableTransactionTable.TransactionIDColumn] = value;
}
}
public string Transactions {
get {
return ((string)(this[this.tableTransactionTable.TransactionsColumn]));
}
set {
this[this.tableTransactionTable.TransactionsColumn] = value;
}
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class TransactionTableRowChangeEvent : EventArgs {
private TransactionTableRow eventRow;
private DataRowAction eventAction;
public TransactionTableRowChangeEvent(TransactionTableRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public TransactionTableRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class ItemsetTableDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn columnItemID;
private DataColumn columnItemset;
private DataColumn columnLevel;
private DataColumn columnSupportCount;
internal ItemsetTableDataTable() :
base("ItemsetTable") {
this.InitClass();
}
internal ItemsetTableDataTable(DataTable table) :
base(table.TableName) {
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
this.CaseSensitive = table.CaseSensitive;
}
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
this.Locale = table.Locale;
}
if ((table.Namespace != table.DataSet.Namespace)) {
this.Namespace = table.Namespace;
}
this.Prefix = table.Prefix;
this.MinimumCapacity = table.MinimumCapacity;
this.DisplayExpression = table.DisplayExpression;
}
[System.ComponentModel.Browsable(false)]
public int Count {
get {
return this.Rows.Count;
}
}
internal DataColumn ItemIDColumn {
get {
return this.columnItemID;
}
}
internal DataColumn ItemsetColumn {
get {
return this.columnItemset;
}
}
internal DataColumn LevelColumn {
get {
return this.columnLevel;
}
}
internal DataColumn SupportCountColumn {
get {
return this.columnSupportCount;
}
}
public ItemsetTableRow this[int index] {
get {
return ((ItemsetTableRow)(this.Rows[index]));
}
}
public event ItemsetTableRowChangeEventHandler ItemsetTableRowChanged;
public event ItemsetTableRowChangeEventHandler ItemsetTableRowChanging;
public event ItemsetTableRowChangeEventHandler ItemsetTableRowDeleted;
public event ItemsetTableRowChangeEventHandler ItemsetTableRowDeleting;
public void AddItemsetTableRow(ItemsetTableRow row) {
this.Rows.Add(row);
}
public ItemsetTableRow AddItemsetTableRow(string Itemset, int Level, int SupportCount) {
ItemsetTableRow rowItemsetTableRow = ((ItemsetTableRow)(this.NewRow()));
rowItemsetTableRow.ItemArray = new object[] {
null,
Itemset,
Level,
SupportCount};
this.Rows.Add(rowItemsetTableRow);
return rowItemsetTableRow;
}
public ItemsetTableRow FindByItemID(int ItemID) {
return ((ItemsetTableRow)(this.Rows.Find(new object[] {
ItemID})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
ItemsetTableDataTable cln = ((ItemsetTableDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new ItemsetTableDataTable();
}
internal void InitVars() {
this.columnItemID = this.Columns["ItemID"];
this.columnItemset = this.Columns["Itemset"];
this.columnLevel = this.Columns["Level"];
this.columnSupportCount = this.Columns["SupportCount"];
}
private void InitClass() {
this.columnItemID = new DataColumn("ItemID", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnItemID);
this.columnItemset = new DataColumn("Itemset", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnItemset);
this.columnLevel = new DataColumn("Level", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnLevel);
this.columnSupportCount = new DataColumn("SupportCount", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnSupportCount);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnItemID}, true));
this.Constraints.Add(new UniqueConstraint("Constraint2", new DataColumn[] {
this.columnItemset}, false));
this.columnItemID.AutoIncrement = true;
this.columnItemID.AutoIncrementSeed = 1;
this.columnItemID.AllowDBNull = false;
this.columnItemID.Unique = true;
this.columnItemset.AllowDBNull = false;
this.columnItemset.Unique = true;
}
public ItemsetTableRow NewItemsetTableRow() {
return ((ItemsetTableRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new ItemsetTableRow(builder);
}
protected override System.Type GetRowType() {
return typeof(ItemsetTableRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -