📄 publisherdataset.cs
字号:
country};
this.Rows.Add(rowpublishersRow);
return rowpublishersRow;
}
public publishersRow FindBypub_id(string pub_id) {
return ((publishersRow)(this.Rows.Find(new object[] {
pub_id})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
publishersDataTable cln = ((publishersDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new publishersDataTable();
}
internal void InitVars() {
this.columnpub_id = this.Columns["pub_id"];
this.columnpub_name = this.Columns["pub_name"];
this.columncity = this.Columns["city"];
this.columnstate = this.Columns["state"];
this.columncountry = this.Columns["country"];
}
private void InitClass() {
this.columnpub_id = new DataColumn("pub_id", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnpub_id);
this.columnpub_name = new DataColumn("pub_name", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnpub_name);
this.columncity = new DataColumn("city", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columncity);
this.columnstate = new DataColumn("state", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnstate);
this.columncountry = new DataColumn("country", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columncountry);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnpub_id}, true));
this.columnpub_id.AllowDBNull = false;
this.columnpub_id.Unique = true;
}
public publishersRow NewpublishersRow() {
return ((publishersRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new publishersRow(builder);
}
protected override System.Type GetRowType() {
return typeof(publishersRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.publishersRowChanged != null)) {
this.publishersRowChanged(this, new publishersRowChangeEvent(((publishersRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.publishersRowChanging != null)) {
this.publishersRowChanging(this, new publishersRowChangeEvent(((publishersRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.publishersRowDeleted != null)) {
this.publishersRowDeleted(this, new publishersRowChangeEvent(((publishersRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.publishersRowDeleting != null)) {
this.publishersRowDeleting(this, new publishersRowChangeEvent(((publishersRow)(e.Row)), e.Action));
}
}
public void RemovepublishersRow(publishersRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class publishersRow : DataRow {
private publishersDataTable tablepublishers;
internal publishersRow(DataRowBuilder rb) :
base(rb) {
this.tablepublishers = ((publishersDataTable)(this.Table));
}
public string pub_id {
get {
return ((string)(this[this.tablepublishers.pub_idColumn]));
}
set {
this[this.tablepublishers.pub_idColumn] = value;
}
}
public string pub_name {
get {
try {
return ((string)(this[this.tablepublishers.pub_nameColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tablepublishers.pub_nameColumn] = value;
}
}
public string city {
get {
try {
return ((string)(this[this.tablepublishers.cityColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tablepublishers.cityColumn] = value;
}
}
public string state {
get {
try {
return ((string)(this[this.tablepublishers.stateColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tablepublishers.stateColumn] = value;
}
}
public string country {
get {
try {
return ((string)(this[this.tablepublishers.countryColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tablepublishers.countryColumn] = value;
}
}
public bool Ispub_nameNull() {
return this.IsNull(this.tablepublishers.pub_nameColumn);
}
public void Setpub_nameNull() {
this[this.tablepublishers.pub_nameColumn] = System.Convert.DBNull;
}
public bool IscityNull() {
return this.IsNull(this.tablepublishers.cityColumn);
}
public void SetcityNull() {
this[this.tablepublishers.cityColumn] = System.Convert.DBNull;
}
public bool IsstateNull() {
return this.IsNull(this.tablepublishers.stateColumn);
}
public void SetstateNull() {
this[this.tablepublishers.stateColumn] = System.Convert.DBNull;
}
public bool IscountryNull() {
return this.IsNull(this.tablepublishers.countryColumn);
}
public void SetcountryNull() {
this[this.tablepublishers.countryColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class publishersRowChangeEvent : EventArgs {
private publishersRow eventRow;
private DataRowAction eventAction;
public publishersRowChangeEvent(publishersRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public publishersRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -