📄 returninfo.cs
字号:
ReturnsDataTable cln = ((ReturnsDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new ReturnsDataTable();
}
internal void InitVars() {
this.columnBillNo = this.Columns["BillNo"];
this.columnBillDate = this.Columns["BillDate"];
this.columnUsrID = this.Columns["UsrID"];
this.columnStockId = this.Columns["StockId"];
this.columnQuantity = this.Columns["Quantity"];
this.columnSalePrice = this.Columns["SalePrice"];
}
private void InitClass() {
this.columnBillNo = new DataColumn("BillNo", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBillNo);
this.columnBillDate = new DataColumn("BillDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBillDate);
this.columnUsrID = new DataColumn("UsrID", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnUsrID);
this.columnStockId = new DataColumn("StockId", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnStockId);
this.columnQuantity = new DataColumn("Quantity", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnQuantity);
this.columnSalePrice = new DataColumn("SalePrice", typeof(System.Decimal), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnSalePrice);
}
public ReturnsRow NewReturnsRow() {
return ((ReturnsRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new ReturnsRow(builder);
}
protected override System.Type GetRowType() {
return typeof(ReturnsRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.ReturnsRowChanged != null)) {
this.ReturnsRowChanged(this, new ReturnsRowChangeEvent(((ReturnsRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.ReturnsRowChanging != null)) {
this.ReturnsRowChanging(this, new ReturnsRowChangeEvent(((ReturnsRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.ReturnsRowDeleted != null)) {
this.ReturnsRowDeleted(this, new ReturnsRowChangeEvent(((ReturnsRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.ReturnsRowDeleting != null)) {
this.ReturnsRowDeleting(this, new ReturnsRowChangeEvent(((ReturnsRow)(e.Row)), e.Action));
}
}
public void RemoveReturnsRow(ReturnsRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class ReturnsRow : DataRow {
private ReturnsDataTable tableReturns;
internal ReturnsRow(DataRowBuilder rb) :
base(rb) {
this.tableReturns = ((ReturnsDataTable)(this.Table));
}
public int BillNo {
get {
try {
return ((int)(this[this.tableReturns.BillNoColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableReturns.BillNoColumn] = value;
}
}
public System.DateTime BillDate {
get {
try {
return ((System.DateTime)(this[this.tableReturns.BillDateColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableReturns.BillDateColumn] = value;
}
}
public string UsrID {
get {
try {
return ((string)(this[this.tableReturns.UsrIDColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableReturns.UsrIDColumn] = value;
}
}
public int StockId {
get {
try {
return ((int)(this[this.tableReturns.StockIdColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableReturns.StockIdColumn] = value;
}
}
public int Quantity {
get {
try {
return ((int)(this[this.tableReturns.QuantityColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableReturns.QuantityColumn] = value;
}
}
public System.Decimal SalePrice {
get {
try {
return ((System.Decimal)(this[this.tableReturns.SalePriceColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableReturns.SalePriceColumn] = value;
}
}
public bool IsBillNoNull() {
return this.IsNull(this.tableReturns.BillNoColumn);
}
public void SetBillNoNull() {
this[this.tableReturns.BillNoColumn] = System.Convert.DBNull;
}
public bool IsBillDateNull() {
return this.IsNull(this.tableReturns.BillDateColumn);
}
public void SetBillDateNull() {
this[this.tableReturns.BillDateColumn] = System.Convert.DBNull;
}
public bool IsUsrIDNull() {
return this.IsNull(this.tableReturns.UsrIDColumn);
}
public void SetUsrIDNull() {
this[this.tableReturns.UsrIDColumn] = System.Convert.DBNull;
}
public bool IsStockIdNull() {
return this.IsNull(this.tableReturns.StockIdColumn);
}
public void SetStockIdNull() {
this[this.tableReturns.StockIdColumn] = System.Convert.DBNull;
}
public bool IsQuantityNull() {
return this.IsNull(this.tableReturns.QuantityColumn);
}
public void SetQuantityNull() {
this[this.tableReturns.QuantityColumn] = System.Convert.DBNull;
}
public bool IsSalePriceNull() {
return this.IsNull(this.tableReturns.SalePriceColumn);
}
public void SetSalePriceNull() {
this[this.tableReturns.SalePriceColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class ReturnsRowChangeEvent : EventArgs {
private ReturnsRow eventRow;
private DataRowAction eventAction;
public ReturnsRowChangeEvent(ReturnsRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public ReturnsRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -