dataset1.cs
字号:
}
public userInfoRow AdduserInfoRow(string email, string name, string password, System.DateTime regDay) {
userInfoRow rowuserInfoRow = ((userInfoRow)(this.NewRow()));
rowuserInfoRow.ItemArray = new object[] {
email,
name,
password,
regDay};
this.Rows.Add(rowuserInfoRow);
return rowuserInfoRow;
}
public userInfoRow FindByname(string name) {
return ((userInfoRow)(this.Rows.Find(new object[] {
name})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
userInfoDataTable cln = ((userInfoDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new userInfoDataTable();
}
internal void InitVars() {
this.columnemail = this.Columns["email"];
this.columnname = this.Columns["name"];
this.columnpassword = this.Columns["password"];
this.columnregDay = this.Columns["regDay"];
}
private void InitClass() {
this.columnemail = new DataColumn("email", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnemail);
this.columnname = new DataColumn("name", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnname);
this.columnpassword = new DataColumn("password", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnpassword);
this.columnregDay = new DataColumn("regDay", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnregDay);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnname}, true));
this.columnname.AllowDBNull = false;
this.columnname.Unique = true;
}
public userInfoRow NewuserInfoRow() {
return ((userInfoRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new userInfoRow(builder);
}
protected override System.Type GetRowType() {
return typeof(userInfoRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.userInfoRowChanged != null)) {
this.userInfoRowChanged(this, new userInfoRowChangeEvent(((userInfoRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.userInfoRowChanging != null)) {
this.userInfoRowChanging(this, new userInfoRowChangeEvent(((userInfoRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.userInfoRowDeleted != null)) {
this.userInfoRowDeleted(this, new userInfoRowChangeEvent(((userInfoRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.userInfoRowDeleting != null)) {
this.userInfoRowDeleting(this, new userInfoRowChangeEvent(((userInfoRow)(e.Row)), e.Action));
}
}
public void RemoveuserInfoRow(userInfoRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class userInfoRow : DataRow {
private userInfoDataTable tableuserInfo;
internal userInfoRow(DataRowBuilder rb) :
base(rb) {
this.tableuserInfo = ((userInfoDataTable)(this.Table));
}
public string email {
get {
try {
return ((string)(this[this.tableuserInfo.emailColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableuserInfo.emailColumn] = value;
}
}
public string name {
get {
return ((string)(this[this.tableuserInfo.nameColumn]));
}
set {
this[this.tableuserInfo.nameColumn] = value;
}
}
public string password {
get {
try {
return ((string)(this[this.tableuserInfo.passwordColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableuserInfo.passwordColumn] = value;
}
}
public System.DateTime regDay {
get {
try {
return ((System.DateTime)(this[this.tableuserInfo.regDayColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableuserInfo.regDayColumn] = value;
}
}
public bool IsemailNull() {
return this.IsNull(this.tableuserInfo.emailColumn);
}
public void SetemailNull() {
this[this.tableuserInfo.emailColumn] = System.Convert.DBNull;
}
public bool IspasswordNull() {
return this.IsNull(this.tableuserInfo.passwordColumn);
}
public void SetpasswordNull() {
this[this.tableuserInfo.passwordColumn] = System.Convert.DBNull;
}
public bool IsregDayNull() {
return this.IsNull(this.tableuserInfo.regDayColumn);
}
public void SetregDayNull() {
this[this.tableuserInfo.regDayColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class userInfoRowChangeEvent : EventArgs {
private userInfoRow eventRow;
private DataRowAction eventAction;
public userInfoRowChangeEvent(userInfoRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public userInfoRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -