📄 datasetpublishing.cs
字号:
}
public PublishCompanyRow AddPublishCompanyRow(string PublishName, string PublishAddress, string PublishPhoneNo, string PbulishEmail) {
PublishCompanyRow rowPublishCompanyRow = ((PublishCompanyRow)(this.NewRow()));
rowPublishCompanyRow.ItemArray = new object[] {
PublishName,
PublishAddress,
PublishPhoneNo,
PbulishEmail};
this.Rows.Add(rowPublishCompanyRow);
return rowPublishCompanyRow;
}
public PublishCompanyRow FindByPublishName(string PublishName) {
return ((PublishCompanyRow)(this.Rows.Find(new object[] {
PublishName})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
PublishCompanyDataTable cln = ((PublishCompanyDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new PublishCompanyDataTable();
}
internal void InitVars() {
this.columnPublishName = this.Columns["PublishName"];
this.columnPublishAddress = this.Columns["PublishAddress"];
this.columnPublishPhoneNo = this.Columns["PublishPhoneNo"];
this.columnPbulishEmail = this.Columns["PbulishEmail"];
}
private void InitClass() {
this.columnPublishName = new DataColumn("PublishName", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnPublishName);
this.columnPublishAddress = new DataColumn("PublishAddress", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnPublishAddress);
this.columnPublishPhoneNo = new DataColumn("PublishPhoneNo", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnPublishPhoneNo);
this.columnPbulishEmail = new DataColumn("PbulishEmail", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnPbulishEmail);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnPublishName}, true));
this.columnPublishName.AllowDBNull = false;
this.columnPublishName.Unique = true;
}
public PublishCompanyRow NewPublishCompanyRow() {
return ((PublishCompanyRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new PublishCompanyRow(builder);
}
protected override System.Type GetRowType() {
return typeof(PublishCompanyRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.PublishCompanyRowChanged != null)) {
this.PublishCompanyRowChanged(this, new PublishCompanyRowChangeEvent(((PublishCompanyRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.PublishCompanyRowChanging != null)) {
this.PublishCompanyRowChanging(this, new PublishCompanyRowChangeEvent(((PublishCompanyRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.PublishCompanyRowDeleted != null)) {
this.PublishCompanyRowDeleted(this, new PublishCompanyRowChangeEvent(((PublishCompanyRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.PublishCompanyRowDeleting != null)) {
this.PublishCompanyRowDeleting(this, new PublishCompanyRowChangeEvent(((PublishCompanyRow)(e.Row)), e.Action));
}
}
public void RemovePublishCompanyRow(PublishCompanyRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class PublishCompanyRow : DataRow {
private PublishCompanyDataTable tablePublishCompany;
internal PublishCompanyRow(DataRowBuilder rb) :
base(rb) {
this.tablePublishCompany = ((PublishCompanyDataTable)(this.Table));
}
public string PublishName {
get {
return ((string)(this[this.tablePublishCompany.PublishNameColumn]));
}
set {
this[this.tablePublishCompany.PublishNameColumn] = value;
}
}
public string PublishAddress {
get {
try {
return ((string)(this[this.tablePublishCompany.PublishAddressColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablePublishCompany.PublishAddressColumn] = value;
}
}
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;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -