DataSet1.cs
上传用户:miknos
上传日期:2022-04-30
资源大小:802k
文件大小:17k
源码类别:

百货/超市行业

开发平台:

Visual C++

  1. //------------------------------------------------------------------------------
  2. // <autogenerated>
  3. //     This code was generated by a tool.
  4. //     Runtime Version: 1.1.4322.573
  5. //
  6. //     Changes to this file may cause incorrect behavior and will be lost if 
  7. //     the code is regenerated.
  8. // </autogenerated>
  9. //------------------------------------------------------------------------------
  10. namespace supershop {
  11.     using System;
  12.     using System.Data;
  13.     using System.Xml;
  14.     using System.Runtime.Serialization;
  15.     
  16.     
  17.     [Serializable()]
  18.     [System.ComponentModel.DesignerCategoryAttribute("code")]
  19.     [System.Diagnostics.DebuggerStepThrough()]
  20.     [System.ComponentModel.ToolboxItem(true)]
  21.     public class DataSet1 : DataSet {
  22.         
  23.         private productionDataTable tableproduction;
  24.         
  25.         public DataSet1() {
  26.             this.InitClass();
  27.             System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  28.             this.Tables.CollectionChanged += schemaChangedHandler;
  29.             this.Relations.CollectionChanged += schemaChangedHandler;
  30.         }
  31.         
  32.         protected DataSet1(SerializationInfo info, StreamingContext context) {
  33.             string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
  34.             if ((strSchema != null)) {
  35.                 DataSet ds = new DataSet();
  36.                 ds.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(strSchema)));
  37.                 if ((ds.Tables["production"] != null)) {
  38.                     this.Tables.Add(new productionDataTable(ds.Tables["production"]));
  39.                 }
  40.                 this.DataSetName = ds.DataSetName;
  41.                 this.Prefix = ds.Prefix;
  42.                 this.Namespace = ds.Namespace;
  43.                 this.Locale = ds.Locale;
  44.                 this.CaseSensitive = ds.CaseSensitive;
  45.                 this.EnforceConstraints = ds.EnforceConstraints;
  46.                 this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
  47.                 this.InitVars();
  48.             }
  49.             else {
  50.                 this.InitClass();
  51.             }
  52.             this.GetSerializationData(info, context);
  53.             System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  54.             this.Tables.CollectionChanged += schemaChangedHandler;
  55.             this.Relations.CollectionChanged += schemaChangedHandler;
  56.         }
  57.         
  58.         [System.ComponentModel.Browsable(false)]
  59.         [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
  60.         public productionDataTable production {
  61.             get {
  62.                 return this.tableproduction;
  63.             }
  64.         }
  65.         
  66.         public override DataSet Clone() {
  67.             DataSet1 cln = ((DataSet1)(base.Clone()));
  68.             cln.InitVars();
  69.             return cln;
  70.         }
  71.         
  72.         protected override bool ShouldSerializeTables() {
  73.             return false;
  74.         }
  75.         
  76.         protected override bool ShouldSerializeRelations() {
  77.             return false;
  78.         }
  79.         
  80.         protected override void ReadXmlSerializable(XmlReader reader) {
  81.             this.Reset();
  82.             DataSet ds = new DataSet();
  83.             ds.ReadXml(reader);
  84.             if ((ds.Tables["production"] != null)) {
  85.                 this.Tables.Add(new productionDataTable(ds.Tables["production"]));
  86.             }
  87.             this.DataSetName = ds.DataSetName;
  88.             this.Prefix = ds.Prefix;
  89.             this.Namespace = ds.Namespace;
  90.             this.Locale = ds.Locale;
  91.             this.CaseSensitive = ds.CaseSensitive;
  92.             this.EnforceConstraints = ds.EnforceConstraints;
  93.             this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
  94.             this.InitVars();
  95.         }
  96.         
  97.         protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
  98.             System.IO.MemoryStream stream = new System.IO.MemoryStream();
  99.             this.WriteXmlSchema(new XmlTextWriter(stream, null));
  100.             stream.Position = 0;
  101.             return System.Xml.Schema.XmlSchema.Read(new XmlTextReader(stream), null);
  102.         }
  103.         
  104.         internal void InitVars() {
  105.             this.tableproduction = ((productionDataTable)(this.Tables["production"]));
  106.             if ((this.tableproduction != null)) {
  107.                 this.tableproduction.InitVars();
  108.             }
  109.         }
  110.         
  111.         private void InitClass() {
  112.             this.DataSetName = "DataSet1";
  113.             this.Prefix = "";
  114.             this.Namespace = "http://www.tempuri.org/DataSet1.xsd";
  115.             this.Locale = new System.Globalization.CultureInfo("zh-CN");
  116.             this.CaseSensitive = false;
  117.             this.EnforceConstraints = true;
  118.             this.tableproduction = new productionDataTable();
  119.             this.Tables.Add(this.tableproduction);
  120.         }
  121.         
  122.         private bool ShouldSerializeproduction() {
  123.             return false;
  124.         }
  125.         
  126.         private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
  127.             if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
  128.                 this.InitVars();
  129.             }
  130.         }
  131.         
  132.         public delegate void productionRowChangeEventHandler(object sender, productionRowChangeEvent e);
  133.         
  134.         [System.Diagnostics.DebuggerStepThrough()]
  135.         public class productionDataTable : DataTable, System.Collections.IEnumerable {
  136.             
  137.             private DataColumn columnpid;
  138.             
  139.             private DataColumn columnpname;
  140.             
  141.             private DataColumn columnprice;
  142.             
  143.             private DataColumn columntotle;
  144.             
  145.             internal productionDataTable() : 
  146.                     base("production") {
  147.                 this.InitClass();
  148.             }
  149.             
  150.             internal productionDataTable(DataTable table) : 
  151.                     base(table.TableName) {
  152.                 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  153.                     this.CaseSensitive = table.CaseSensitive;
  154.                 }
  155.                 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  156.                     this.Locale = table.Locale;
  157.                 }
  158.                 if ((table.Namespace != table.DataSet.Namespace)) {
  159.                     this.Namespace = table.Namespace;
  160.                 }
  161.                 this.Prefix = table.Prefix;
  162.                 this.MinimumCapacity = table.MinimumCapacity;
  163.                 this.DisplayExpression = table.DisplayExpression;
  164.             }
  165.             
  166.             [System.ComponentModel.Browsable(false)]
  167.             public int Count {
  168.                 get {
  169.                     return this.Rows.Count;
  170.                 }
  171.             }
  172.             
  173.             internal DataColumn pidColumn {
  174.                 get {
  175.                     return this.columnpid;
  176.                 }
  177.             }
  178.             
  179.             internal DataColumn pnameColumn {
  180.                 get {
  181.                     return this.columnpname;
  182.                 }
  183.             }
  184.             
  185.             internal DataColumn priceColumn {
  186.                 get {
  187.                     return this.columnprice;
  188.                 }
  189.             }
  190.             
  191.             internal DataColumn totleColumn {
  192.                 get {
  193.                     return this.columntotle;
  194.                 }
  195.             }
  196.             
  197.             public productionRow this[int index] {
  198.                 get {
  199.                     return ((productionRow)(this.Rows[index]));
  200.                 }
  201.             }
  202.             
  203.             public event productionRowChangeEventHandler productionRowChanged;
  204.             
  205.             public event productionRowChangeEventHandler productionRowChanging;
  206.             
  207.             public event productionRowChangeEventHandler productionRowDeleted;
  208.             
  209.             public event productionRowChangeEventHandler productionRowDeleting;
  210.             
  211.             public void AddproductionRow(productionRow row) {
  212.                 this.Rows.Add(row);
  213.             }
  214.             
  215.             public productionRow AddproductionRow(int pid, string pname, int price, int totle) {
  216.                 productionRow rowproductionRow = ((productionRow)(this.NewRow()));
  217.                 rowproductionRow.ItemArray = new object[] {
  218.                         pid,
  219.                         pname,
  220.                         price,
  221.                         totle};
  222.                 this.Rows.Add(rowproductionRow);
  223.                 return rowproductionRow;
  224.             }
  225.             
  226.             public System.Collections.IEnumerator GetEnumerator() {
  227.                 return this.Rows.GetEnumerator();
  228.             }
  229.             
  230.             public override DataTable Clone() {
  231.                 productionDataTable cln = ((productionDataTable)(base.Clone()));
  232.                 cln.InitVars();
  233.                 return cln;
  234.             }
  235.             
  236.             protected override DataTable CreateInstance() {
  237.                 return new productionDataTable();
  238.             }
  239.             
  240.             internal void InitVars() {
  241.                 this.columnpid = this.Columns["pid"];
  242.                 this.columnpname = this.Columns["pname"];
  243.                 this.columnprice = this.Columns["price"];
  244.                 this.columntotle = this.Columns["totle"];
  245.             }
  246.             
  247.             private void InitClass() {
  248.                 this.columnpid = new DataColumn("pid", typeof(int), null, System.Data.MappingType.Element);
  249.                 this.Columns.Add(this.columnpid);
  250.                 this.columnpname = new DataColumn("pname", typeof(string), null, System.Data.MappingType.Element);
  251.                 this.Columns.Add(this.columnpname);
  252.                 this.columnprice = new DataColumn("price", typeof(int), null, System.Data.MappingType.Element);
  253.                 this.Columns.Add(this.columnprice);
  254.                 this.columntotle = new DataColumn("totle", typeof(int), null, System.Data.MappingType.Element);
  255.                 this.Columns.Add(this.columntotle);
  256.             }
  257.             
  258.             public productionRow NewproductionRow() {
  259.                 return ((productionRow)(this.NewRow()));
  260.             }
  261.             
  262.             protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
  263.                 return new productionRow(builder);
  264.             }
  265.             
  266.             protected override System.Type GetRowType() {
  267.                 return typeof(productionRow);
  268.             }
  269.             
  270.             protected override void OnRowChanged(DataRowChangeEventArgs e) {
  271.                 base.OnRowChanged(e);
  272.                 if ((this.productionRowChanged != null)) {
  273.                     this.productionRowChanged(this, new productionRowChangeEvent(((productionRow)(e.Row)), e.Action));
  274.                 }
  275.             }
  276.             
  277.             protected override void OnRowChanging(DataRowChangeEventArgs e) {
  278.                 base.OnRowChanging(e);
  279.                 if ((this.productionRowChanging != null)) {
  280.                     this.productionRowChanging(this, new productionRowChangeEvent(((productionRow)(e.Row)), e.Action));
  281.                 }
  282.             }
  283.             
  284.             protected override void OnRowDeleted(DataRowChangeEventArgs e) {
  285.                 base.OnRowDeleted(e);
  286.                 if ((this.productionRowDeleted != null)) {
  287.                     this.productionRowDeleted(this, new productionRowChangeEvent(((productionRow)(e.Row)), e.Action));
  288.                 }
  289.             }
  290.             
  291.             protected override void OnRowDeleting(DataRowChangeEventArgs e) {
  292.                 base.OnRowDeleting(e);
  293.                 if ((this.productionRowDeleting != null)) {
  294.                     this.productionRowDeleting(this, new productionRowChangeEvent(((productionRow)(e.Row)), e.Action));
  295.                 }
  296.             }
  297.             
  298.             public void RemoveproductionRow(productionRow row) {
  299.                 this.Rows.Remove(row);
  300.             }
  301.         }
  302.         
  303.         [System.Diagnostics.DebuggerStepThrough()]
  304.         public class productionRow : DataRow {
  305.             
  306.             private productionDataTable tableproduction;
  307.             
  308.             internal productionRow(DataRowBuilder rb) : 
  309.                     base(rb) {
  310.                 this.tableproduction = ((productionDataTable)(this.Table));
  311.             }
  312.             
  313.             public int pid {
  314.                 get {
  315.                     try {
  316.                         return ((int)(this[this.tableproduction.pidColumn]));
  317.                     }
  318.                     catch (InvalidCastException e) {
  319.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  320.                     }
  321.                 }
  322.                 set {
  323.                     this[this.tableproduction.pidColumn] = value;
  324.                 }
  325.             }
  326.             
  327.             public string pname {
  328.                 get {
  329.                     try {
  330.                         return ((string)(this[this.tableproduction.pnameColumn]));
  331.                     }
  332.                     catch (InvalidCastException e) {
  333.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  334.                     }
  335.                 }
  336.                 set {
  337.                     this[this.tableproduction.pnameColumn] = value;
  338.                 }
  339.             }
  340.             
  341.             public int price {
  342.                 get {
  343.                     try {
  344.                         return ((int)(this[this.tableproduction.priceColumn]));
  345.                     }
  346.                     catch (InvalidCastException e) {
  347.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  348.                     }
  349.                 }
  350.                 set {
  351.                     this[this.tableproduction.priceColumn] = value;
  352.                 }
  353.             }
  354.             
  355.             public int totle {
  356.                 get {
  357.                     try {
  358.                         return ((int)(this[this.tableproduction.totleColumn]));
  359.                     }
  360.                     catch (InvalidCastException e) {
  361.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  362.                     }
  363.                 }
  364.                 set {
  365.                     this[this.tableproduction.totleColumn] = value;
  366.                 }
  367.             }
  368.             
  369.             public bool IspidNull() {
  370.                 return this.IsNull(this.tableproduction.pidColumn);
  371.             }
  372.             
  373.             public void SetpidNull() {
  374.                 this[this.tableproduction.pidColumn] = System.Convert.DBNull;
  375.             }
  376.             
  377.             public bool IspnameNull() {
  378.                 return this.IsNull(this.tableproduction.pnameColumn);
  379.             }
  380.             
  381.             public void SetpnameNull() {
  382.                 this[this.tableproduction.pnameColumn] = System.Convert.DBNull;
  383.             }
  384.             
  385.             public bool IspriceNull() {
  386.                 return this.IsNull(this.tableproduction.priceColumn);
  387.             }
  388.             
  389.             public void SetpriceNull() {
  390.                 this[this.tableproduction.priceColumn] = System.Convert.DBNull;
  391.             }
  392.             
  393.             public bool IstotleNull() {
  394.                 return this.IsNull(this.tableproduction.totleColumn);
  395.             }
  396.             
  397.             public void SettotleNull() {
  398.                 this[this.tableproduction.totleColumn] = System.Convert.DBNull;
  399.             }
  400.         }
  401.         
  402.         [System.Diagnostics.DebuggerStepThrough()]
  403.         public class productionRowChangeEvent : EventArgs {
  404.             
  405.             private productionRow eventRow;
  406.             
  407.             private DataRowAction eventAction;
  408.             
  409.             public productionRowChangeEvent(productionRow row, DataRowAction action) {
  410.                 this.eventRow = row;
  411.                 this.eventAction = action;
  412.             }
  413.             
  414.             public productionRow Row {
  415.                 get {
  416.                     return this.eventRow;
  417.                 }
  418.             }
  419.             
  420.             public DataRowAction Action {
  421.                 get {
  422.                     return this.eventAction;
  423.                 }
  424.             }
  425.         }
  426.     }
  427. }