📄 employeedata.cs
字号:
Employee_viewDataTable cln = ((Employee_viewDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new Employee_viewDataTable();
}
internal void InitVars() {
this.columneid = this.Columns["eid"];
this.columnename = this.Columns["ename"];
this.columnechar = this.Columns["echar"];
this.columnesex = this.Columns["esex"];
this.columneage = this.Columns["eage"];
this.columntype = this.Columns["type"];
this.columngrade = this.Columns["grade"];
this.columnecardid = this.Columns["ecardid"];
this.columnejoin = this.Columns["ejoin"];
}
private void InitClass() {
this.columneid = new DataColumn("eid", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columneid);
this.columnename = new DataColumn("ename", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnename);
this.columnechar = new DataColumn("echar", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnechar);
this.columnesex = new DataColumn("esex", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnesex);
this.columneage = new DataColumn("eage", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columneage);
this.columntype = new DataColumn("type", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columntype);
this.columngrade = new DataColumn("grade", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columngrade);
this.columnecardid = new DataColumn("ecardid", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnecardid);
this.columnejoin = new DataColumn("ejoin", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnejoin);
this.columneid.AllowDBNull = false;
this.columnename.AllowDBNull = false;
this.columnechar.AllowDBNull = false;
this.columneage.AllowDBNull = false;
}
public Employee_viewRow NewEmployee_viewRow() {
return ((Employee_viewRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new Employee_viewRow(builder);
}
protected override System.Type GetRowType() {
return typeof(Employee_viewRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.Employee_viewRowChanged != null)) {
this.Employee_viewRowChanged(this, new Employee_viewRowChangeEvent(((Employee_viewRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.Employee_viewRowChanging != null)) {
this.Employee_viewRowChanging(this, new Employee_viewRowChangeEvent(((Employee_viewRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.Employee_viewRowDeleted != null)) {
this.Employee_viewRowDeleted(this, new Employee_viewRowChangeEvent(((Employee_viewRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.Employee_viewRowDeleting != null)) {
this.Employee_viewRowDeleting(this, new Employee_viewRowChangeEvent(((Employee_viewRow)(e.Row)), e.Action));
}
}
public void RemoveEmployee_viewRow(Employee_viewRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class Employee_viewRow : DataRow {
private Employee_viewDataTable tableEmployee_view;
internal Employee_viewRow(DataRowBuilder rb) :
base(rb) {
this.tableEmployee_view = ((Employee_viewDataTable)(this.Table));
}
public int eid {
get {
return ((int)(this[this.tableEmployee_view.eidColumn]));
}
set {
this[this.tableEmployee_view.eidColumn] = value;
}
}
public string ename {
get {
return ((string)(this[this.tableEmployee_view.enameColumn]));
}
set {
this[this.tableEmployee_view.enameColumn] = value;
}
}
public string echar {
get {
return ((string)(this[this.tableEmployee_view.echarColumn]));
}
set {
this[this.tableEmployee_view.echarColumn] = value;
}
}
public string esex {
get {
try {
return ((string)(this[this.tableEmployee_view.esexColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableEmployee_view.esexColumn] = value;
}
}
public int eage {
get {
return ((int)(this[this.tableEmployee_view.eageColumn]));
}
set {
this[this.tableEmployee_view.eageColumn] = value;
}
}
public string type {
get {
try {
return ((string)(this[this.tableEmployee_view.typeColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableEmployee_view.typeColumn] = value;
}
}
public string grade {
get {
try {
return ((string)(this[this.tableEmployee_view.gradeColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableEmployee_view.gradeColumn] = value;
}
}
public int ecardid {
get {
try {
return ((int)(this[this.tableEmployee_view.ecardidColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableEmployee_view.ecardidColumn] = value;
}
}
public string ejoin {
get {
try {
return ((string)(this[this.tableEmployee_view.ejoinColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableEmployee_view.ejoinColumn] = value;
}
}
public bool IsesexNull() {
return this.IsNull(this.tableEmployee_view.esexColumn);
}
public void SetesexNull() {
this[this.tableEmployee_view.esexColumn] = System.Convert.DBNull;
}
public bool IstypeNull() {
return this.IsNull(this.tableEmployee_view.typeColumn);
}
public void SettypeNull() {
this[this.tableEmployee_view.typeColumn] = System.Convert.DBNull;
}
public bool IsgradeNull() {
return this.IsNull(this.tableEmployee_view.gradeColumn);
}
public void SetgradeNull() {
this[this.tableEmployee_view.gradeColumn] = System.Convert.DBNull;
}
public bool IsecardidNull() {
return this.IsNull(this.tableEmployee_view.ecardidColumn);
}
public void SetecardidNull() {
this[this.tableEmployee_view.ecardidColumn] = System.Convert.DBNull;
}
public bool IsejoinNull() {
return this.IsNull(this.tableEmployee_view.ejoinColumn);
}
public void SetejoinNull() {
this[this.tableEmployee_view.ejoinColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class Employee_viewRowChangeEvent : EventArgs {
private Employee_viewRow eventRow;
private DataRowAction eventAction;
public Employee_viewRowChangeEvent(Employee_viewRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public Employee_viewRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -