uncomeset.cs
来自「独立完成考勤管理软件加打卡系统(C#) 是打卡加管理系统软件 」· CS 代码 · 共 427 行 · 第 1/2 页
CS
427 行
public Employee_UnComeRow AddEmployee_UnComeRow(string 日期, string 职工名称, string 状态) {
Employee_UnComeRow rowEmployee_UnComeRow = ((Employee_UnComeRow)(this.NewRow()));
rowEmployee_UnComeRow.ItemArray = new object[] {
null,
日期,
职工名称,
状态};
this.Rows.Add(rowEmployee_UnComeRow);
return rowEmployee_UnComeRow;
}
public Employee_UnComeRow FindBy编号(int 编号) {
return ((Employee_UnComeRow)(this.Rows.Find(new object[] {
编号})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
Employee_UnComeDataTable cln = ((Employee_UnComeDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new Employee_UnComeDataTable();
}
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 Employee_UnComeRow NewEmployee_UnComeRow() {
return ((Employee_UnComeRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new Employee_UnComeRow(builder);
}
protected override System.Type GetRowType() {
return typeof(Employee_UnComeRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.Employee_UnComeRowChanged != null)) {
this.Employee_UnComeRowChanged(this, new Employee_UnComeRowChangeEvent(((Employee_UnComeRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.Employee_UnComeRowChanging != null)) {
this.Employee_UnComeRowChanging(this, new Employee_UnComeRowChangeEvent(((Employee_UnComeRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.Employee_UnComeRowDeleted != null)) {
this.Employee_UnComeRowDeleted(this, new Employee_UnComeRowChangeEvent(((Employee_UnComeRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.Employee_UnComeRowDeleting != null)) {
this.Employee_UnComeRowDeleting(this, new Employee_UnComeRowChangeEvent(((Employee_UnComeRow)(e.Row)), e.Action));
}
}
public void RemoveEmployee_UnComeRow(Employee_UnComeRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class Employee_UnComeRow : DataRow {
private Employee_UnComeDataTable tableEmployee_UnCome;
internal Employee_UnComeRow(DataRowBuilder rb) :
base(rb) {
this.tableEmployee_UnCome = ((Employee_UnComeDataTable)(this.Table));
}
public int 编号 {
get {
return ((int)(this[this.tableEmployee_UnCome.编号Column]));
}
set {
this[this.tableEmployee_UnCome.编号Column] = value;
}
}
public string 日期 {
get {
try {
return ((string)(this[this.tableEmployee_UnCome.日期Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableEmployee_UnCome.日期Column] = value;
}
}
public string 职工名称 {
get {
try {
return ((string)(this[this.tableEmployee_UnCome.职工名称Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableEmployee_UnCome.职工名称Column] = value;
}
}
public string 状态 {
get {
try {
return ((string)(this[this.tableEmployee_UnCome.状态Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableEmployee_UnCome.状态Column] = value;
}
}
public bool Is日期Null() {
return this.IsNull(this.tableEmployee_UnCome.日期Column);
}
public void Set日期Null() {
this[this.tableEmployee_UnCome.日期Column] = System.Convert.DBNull;
}
public bool Is职工名称Null() {
return this.IsNull(this.tableEmployee_UnCome.职工名称Column);
}
public void Set职工名称Null() {
this[this.tableEmployee_UnCome.职工名称Column] = System.Convert.DBNull;
}
public bool Is状态Null() {
return this.IsNull(this.tableEmployee_UnCome.状态Column);
}
public void Set状态Null() {
this[this.tableEmployee_UnCome.状态Column] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class Employee_UnComeRowChangeEvent : EventArgs {
private Employee_UnComeRow eventRow;
private DataRowAction eventAction;
public Employee_UnComeRowChangeEvent(Employee_UnComeRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public Employee_UnComeRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?