📄 dsdetails.cs
字号:
rowDTOrdersRow.ItemArray = new object[] {
ISBNNo,
OrderNo,
DateofOrder,
CustomerName,
CustomerAddress1,
CustomerAddress2,
CustomerCity,
CustomerState,
OrderedBy,
Status};
this.Rows.Add(rowDTOrdersRow);
return rowDTOrdersRow;
}
public DTOrdersRow FindByISBNNoOrderNo(string ISBNNo, string OrderNo) {
return ((DTOrdersRow)(this.Rows.Find(new object[] {
ISBNNo,
OrderNo})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
DTOrdersDataTable cln = ((DTOrdersDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
internal void InitVars() {
this.columnISBNNo = this.Columns["ISBNNo"];
this.columnOrderNo = this.Columns["OrderNo"];
this.columnDateofOrder = this.Columns["DateofOrder"];
this.columnCustomerName = this.Columns["CustomerName"];
this.columnCustomerAddress1 = this.Columns["CustomerAddress1"];
this.columnCustomerAddress2 = this.Columns["CustomerAddress2"];
this.columnCustomerCity = this.Columns["CustomerCity"];
this.columnCustomerState = this.Columns["CustomerState"];
this.columnOrderedBy = this.Columns["OrderedBy"];
this.columnStatus = this.Columns["Status"];
}
private void InitClass() {
this.columnISBNNo = new DataColumn("ISBNNo", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnISBNNo);
this.columnOrderNo = new DataColumn("OrderNo", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnOrderNo);
this.columnDateofOrder = new DataColumn("DateofOrder", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnDateofOrder);
this.columnCustomerName = new DataColumn("CustomerName", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnCustomerName);
this.columnCustomerAddress1 = new DataColumn("CustomerAddress1", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnCustomerAddress1);
this.columnCustomerAddress2 = new DataColumn("CustomerAddress2", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnCustomerAddress2);
this.columnCustomerCity = new DataColumn("CustomerCity", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnCustomerCity);
this.columnCustomerState = new DataColumn("CustomerState", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnCustomerState);
this.columnOrderedBy = new DataColumn("OrderedBy", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnOrderedBy);
this.columnStatus = new DataColumn("Status", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnStatus);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnISBNNo,
this.columnOrderNo}, true));
this.columnISBNNo.AllowDBNull = false;
this.columnOrderNo.AllowDBNull = false;
this.columnDateofOrder.AllowDBNull = false;
this.columnCustomerName.AllowDBNull = false;
this.columnCustomerAddress1.AllowDBNull = false;
this.columnCustomerCity.AllowDBNull = false;
this.columnCustomerState.AllowDBNull = false;
this.columnOrderedBy.AllowDBNull = false;
this.columnStatus.AllowDBNull = false;
}
public DTOrdersRow NewDTOrdersRow() {
return ((DTOrdersRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new DTOrdersRow(builder);
}
protected override System.Type GetRowType() {
return typeof(DTOrdersRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.DTOrdersRowChanged != null)) {
this.DTOrdersRowChanged(this, new DTOrdersRowChangeEvent(((DTOrdersRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.DTOrdersRowChanging != null)) {
this.DTOrdersRowChanging(this, new DTOrdersRowChangeEvent(((DTOrdersRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.DTOrdersRowDeleted != null)) {
this.DTOrdersRowDeleted(this, new DTOrdersRowChangeEvent(((DTOrdersRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.DTOrdersRowDeleting != null)) {
this.DTOrdersRowDeleting(this, new DTOrdersRowChangeEvent(((DTOrdersRow)(e.Row)), e.Action));
}
}
public void RemoveDTOrdersRow(DTOrdersRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class DTOrdersRow : DataRow {
private DTOrdersDataTable tableDTOrders;
internal DTOrdersRow(DataRowBuilder rb) :
base(rb) {
this.tableDTOrders = ((DTOrdersDataTable)(this.Table));
}
public string ISBNNo {
get {
return ((string)(this[this.tableDTOrders.ISBNNoColumn]));
}
set {
this[this.tableDTOrders.ISBNNoColumn] = value;
}
}
public string OrderNo {
get {
return ((string)(this[this.tableDTOrders.OrderNoColumn]));
}
set {
this[this.tableDTOrders.OrderNoColumn] = value;
}
}
public System.DateTime DateofOrder {
get {
return ((System.DateTime)(this[this.tableDTOrders.DateofOrderColumn]));
}
set {
this[this.tableDTOrders.DateofOrderColumn] = value;
}
}
public string CustomerName {
get {
return ((string)(this[this.tableDTOrders.CustomerNameColumn]));
}
set {
this[this.tableDTOrders.CustomerNameColumn] = value;
}
}
public string CustomerAddress1 {
get {
return ((string)(this[this.tableDTOrders.CustomerAddress1Column]));
}
set {
this[this.tableDTOrders.CustomerAddress1Column] = value;
}
}
public string CustomerAddress2 {
get {
try {
return ((string)(this[this.tableDTOrders.CustomerAddress2Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableDTOrders.CustomerAddress2Column] = value;
}
}
public string CustomerCity {
get {
return ((string)(this[this.tableDTOrders.CustomerCityColumn]));
}
set {
this[this.tableDTOrders.CustomerCityColumn] = value;
}
}
public string CustomerState {
get {
return ((string)(this[this.tableDTOrders.CustomerStateColumn]));
}
set {
this[this.tableDTOrders.CustomerStateColumn] = value;
}
}
public string OrderedBy {
get {
return ((string)(this[this.tableDTOrders.OrderedByColumn]));
}
set {
this[this.tableDTOrders.OrderedByColumn] = value;
}
}
public string Status {
get {
return ((string)(this[this.tableDTOrders.StatusColumn]));
}
set {
this[this.tableDTOrders.StatusColumn] = value;
}
}
public bool IsCustomerAddress2Null() {
return this.IsNull(this.tableDTOrders.CustomerAddress2Column);
}
public void SetCustomerAddress2Null() {
this[this.tableDTOrders.CustomerAddress2Column] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class DTOrdersRowChangeEvent : EventArgs {
private DTOrdersRow eventRow;
private DataRowAction eventAction;
public DTOrdersRowChangeEvent(DTOrdersRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public DTOrdersRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -