📄 dataset1.cs
字号:
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class studentRow : DataRow {
private studentDataTable tablestudent;
internal studentRow(DataRowBuilder rb) :
base(rb) {
this.tablestudent = ((studentDataTable)(this.Table));
}
public string 学号 {
get {
return ((string)(this[this.tablestudent.学号Column]));
}
set {
this[this.tablestudent.学号Column] = value;
}
}
public string 姓名 {
get {
return ((string)(this[this.tablestudent.姓名Column]));
}
set {
this[this.tablestudent.姓名Column] = value;
}
}
public string 专业名 {
get {
return ((string)(this[this.tablestudent.专业名Column]));
}
set {
this[this.tablestudent.专业名Column] = value;
}
}
public bool 性别 {
get {
return ((bool)(this[this.tablestudent.性别Column]));
}
set {
this[this.tablestudent.性别Column] = value;
}
}
public System.DateTime 出生时间 {
get {
return ((System.DateTime)(this[this.tablestudent.出生时间Column]));
}
set {
this[this.tablestudent.出生时间Column] = value;
}
}
public System.Byte 总学分 {
get {
try {
return ((System.Byte)(this[this.tablestudent.总学分Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablestudent.总学分Column] = value;
}
}
public string 备注 {
get {
try {
return ((string)(this[this.tablestudent.备注Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablestudent.备注Column] = value;
}
}
public bool Is总学分Null() {
return this.IsNull(this.tablestudent.总学分Column);
}
public void Set总学分Null() {
this[this.tablestudent.总学分Column] = System.Convert.DBNull;
}
public bool Is备注Null() {
return this.IsNull(this.tablestudent.备注Column);
}
public void Set备注Null() {
this[this.tablestudent.备注Column] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class studentRowChangeEvent : EventArgs {
private studentRow eventRow;
private DataRowAction eventAction;
public studentRowChangeEvent(studentRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public studentRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class stu_inforDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn column学号;
private DataColumn column课程号;
private DataColumn column成绩;
internal stu_inforDataTable() :
base("stu_infor") {
this.InitClass();
}
internal stu_inforDataTable(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 学号Column {
get {
return this.column学号;
}
}
internal DataColumn 课程号Column {
get {
return this.column课程号;
}
}
internal DataColumn 成绩Column {
get {
return this.column成绩;
}
}
public stu_inforRow this[int index] {
get {
return ((stu_inforRow)(this.Rows[index]));
}
}
public event stu_inforRowChangeEventHandler stu_inforRowChanged;
public event stu_inforRowChangeEventHandler stu_inforRowChanging;
public event stu_inforRowChangeEventHandler stu_inforRowDeleted;
public event stu_inforRowChangeEventHandler stu_inforRowDeleting;
public void Addstu_inforRow(stu_inforRow row) {
this.Rows.Add(row);
}
public stu_inforRow Addstu_inforRow(string 学号, string 课程号, System.Byte 成绩) {
stu_inforRow rowstu_inforRow = ((stu_inforRow)(this.NewRow()));
rowstu_inforRow.ItemArray = new object[] {
学号,
课程号,
成绩};
this.Rows.Add(rowstu_inforRow);
return rowstu_inforRow;
}
public stu_inforRow FindBy学号课程号(string 学号, string 课程号) {
return ((stu_inforRow)(this.Rows.Find(new object[] {
学号,
课程号})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
stu_inforDataTable cln = ((stu_inforDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new stu_inforDataTable();
}
internal void InitVars() {
this.column学号 = this.Columns["学号"];
this.column课程号 = this.Columns["课程号"];
this.column成绩 = this.Columns["成绩"];
}
private void InitClass() {
this.column学号 = new DataColumn("学号", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column学号);
this.column课程号 = new DataColumn("课程号", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column课程号);
this.column成绩 = new DataColumn("成绩", typeof(System.Byte), null, System.Data.MappingType.Element);
this.Columns.Add(this.column成绩);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.column学号,
this.column课程号}, true));
this.column学号.AllowDBNull = false;
this.column课程号.AllowDBNull = false;
}
public stu_inforRow Newstu_inforRow() {
return ((stu_inforRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new stu_inforRow(builder);
}
protected override System.Type GetRowType() {
return typeof(stu_inforRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.stu_inforRowChanged != null)) {
this.stu_inforRowChanged(this, new stu_inforRowChangeEvent(((stu_inforRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.stu_inforRowChanging != null)) {
this.stu_inforRowChanging(this, new stu_inforRowChangeEvent(((stu_inforRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.stu_inforRowDeleted != null)) {
this.stu_inforRowDeleted(this, new stu_inforRowChangeEvent(((stu_inforRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.stu_inforRowDeleting != null)) {
this.stu_inforRowDeleting(this, new stu_inforRowChangeEvent(((stu_inforRow)(e.Row)), e.Action));
}
}
public void Removestu_inforRow(stu_inforRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class stu_inforRow : DataRow {
private stu_inforDataTable tablestu_infor;
internal stu_inforRow(DataRowBuilder rb) :
base(rb) {
this.tablestu_infor = ((stu_inforDataTable)(this.Table));
}
public string 学号 {
get {
return ((string)(this[this.tablestu_infor.学号Column]));
}
set {
this[this.tablestu_infor.学号Column] = value;
}
}
public string 课程号 {
get {
return ((string)(this[this.tablestu_infor.课程号Column]));
}
set {
this[this.tablestu_infor.课程号Column] = value;
}
}
public System.Byte 成绩 {
get {
try {
return ((System.Byte)(this[this.tablestu_infor.成绩Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablestu_infor.成绩Column] = value;
}
}
public bool Is成绩Null() {
return this.IsNull(this.tablestu_infor.成绩Column);
}
public void Set成绩Null() {
this[this.tablestu_infor.成绩Column] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class stu_inforRowChangeEvent : EventArgs {
private stu_inforRow eventRow;
private DataRowAction eventAction;
public stu_inforRowChangeEvent(stu_inforRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public stu_inforRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -