📄 dataset1.cs
字号:
public bool IsFaxNull() {
return this.IsNull(this.tableCustomers.FaxColumn);
}
public void SetFaxNull() {
this[this.tableCustomers.FaxColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class CustomersRowChangeEvent : EventArgs {
private CustomersRow eventRow;
private DataRowAction eventAction;
public CustomersRowChangeEvent(CustomersRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public CustomersRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class EmployeesDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn columnEmployeeID;
private DataColumn columnLastName;
private DataColumn columnFirstName;
private DataColumn columnTitle;
private DataColumn columnTitleOfCourtesy;
private DataColumn columnBirthDate;
private DataColumn columnHireDate;
private DataColumn columnAddress;
private DataColumn columnCity;
private DataColumn columnRegion;
private DataColumn columnPostalCode;
private DataColumn columnCountry;
private DataColumn columnHomePhone;
private DataColumn columnExtension;
private DataColumn columnPhoto;
private DataColumn columnNotes;
private DataColumn columnReportsTo;
private DataColumn columnPhotoPath;
internal EmployeesDataTable() :
base("Employees") {
this.InitClass();
}
internal EmployeesDataTable(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 EmployeeIDColumn {
get {
return this.columnEmployeeID;
}
}
internal DataColumn LastNameColumn {
get {
return this.columnLastName;
}
}
internal DataColumn FirstNameColumn {
get {
return this.columnFirstName;
}
}
internal DataColumn TitleColumn {
get {
return this.columnTitle;
}
}
internal DataColumn TitleOfCourtesyColumn {
get {
return this.columnTitleOfCourtesy;
}
}
internal DataColumn BirthDateColumn {
get {
return this.columnBirthDate;
}
}
internal DataColumn HireDateColumn {
get {
return this.columnHireDate;
}
}
internal DataColumn AddressColumn {
get {
return this.columnAddress;
}
}
internal DataColumn CityColumn {
get {
return this.columnCity;
}
}
internal DataColumn RegionColumn {
get {
return this.columnRegion;
}
}
internal DataColumn PostalCodeColumn {
get {
return this.columnPostalCode;
}
}
internal DataColumn CountryColumn {
get {
return this.columnCountry;
}
}
internal DataColumn HomePhoneColumn {
get {
return this.columnHomePhone;
}
}
internal DataColumn ExtensionColumn {
get {
return this.columnExtension;
}
}
internal DataColumn PhotoColumn {
get {
return this.columnPhoto;
}
}
internal DataColumn NotesColumn {
get {
return this.columnNotes;
}
}
internal DataColumn ReportsToColumn {
get {
return this.columnReportsTo;
}
}
internal DataColumn PhotoPathColumn {
get {
return this.columnPhotoPath;
}
}
public EmployeesRow this[int index] {
get {
return ((EmployeesRow)(this.Rows[index]));
}
}
public event EmployeesRowChangeEventHandler EmployeesRowChanged;
public event EmployeesRowChangeEventHandler EmployeesRowChanging;
public event EmployeesRowChangeEventHandler EmployeesRowDeleted;
public event EmployeesRowChangeEventHandler EmployeesRowDeleting;
public void AddEmployeesRow(EmployeesRow row) {
this.Rows.Add(row);
}
public EmployeesRow AddEmployeesRow(
string LastName,
string FirstName,
string Title,
string TitleOfCourtesy,
System.DateTime BirthDate,
System.DateTime HireDate,
string Address,
string City,
string Region,
string PostalCode,
string Country,
string HomePhone,
string Extension,
System.Byte[] Photo,
string Notes,
int ReportsTo,
string PhotoPath) {
EmployeesRow rowEmployeesRow = ((EmployeesRow)(this.NewRow()));
rowEmployeesRow.ItemArray = new object[] {
null,
LastName,
FirstName,
Title,
TitleOfCourtesy,
BirthDate,
HireDate,
Address,
City,
Region,
PostalCode,
Country,
HomePhone,
Extension,
Photo,
Notes,
ReportsTo,
PhotoPath};
this.Rows.Add(rowEmployeesRow);
return rowEmployeesRow;
}
public EmployeesRow FindByEmployeeID(int EmployeeID) {
return ((EmployeesRow)(this.Rows.Find(new object[] {
EmployeeID})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
EmployeesDataTable cln = ((EmployeesDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new EmployeesDataTable();
}
internal void InitVars() {
this.columnEmployeeID = this.Columns["EmployeeID"];
this.columnLastName = this.Columns["LastName"];
this.columnFirstName = this.Columns["FirstName"];
this.columnTitle = this.Columns["Title"];
this.columnTitleOfCourtesy = this.Columns["TitleOfCourtesy"];
this.columnBirthDate = this.Columns["BirthDate"];
this.columnHireDate = this.Columns["HireDate"];
this.columnAddress = this.Columns["Address"];
this.columnCity = this.Columns["City"];
this.columnRegion = this.Columns["Region"];
this.columnPostalCode = this.Columns["PostalCode"];
this.columnCountry = this.Columns["Country"];
this.columnHomePhone = this.Columns["HomePhone"];
this.columnExtension = this.Columns["Extension"];
this.columnPhoto = this.Columns["Photo"];
this.columnNotes = this.Columns["Notes"];
this.columnReportsTo = this.Columns["ReportsTo"];
this.columnPhotoPath = this.Columns["PhotoPath"];
}
private void InitClass() {
this.columnEmployeeID = new DataColumn("EmployeeID", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnEmployeeID);
this.columnLastName = new DataColumn("LastName", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnLastName);
this.columnFirstName = new DataColumn("FirstName", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnFirstName);
this.columnTitle = new DataColumn("Title", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnTitle);
this.columnTitleOfCourtesy = new DataColumn("TitleOfCourtesy", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnTitleOfCourtesy);
this.columnBirthDate = new DataColumn("BirthDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBirthDate);
this.columnHireDate = new DataColumn("HireDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnHireDate);
this.columnAddress = new DataColumn("Address", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnAddress);
this.columnCity = new DataColumn("City", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnCity);
this.columnRegion = new DataColumn("Region", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnRegion);
this.columnPostalCode = new DataColumn("PostalCode", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnPostalCode);
this.columnCountry = new DataColumn("Country", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnCountry);
this.columnHomePhone = new DataColumn("HomePhone", typeof(string), null, System.Data.MappingType.Element);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -