?? datasetquery.cs
字號:
public string PublishPhoneNo {
get {
try {
return ((string)(this[this.tablePublishCompany.PublishPhoneNoColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("無法獲取值,因為它是 DBNull。", e);
}
}
set {
this[this.tablePublishCompany.PublishPhoneNoColumn] = value;
}
}
public string PbulishEmail {
get {
try {
return ((string)(this[this.tablePublishCompany.PbulishEmailColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("無法獲取值,因為它是 DBNull。", e);
}
}
set {
this[this.tablePublishCompany.PbulishEmailColumn] = value;
}
}
public bool IsPublishAddressNull() {
return this.IsNull(this.tablePublishCompany.PublishAddressColumn);
}
public void SetPublishAddressNull() {
this[this.tablePublishCompany.PublishAddressColumn] = System.Convert.DBNull;
}
public bool IsPublishPhoneNoNull() {
return this.IsNull(this.tablePublishCompany.PublishPhoneNoColumn);
}
public void SetPublishPhoneNoNull() {
this[this.tablePublishCompany.PublishPhoneNoColumn] = System.Convert.DBNull;
}
public bool IsPbulishEmailNull() {
return this.IsNull(this.tablePublishCompany.PbulishEmailColumn);
}
public void SetPbulishEmailNull() {
this[this.tablePublishCompany.PbulishEmailColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class PublishCompanyRowChangeEvent : EventArgs {
private PublishCompanyRow eventRow;
private DataRowAction eventAction;
public PublishCompanyRowChangeEvent(PublishCompanyRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public PublishCompanyRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class ReaderDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn columnReaderID;
private DataColumn columnReaderName;
private DataColumn columnReaderPassword;
private DataColumn columnReaderPhoneNo;
private DataColumn columnReaderEmail;
private DataColumn columnReaderBorrowedbooks;
internal ReaderDataTable() :
base("Reader") {
this.InitClass();
}
internal ReaderDataTable(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 ReaderIDColumn {
get {
return this.columnReaderID;
}
}
internal DataColumn ReaderNameColumn {
get {
return this.columnReaderName;
}
}
internal DataColumn ReaderPasswordColumn {
get {
return this.columnReaderPassword;
}
}
internal DataColumn ReaderPhoneNoColumn {
get {
return this.columnReaderPhoneNo;
}
}
internal DataColumn ReaderEmailColumn {
get {
return this.columnReaderEmail;
}
}
internal DataColumn ReaderBorrowedbooksColumn {
get {
return this.columnReaderBorrowedbooks;
}
}
public ReaderRow this[int index] {
get {
return ((ReaderRow)(this.Rows[index]));
}
}
public event ReaderRowChangeEventHandler ReaderRowChanged;
public event ReaderRowChangeEventHandler ReaderRowChanging;
public event ReaderRowChangeEventHandler ReaderRowDeleted;
public event ReaderRowChangeEventHandler ReaderRowDeleting;
public void AddReaderRow(ReaderRow row) {
this.Rows.Add(row);
}
public ReaderRow AddReaderRow(string ReaderID, string ReaderName, string ReaderPassword, string ReaderPhoneNo, string ReaderEmail, int ReaderBorrowedbooks) {
ReaderRow rowReaderRow = ((ReaderRow)(this.NewRow()));
rowReaderRow.ItemArray = new object[] {
ReaderID,
ReaderName,
ReaderPassword,
ReaderPhoneNo,
ReaderEmail,
ReaderBorrowedbooks};
this.Rows.Add(rowReaderRow);
return rowReaderRow;
}
public ReaderRow FindByReaderID(string ReaderID) {
return ((ReaderRow)(this.Rows.Find(new object[] {
ReaderID})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
ReaderDataTable cln = ((ReaderDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new ReaderDataTable();
}
internal void InitVars() {
this.columnReaderID = this.Columns["ReaderID"];
this.columnReaderName = this.Columns["ReaderName"];
this.columnReaderPassword = this.Columns["ReaderPassword"];
this.columnReaderPhoneNo = this.Columns["ReaderPhoneNo"];
this.columnReaderEmail = this.Columns["ReaderEmail"];
this.columnReaderBorrowedbooks = this.Columns["ReaderBorrowedbooks"];
}
private void InitClass() {
this.columnReaderID = new DataColumn("ReaderID", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnReaderID);
this.columnReaderName = new DataColumn("ReaderName", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnReaderName);
this.columnReaderPassword = new DataColumn("ReaderPassword", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnReaderPassword);
this.columnReaderPhoneNo = new DataColumn("ReaderPhoneNo", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnReaderPhoneNo);
this.columnReaderEmail = new DataColumn("ReaderEmail", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnReaderEmail);
this.columnReaderBorrowedbooks = new DataColumn("ReaderBorrowedbooks", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnReaderBorrowedbooks);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnReaderID}, true));
this.columnReaderID.AllowDBNull = false;
this.columnReaderID.Unique = true;
}
public ReaderRow NewReaderRow() {
return ((ReaderRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new ReaderRow(builder);
}
protected override System.Type GetRowType() {
return typeof(ReaderRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.ReaderRowChanged != null)) {
this.ReaderRowChanged(this, new ReaderRowChangeEvent(((ReaderRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.ReaderRowChanging != null)) {
this.ReaderRowChanging(this, new ReaderRowChangeEvent(((ReaderRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.ReaderRowDeleted != null)) {
this.ReaderRowDeleted(this, new ReaderRowChangeEvent(((ReaderRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.ReaderRowDeleting != null)) {
this.ReaderRowDeleting(this, new ReaderRowChangeEvent(((ReaderRow)(e.Row)), e.Action));
}
}
public void RemoveReaderRow(ReaderRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class ReaderRow : DataRow {
private ReaderDataTable tableReader;
internal ReaderRow(DataRowBuilder rb) :
base(rb) {
this.tableReader = ((ReaderDataTable)(this.Table));
}
public string ReaderID {
get {
return ((string)(this[this.tableReader.ReaderIDColumn]));
}
set {
this[this.tableReader.ReaderIDColumn] = value;
}
}
public string ReaderName {
get {
try {
return ((string)(this[this.tableReader.ReaderNameColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("無法獲取值,因為它是 DBNull。", e);
}
}
set {
this[this.tableReader.ReaderNameColumn] = value;
}
}
public string ReaderPassword {
get {
try {
return ((string)(this[this.tableReader.ReaderPasswordColumn]));
}
catch (InvalidCastException e) {
thr
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -