📄 popedomdataset.cs
字号:
public event popedomRowChangeEventHandler popedomRowChanged;
public event popedomRowChangeEventHandler popedomRowChanging;
public event popedomRowChangeEventHandler popedomRowDeleted;
public event popedomRowChangeEventHandler popedomRowDeleting;
public void AddpopedomRow(popedomRow row) {
this.Rows.Add(row);
}
public popedomRow AddpopedomRow(string 管理员帐号, string 所属部门, string 权限名称) {
popedomRow rowpopedomRow = ((popedomRow)(this.NewRow()));
rowpopedomRow.ItemArray = new object[] {
null,
管理员帐号,
所属部门,
权限名称};
this.Rows.Add(rowpopedomRow);
return rowpopedomRow;
}
public popedomRow FindBy权限序号(int 权限序号) {
return ((popedomRow)(this.Rows.Find(new object[] {
权限序号})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
popedomDataTable cln = ((popedomDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new popedomDataTable();
}
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;
this.column管理员帐号.AllowDBNull = false;
this.column权限名称.AllowDBNull = false;
}
public popedomRow NewpopedomRow() {
return ((popedomRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new popedomRow(builder);
}
protected override System.Type GetRowType() {
return typeof(popedomRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.popedomRowChanged != null)) {
this.popedomRowChanged(this, new popedomRowChangeEvent(((popedomRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.popedomRowChanging != null)) {
this.popedomRowChanging(this, new popedomRowChangeEvent(((popedomRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.popedomRowDeleted != null)) {
this.popedomRowDeleted(this, new popedomRowChangeEvent(((popedomRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.popedomRowDeleting != null)) {
this.popedomRowDeleting(this, new popedomRowChangeEvent(((popedomRow)(e.Row)), e.Action));
}
}
public void RemovepopedomRow(popedomRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class popedomRow : DataRow {
private popedomDataTable tablepopedom;
internal popedomRow(DataRowBuilder rb) :
base(rb) {
this.tablepopedom = ((popedomDataTable)(this.Table));
}
public int 权限序号 {
get {
return ((int)(this[this.tablepopedom.权限序号Column]));
}
set {
this[this.tablepopedom.权限序号Column] = value;
}
}
public string 管理员帐号 {
get {
return ((string)(this[this.tablepopedom.管理员帐号Column]));
}
set {
this[this.tablepopedom.管理员帐号Column] = value;
}
}
public string 所属部门 {
get {
try {
return ((string)(this[this.tablepopedom.所属部门Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablepopedom.所属部门Column] = value;
}
}
public string 权限名称 {
get {
return ((string)(this[this.tablepopedom.权限名称Column]));
}
set {
this[this.tablepopedom.权限名称Column] = value;
}
}
public bool Is所属部门Null() {
return this.IsNull(this.tablepopedom.所属部门Column);
}
public void Set所属部门Null() {
this[this.tablepopedom.所属部门Column] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class popedomRowChangeEvent : EventArgs {
private popedomRow eventRow;
private DataRowAction eventAction;
public popedomRowChangeEvent(popedomRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public popedomRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -