📄 userdata.cs
字号:
this.columnAccountID = this.Columns["AccountID"];
this.columnEmail = this.Columns["Email"];
this.columnUserType = this.Columns["UserType"];
this.columnCompanyID = this.Columns["CompanyID"];
this.columnAppDate = this.Columns["AppDate"];
this.columnStatus = this.Columns["Status"];
this.columnStatusChgDate = this.Columns["StatusChgDate"];
}
private void InitClass() {
this.columnUserID = new DataColumn("UserID", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnUserID);
this.columnPassword = new DataColumn("Password", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnPassword);
this.columnAccountID = new DataColumn("AccountID", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnAccountID);
this.columnEmail = new DataColumn("Email", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnEmail);
this.columnUserType = new DataColumn("UserType", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnUserType);
this.columnCompanyID = new DataColumn("CompanyID", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnCompanyID);
this.columnAppDate = new DataColumn("AppDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnAppDate);
this.columnStatus = new DataColumn("Status", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnStatus);
this.columnStatusChgDate = new DataColumn("StatusChgDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnStatusChgDate);
this.Constraints.Add(new UniqueConstraint("UserDataKey1", new DataColumn[] {
this.columnUserID}, true));
this.columnUserID.AllowDBNull = false;
this.columnUserID.Unique = true;
this.columnPassword.AllowDBNull = false;
this.columnAccountID.AllowDBNull = false;
this.columnEmail.AllowDBNull = false;
this.columnUserType.AllowDBNull = false;
this.columnAppDate.AllowDBNull = false;
this.columnStatus.AllowDBNull = false;
}
public UserBaseInfoRow NewUserBaseInfoRow() {
return ((UserBaseInfoRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new UserBaseInfoRow(builder);
}
protected override System.Type GetRowType() {
return typeof(UserBaseInfoRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.UserBaseInfoRowChanged != null)) {
this.UserBaseInfoRowChanged(this, new UserBaseInfoRowChangeEvent(((UserBaseInfoRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.UserBaseInfoRowChanging != null)) {
this.UserBaseInfoRowChanging(this, new UserBaseInfoRowChangeEvent(((UserBaseInfoRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.UserBaseInfoRowDeleted != null)) {
this.UserBaseInfoRowDeleted(this, new UserBaseInfoRowChangeEvent(((UserBaseInfoRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.UserBaseInfoRowDeleting != null)) {
this.UserBaseInfoRowDeleting(this, new UserBaseInfoRowChangeEvent(((UserBaseInfoRow)(e.Row)), e.Action));
}
}
public void RemoveUserBaseInfoRow(UserBaseInfoRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class UserBaseInfoRow : DataRow {
private UserBaseInfoDataTable tableUserBaseInfo;
internal UserBaseInfoRow(DataRowBuilder rb) :
base(rb) {
this.tableUserBaseInfo = ((UserBaseInfoDataTable)(this.Table));
}
public string UserID {
get {
return ((string)(this[this.tableUserBaseInfo.UserIDColumn]));
}
set {
this[this.tableUserBaseInfo.UserIDColumn] = value;
}
}
public string Password {
get {
return ((string)(this[this.tableUserBaseInfo.PasswordColumn]));
}
set {
this[this.tableUserBaseInfo.PasswordColumn] = value;
}
}
public string AccountID {
get {
return ((string)(this[this.tableUserBaseInfo.AccountIDColumn]));
}
set {
this[this.tableUserBaseInfo.AccountIDColumn] = value;
}
}
public string Email {
get {
return ((string)(this[this.tableUserBaseInfo.EmailColumn]));
}
set {
this[this.tableUserBaseInfo.EmailColumn] = value;
}
}
public string UserType {
get {
return ((string)(this[this.tableUserBaseInfo.UserTypeColumn]));
}
set {
this[this.tableUserBaseInfo.UserTypeColumn] = value;
}
}
public string CompanyID {
get {
try {
return ((string)(this[this.tableUserBaseInfo.CompanyIDColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableUserBaseInfo.CompanyIDColumn] = value;
}
}
public System.DateTime AppDate {
get {
return ((System.DateTime)(this[this.tableUserBaseInfo.AppDateColumn]));
}
set {
this[this.tableUserBaseInfo.AppDateColumn] = value;
}
}
public string Status {
get {
return ((string)(this[this.tableUserBaseInfo.StatusColumn]));
}
set {
this[this.tableUserBaseInfo.StatusColumn] = value;
}
}
public System.DateTime StatusChgDate {
get {
try {
return ((System.DateTime)(this[this.tableUserBaseInfo.StatusChgDateColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableUserBaseInfo.StatusChgDateColumn] = value;
}
}
public bool IsCompanyIDNull() {
return this.IsNull(this.tableUserBaseInfo.CompanyIDColumn);
}
public void SetCompanyIDNull() {
this[this.tableUserBaseInfo.CompanyIDColumn] = System.Convert.DBNull;
}
public bool IsStatusChgDateNull() {
return this.IsNull(this.tableUserBaseInfo.StatusChgDateColumn);
}
public void SetStatusChgDateNull() {
this[this.tableUserBaseInfo.StatusChgDateColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class UserBaseInfoRowChangeEvent : EventArgs {
private UserBaseInfoRow eventRow;
private DataRowAction eventAction;
public UserBaseInfoRowChangeEvent(UserBaseInfoRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public UserBaseInfoRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class UserAddInfoDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn columnUserID;
private DataColumn columnUserName;
private DataColumn columnSex;
private DataColumn columnBirthday;
private DataColumn columnRelation;
private DataColumn columnBookShelfID;
private DataColumn columnReamrk;
internal UserAddInfoDataTable() :
base("UserAddInfo") {
this.InitClass();
}
internal UserAddInfoDataTable(DataTable table) :
base(table.TableName) {
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
this.CaseSensitive = table.CaseSensitive;
}
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
this.Locale = table.Locale;
}
if ((table.Namespace != table.DataSet.Namespace)) {
this.Namespace = table.Namespace;
}
this.Prefix = table.Prefix;
this.MinimumCapacity = table.MinimumCapacity;
this.DisplayExpression = table.DisplayExpression;
}
[System.ComponentModel.Browsable(false)]
public int Count {
get {
return this.Rows.Count;
}
}
internal DataColumn UserIDColumn {
get {
return this.columnUserID;
}
}
internal DataColumn UserNameColumn {
get {
return this.columnUserName;
}
}
internal DataColumn SexColumn {
get {
return this.columnSex;
}
}
internal DataColumn BirthdayColumn {
get {
return this.columnBirthday;
}
}
internal DataColumn RelationColumn {
get {
return this.columnRelation;
}
}
internal DataColumn BookShelfIDColumn {
get {
return this.columnBookShelfID;
}
}
internal DataColumn ReamrkColumn {
get {
return this.columnReamrk;
}
}
public UserAddInfoRow this[int index] {
get {
return ((UserAddInfoRow)(this.Rows[index]));
}
}
public event UserAddInfoRowChangeEventHandler UserAddInfoRowChanged;
public event UserAddInfoRowChangeEventHandler UserAddInfoRowChanging;
public event UserAddInfoRowChangeEventHandler UserAddInfoRowDeleted;
public event UserAddInfoRowChangeEventHandler UserAddInfoRowDeleting;
public void AddUserAddInfoRow(UserAddInfoRow row) {
this.Rows.Add(row);
}
public UserAddInfoRow AddUserAddInfoRow(string UserID, string UserName, string Sex, System.DateTime Birthday, string Relation, string BookShelfID, string Reamrk) {
UserAddInfoRow rowUserAddInfoRow = ((UserAddInfoRow)(this.NewRow()));
rowUserAddInfoRow.ItemArray = new object[] {
UserID,
UserName,
Sex,
Birthday,
Relation,
BookShelfID,
Reamrk};
this.Rows.Add(rowUserAddInfoRow);
return rowUserAddInfoRow;
}
public UserAddInfoRow FindByUserID(string UserID) {
return ((UserAddInfoRow)(this.Rows.Find(new object[] {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -