📄 stusrc.cs
字号:
public void SetstuidNull() {
this[this.tablesrcmain.stuidColumn] = System.Convert.DBNull;
}
public srcRow[] GetsrcRows() {
return ((srcRow[])(this.GetChildRows(this.Table.ChildRelations["srcmain_src"])));
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class srcmainRowChangeEvent : EventArgs {
private srcmainRow eventRow;
private DataRowAction eventAction;
public srcmainRowChangeEvent(srcmainRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public srcmainRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class srcDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn columnsubject;
private DataColumn columndate;
private DataColumn columnsort;
private DataColumn columnsrc;
private DataColumn columnsrcmain_Id;
internal srcDataTable() :
base("src") {
this.InitClass();
}
internal srcDataTable(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 subjectColumn {
get {
return this.columnsubject;
}
}
internal DataColumn dateColumn {
get {
return this.columndate;
}
}
internal DataColumn sortColumn {
get {
return this.columnsort;
}
}
internal DataColumn srcColumn {
get {
return this.columnsrc;
}
}
internal DataColumn srcmain_IdColumn {
get {
return this.columnsrcmain_Id;
}
}
public srcRow this[int index] {
get {
return ((srcRow)(this.Rows[index]));
}
}
public event srcRowChangeEventHandler srcRowChanged;
public event srcRowChangeEventHandler srcRowChanging;
public event srcRowChangeEventHandler srcRowDeleted;
public event srcRowChangeEventHandler srcRowDeleting;
public void AddsrcRow(srcRow row) {
this.Rows.Add(row);
}
public srcRow AddsrcRow(string subject, System.DateTime date, string sort, System.Double src, srcmainRow parentsrcmainRowBysrcmain_src) {
srcRow rowsrcRow = ((srcRow)(this.NewRow()));
rowsrcRow.ItemArray = new object[] {
subject,
date,
sort,
src,
parentsrcmainRowBysrcmain_src[2]};
this.Rows.Add(rowsrcRow);
return rowsrcRow;
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
srcDataTable cln = ((srcDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new srcDataTable();
}
internal void InitVars() {
this.columnsubject = this.Columns["subject"];
this.columndate = this.Columns["date"];
this.columnsort = this.Columns["sort"];
this.columnsrc = this.Columns["src"];
this.columnsrcmain_Id = this.Columns["srcmain_Id"];
}
private void InitClass() {
this.columnsubject = new DataColumn("subject", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnsubject);
this.columndate = new DataColumn("date", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columndate);
this.columnsort = new DataColumn("sort", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnsort);
this.columnsrc = new DataColumn("src", typeof(System.Double), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnsrc);
this.columnsrcmain_Id = new DataColumn("srcmain_Id", typeof(int), null, System.Data.MappingType.Hidden);
this.Columns.Add(this.columnsrcmain_Id);
}
public srcRow NewsrcRow() {
return ((srcRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new srcRow(builder);
}
protected override System.Type GetRowType() {
return typeof(srcRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.srcRowChanged != null)) {
this.srcRowChanged(this, new srcRowChangeEvent(((srcRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.srcRowChanging != null)) {
this.srcRowChanging(this, new srcRowChangeEvent(((srcRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.srcRowDeleted != null)) {
this.srcRowDeleted(this, new srcRowChangeEvent(((srcRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.srcRowDeleting != null)) {
this.srcRowDeleting(this, new srcRowChangeEvent(((srcRow)(e.Row)), e.Action));
}
}
public void RemovesrcRow(srcRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class srcRow : DataRow {
private srcDataTable tablesrc;
internal srcRow(DataRowBuilder rb) :
base(rb) {
this.tablesrc = ((srcDataTable)(this.Table));
}
public string subject {
get {
try {
return ((string)(this[this.tablesrc.subjectColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablesrc.subjectColumn] = value;
}
}
public System.DateTime date {
get {
try {
return ((System.DateTime)(this[this.tablesrc.dateColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablesrc.dateColumn] = value;
}
}
public string sort {
get {
try {
return ((string)(this[this.tablesrc.sortColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablesrc.sortColumn] = value;
}
}
public System.Double src {
get {
try {
return ((System.Double)(this[this.tablesrc.srcColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablesrc.srcColumn] = value;
}
}
public srcmainRow srcmainRow {
get {
return ((srcmainRow)(this.GetParentRow(this.Table.ParentRelations["srcmain_src"])));
}
set {
this.SetParentRow(value, this.Table.ParentRelations["srcmain_src"]);
}
}
public bool IssubjectNull() {
return this.IsNull(this.tablesrc.subjectColumn);
}
public void SetsubjectNull() {
this[this.tablesrc.subjectColumn] = System.Convert.DBNull;
}
public bool IsdateNull() {
return this.IsNull(this.tablesrc.dateColumn);
}
public void SetdateNull() {
this[this.tablesrc.dateColumn] = System.Convert.DBNull;
}
public bool IssortNull() {
return this.IsNull(this.tablesrc.sortColumn);
}
public void SetsortNull() {
this[this.tablesrc.sortColumn] = System.Convert.DBNull;
}
public bool IssrcNull() {
return this.IsNull(this.tablesrc.srcColumn);
}
public void SetsrcNull() {
this[this.tablesrc.srcColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class srcRowChangeEvent : EventArgs {
private srcRow eventRow;
private DataRowAction eventAction;
public srcRowChangeEvent(srcRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public srcRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -