📄 inboxdata.cs
字号:
public void AddInBoxRow(InBoxRow row) {
this.Rows.Add(row);
}
public InBoxRow AddInBoxRow(int SendUserId, int ReceiveUserId, System.DateTime ReceiveTime, int Status, int Type, string Message, string SendUserName) {
InBoxRow rowInBoxRow = ((InBoxRow)(this.NewRow()));
rowInBoxRow.ItemArray = new object[] {
null,
SendUserId,
ReceiveUserId,
ReceiveTime,
Status,
Type,
Message,
SendUserName};
this.Rows.Add(rowInBoxRow);
return rowInBoxRow;
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
InBoxDataTable cln = ((InBoxDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new InBoxDataTable();
}
internal void InitVars() {
this.columnReceiveId = this.Columns["ReceiveId"];
this.columnSendUserId = this.Columns["SendUserId"];
this.columnReceiveUserId = this.Columns["ReceiveUserId"];
this.columnReceiveTime = this.Columns["ReceiveTime"];
this.columnStatus = this.Columns["Status"];
this.columnType = this.Columns["Type"];
this.columnMessage = this.Columns["Message"];
this.columnSendUserName = this.Columns["SendUserName"];
}
private void InitClass() {
this.columnReceiveId = new DataColumn("ReceiveId", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnReceiveId);
this.columnSendUserId = new DataColumn("SendUserId", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnSendUserId);
this.columnReceiveUserId = new DataColumn("ReceiveUserId", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnReceiveUserId);
this.columnReceiveTime = new DataColumn("ReceiveTime", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnReceiveTime);
this.columnStatus = new DataColumn("Status", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnStatus);
this.columnType = new DataColumn("Type", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnType);
this.columnMessage = new DataColumn("Message", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnMessage);
this.columnSendUserName = new DataColumn("SendUserName", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnSendUserName);
this.columnReceiveId.AutoIncrement = true;
this.columnReceiveId.AllowDBNull = false;
this.columnReceiveId.ReadOnly = true;
this.columnSendUserId.AllowDBNull = false;
this.columnReceiveUserId.AllowDBNull = false;
this.columnReceiveTime.AllowDBNull = false;
this.columnStatus.AllowDBNull = false;
this.columnType.AllowDBNull = false;
this.columnMessage.AllowDBNull = false;
}
public InBoxRow NewInBoxRow() {
return ((InBoxRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new InBoxRow(builder);
}
protected override System.Type GetRowType() {
return typeof(InBoxRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.InBoxRowChanged != null)) {
this.InBoxRowChanged(this, new InBoxRowChangeEvent(((InBoxRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.InBoxRowChanging != null)) {
this.InBoxRowChanging(this, new InBoxRowChangeEvent(((InBoxRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.InBoxRowDeleted != null)) {
this.InBoxRowDeleted(this, new InBoxRowChangeEvent(((InBoxRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.InBoxRowDeleting != null)) {
this.InBoxRowDeleting(this, new InBoxRowChangeEvent(((InBoxRow)(e.Row)), e.Action));
}
}
public void RemoveInBoxRow(InBoxRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class InBoxRow : DataRow {
private InBoxDataTable tableInBox;
internal InBoxRow(DataRowBuilder rb) :
base(rb) {
this.tableInBox = ((InBoxDataTable)(this.Table));
}
public int ReceiveId {
get {
return ((int)(this[this.tableInBox.ReceiveIdColumn]));
}
set {
this[this.tableInBox.ReceiveIdColumn] = value;
}
}
public int SendUserId {
get {
return ((int)(this[this.tableInBox.SendUserIdColumn]));
}
set {
this[this.tableInBox.SendUserIdColumn] = value;
}
}
public int ReceiveUserId {
get {
return ((int)(this[this.tableInBox.ReceiveUserIdColumn]));
}
set {
this[this.tableInBox.ReceiveUserIdColumn] = value;
}
}
public System.DateTime ReceiveTime {
get {
return ((System.DateTime)(this[this.tableInBox.ReceiveTimeColumn]));
}
set {
this[this.tableInBox.ReceiveTimeColumn] = value;
}
}
public int Status {
get {
return ((int)(this[this.tableInBox.StatusColumn]));
}
set {
this[this.tableInBox.StatusColumn] = value;
}
}
public int Type {
get {
return ((int)(this[this.tableInBox.TypeColumn]));
}
set {
this[this.tableInBox.TypeColumn] = value;
}
}
public string Message {
get {
return ((string)(this[this.tableInBox.MessageColumn]));
}
set {
this[this.tableInBox.MessageColumn] = value;
}
}
public string SendUserName {
get {
try {
return ((string)(this[this.tableInBox.SendUserNameColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableInBox.SendUserNameColumn] = value;
}
}
public bool IsSendUserNameNull() {
return this.IsNull(this.tableInBox.SendUserNameColumn);
}
public void SetSendUserNameNull() {
this[this.tableInBox.SendUserNameColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class InBoxRowChangeEvent : EventArgs {
private InBoxRow eventRow;
private DataRowAction eventAction;
public InBoxRowChangeEvent(InBoxRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public InBoxRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -