📄 emp_timetableset.cs
字号:
public Emp_TimeRow AddEmp_TimeRow(string 职工名称, string 日期, string 时间) {
Emp_TimeRow rowEmp_TimeRow = ((Emp_TimeRow)(this.NewRow()));
rowEmp_TimeRow.ItemArray = new object[] {
null,
职工名称,
日期,
时间};
this.Rows.Add(rowEmp_TimeRow);
return rowEmp_TimeRow;
}
public Emp_TimeRow FindBy编号(int 编号) {
return ((Emp_TimeRow)(this.Rows.Find(new object[] {
编号})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
Emp_TimeDataTable cln = ((Emp_TimeDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new Emp_TimeDataTable();
}
internal void InitVars() {
this.column编号 = this.Columns["编号"];
this.column职工名称 = this.Columns["职工名称"];
this.column日期 = this.Columns["日期"];
this.column时间 = this.Columns["时间"];
}
private void InitClass() {
this.column编号 = new DataColumn("编号", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.column编号);
this.column职工名称 = new DataColumn("职工名称", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column职工名称);
this.column日期 = new DataColumn("日期", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column日期);
this.column时间 = new DataColumn("时间", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column时间);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.column编号}, true));
this.column编号.AutoIncrement = true;
this.column编号.AllowDBNull = false;
this.column编号.ReadOnly = true;
this.column编号.Unique = true;
}
public Emp_TimeRow NewEmp_TimeRow() {
return ((Emp_TimeRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new Emp_TimeRow(builder);
}
protected override System.Type GetRowType() {
return typeof(Emp_TimeRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.Emp_TimeRowChanged != null)) {
this.Emp_TimeRowChanged(this, new Emp_TimeRowChangeEvent(((Emp_TimeRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.Emp_TimeRowChanging != null)) {
this.Emp_TimeRowChanging(this, new Emp_TimeRowChangeEvent(((Emp_TimeRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.Emp_TimeRowDeleted != null)) {
this.Emp_TimeRowDeleted(this, new Emp_TimeRowChangeEvent(((Emp_TimeRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.Emp_TimeRowDeleting != null)) {
this.Emp_TimeRowDeleting(this, new Emp_TimeRowChangeEvent(((Emp_TimeRow)(e.Row)), e.Action));
}
}
public void RemoveEmp_TimeRow(Emp_TimeRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class Emp_TimeRow : DataRow {
private Emp_TimeDataTable tableEmp_Time;
internal Emp_TimeRow(DataRowBuilder rb) :
base(rb) {
this.tableEmp_Time = ((Emp_TimeDataTable)(this.Table));
}
public int 编号 {
get {
return ((int)(this[this.tableEmp_Time.编号Column]));
}
set {
this[this.tableEmp_Time.编号Column] = value;
}
}
public string 职工名称 {
get {
try {
return ((string)(this[this.tableEmp_Time.职工名称Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableEmp_Time.职工名称Column] = value;
}
}
public string 日期 {
get {
try {
return ((string)(this[this.tableEmp_Time.日期Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableEmp_Time.日期Column] = value;
}
}
public string 时间 {
get {
try {
return ((string)(this[this.tableEmp_Time.时间Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableEmp_Time.时间Column] = value;
}
}
public bool Is职工名称Null() {
return this.IsNull(this.tableEmp_Time.职工名称Column);
}
public void Set职工名称Null() {
this[this.tableEmp_Time.职工名称Column] = System.Convert.DBNull;
}
public bool Is日期Null() {
return this.IsNull(this.tableEmp_Time.日期Column);
}
public void Set日期Null() {
this[this.tableEmp_Time.日期Column] = System.Convert.DBNull;
}
public bool Is时间Null() {
return this.IsNull(this.tableEmp_Time.时间Column);
}
public void Set时间Null() {
this[this.tableEmp_Time.时间Column] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class Emp_TimeRowChangeEvent : EventArgs {
private Emp_TimeRow eventRow;
private DataRowAction eventAction;
public Emp_TimeRowChangeEvent(Emp_TimeRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public Emp_TimeRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -