📄 detailduty.cs
字号:
return rowDutyDetailRow;
}
public System.Collections.IEnumerator GetEnumerator()
{
return this.Rows.GetEnumerator();
}
public override DataTable Clone()
{
DutyDetailDataTable cln = ((DutyDetailDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance()
{
return new DutyDetailDataTable();
}
public void InitVars()
{
this.columnDate = this.Columns["Date"];
this.columnOnDutyTime = this.Columns["OnDutyTime"];
this.columnOffDutyTime = this.Columns["OffDutyTime"];
this.columnOffDutyMemo = this.Columns["OffDutyMemo"];
this.columnOnDutyMemo = this.Columns["OnDutyMemo"];
}
private void InitClass()
{
this.columnDate = new DataColumn("Date", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnDate);
this.columnOnDutyTime = new DataColumn("OnDutyTime", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnOnDutyTime);
this.columnOffDutyTime = new DataColumn("OffDutyTime", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnOffDutyTime);
this.columnOffDutyMemo = new DataColumn("OffDutyMemo", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnOffDutyMemo);
this.columnOnDutyMemo = new DataColumn("OnDutyMemo", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnOnDutyMemo);
this.columnOnDutyMemo.AllowDBNull = false;
}
public DutyDetailRow NewDutyDetailRow()
{
return ((DutyDetailRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder)
{
return new DutyDetailRow(builder);
}
protected override System.Type GetRowType()
{
return typeof(DutyDetailRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e)
{
base.OnRowChanged(e);
if ((this.DutyDetailRowChanged != null))
{
this.DutyDetailRowChanged(this, new DutyDetailRowChangeEvent(((DutyDetailRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e)
{
base.OnRowChanging(e);
if ((this.DutyDetailRowChanging != null))
{
this.DutyDetailRowChanging(this, new DutyDetailRowChangeEvent(((DutyDetailRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e)
{
base.OnRowDeleted(e);
if ((this.DutyDetailRowDeleted != null))
{
this.DutyDetailRowDeleted(this, new DutyDetailRowChangeEvent(((DutyDetailRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e)
{
base.OnRowDeleting(e);
if ((this.DutyDetailRowDeleting != null))
{
this.DutyDetailRowDeleting(this, new DutyDetailRowChangeEvent(((DutyDetailRow)(e.Row)), e.Action));
}
}
public void RemoveDutyDetailRow(DutyDetailRow row)
{
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public partial class DutyDetailRow : DataRow
{
private DutyDetailDataTable tableDutyDetail;
public DutyDetailRow(DataRowBuilder rb) :
base(rb)
{
this.tableDutyDetail = ((DutyDetailDataTable)(this.Table));
}
public System.DateTime Date
{
get
{
try
{
return ((System.DateTime)(this[this.tableDutyDetail.DateColumn]));
}
catch (InvalidCastException e)
{
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set
{
this[this.tableDutyDetail.DateColumn] = value;
}
}
public System.DateTime OnDutyTime
{
get
{
try
{
return ((System.DateTime)(this[this.tableDutyDetail.OnDutyTimeColumn]));
}
catch (InvalidCastException e)
{
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set
{
this[this.tableDutyDetail.OnDutyTimeColumn] = value;
}
}
public System.DateTime OffDutyTime
{
get
{
try
{
return ((System.DateTime)(this[this.tableDutyDetail.OffDutyTimeColumn]));
}
catch (InvalidCastException e)
{
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set
{
this[this.tableDutyDetail.OffDutyTimeColumn] = value;
}
}
public string OffDutyMemo
{
get
{
try
{
return ((string)(this[this.tableDutyDetail.OffDutyMemoColumn]));
}
catch (InvalidCastException e)
{
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set
{
this[this.tableDutyDetail.OffDutyMemoColumn] = value;
}
}
public string OnDutyMemo
{
get
{
return ((string)(this[this.tableDutyDetail.OnDutyMemoColumn]));
}
set
{
this[this.tableDutyDetail.OnDutyMemoColumn] = value;
}
}
public bool IsDateNull()
{
return this.IsNull(this.tableDutyDetail.DateColumn);
}
public void SetDateNull()
{
this[this.tableDutyDetail.DateColumn] = System.Convert.DBNull;
}
public bool IsOnDutyTimeNull()
{
return this.IsNull(this.tableDutyDetail.OnDutyTimeColumn);
}
public void SetOnDutyTimeNull()
{
this[this.tableDutyDetail.OnDutyTimeColumn] = System.Convert.DBNull;
}
public bool IsOffDutyTimeNull()
{
return this.IsNull(this.tableDutyDetail.OffDutyTimeColumn);
}
public void SetOffDutyTimeNull()
{
this[this.tableDutyDetail.OffDutyTimeColumn] = System.Convert.DBNull;
}
public bool IsOffDutyMemoNull()
{
return this.IsNull(this.tableDutyDetail.OffDutyMemoColumn);
}
public void SetOffDutyMemoNull()
{
this[this.tableDutyDetail.OffDutyMemoColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public partial class DutyDetailRowChangeEvent : EventArgs
{
private DutyDetailRow eventRow;
private DataRowAction eventAction;
public DutyDetailRowChangeEvent(DutyDetailRow row, DataRowAction action)
{
this.eventRow = row;
this.eventAction = action;
}
public DutyDetailRow Row
{
get
{
return this.eventRow;
}
}
public DataRowAction Action
{
get
{
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -