StaffDataSet.cs
上传用户:xuming1973
上传日期:2014-02-27
资源大小:17511k
文件大小:18k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

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 UDS.SubModule.Staff.Report {
  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 StaffDataSet : DataSet {
  22.         
  23.         private StaffViewDataTable tableStaffView;
  24.         
  25.         public StaffDataSet() {
  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 StaffDataSet(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["StaffView"] != null)) {
  38.                     this.Tables.Add(new StaffViewDataTable(ds.Tables["StaffView"]));
  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 StaffViewDataTable StaffView {
  61.             get {
  62.                 return this.tableStaffView;
  63.             }
  64.         }
  65.         
  66.         public override DataSet Clone() {
  67.             StaffDataSet cln = ((StaffDataSet)(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["StaffView"] != null)) {
  85.                 this.Tables.Add(new StaffViewDataTable(ds.Tables["StaffView"]));
  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.tableStaffView = ((StaffViewDataTable)(this.Tables["StaffView"]));
  106.             if ((this.tableStaffView != null)) {
  107.                 this.tableStaffView.InitVars();
  108.             }
  109.         }
  110.         
  111.         private void InitClass() {
  112.             this.DataSetName = "StaffDataSet";
  113.             this.Prefix = "";
  114.             this.Namespace = "http://tempuri.org/StaffDataSet.xsd";
  115.             this.Locale = new System.Globalization.CultureInfo("zh-CN");
  116.             this.CaseSensitive = false;
  117.             this.EnforceConstraints = true;
  118.             this.tableStaffView = new StaffViewDataTable();
  119.             this.Tables.Add(this.tableStaffView);
  120.         }
  121.         
  122.         private bool ShouldSerializeStaffView() {
  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 StaffViewRowChangeEventHandler(object sender, StaffViewRowChangeEvent e);
  133.         
  134.         [System.Diagnostics.DebuggerStepThrough()]
  135.         public class StaffViewDataTable : DataTable, System.Collections.IEnumerable {
  136.             
  137.             private DataColumn columnStaff_Name;
  138.             
  139.             private DataColumn columnRealName;
  140.             
  141.             private DataColumn columnEmail;
  142.             
  143.             private DataColumn columnMobile;
  144.             
  145.             private DataColumn columnSexName;
  146.             
  147.             private DataColumn columnPosition_Name;
  148.             
  149.             internal StaffViewDataTable() : 
  150.                     base("StaffView") {
  151.                 this.InitClass();
  152.             }
  153.             
  154.             internal StaffViewDataTable(DataTable table) : 
  155.                     base(table.TableName) {
  156.                 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  157.                     this.CaseSensitive = table.CaseSensitive;
  158.                 }
  159.                 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  160.                     this.Locale = table.Locale;
  161.                 }
  162.                 if ((table.Namespace != table.DataSet.Namespace)) {
  163.                     this.Namespace = table.Namespace;
  164.                 }
  165.                 this.Prefix = table.Prefix;
  166.                 this.MinimumCapacity = table.MinimumCapacity;
  167.                 this.DisplayExpression = table.DisplayExpression;
  168.             }
  169.             
  170.             [System.ComponentModel.Browsable(false)]
  171.             public int Count {
  172.                 get {
  173.                     return this.Rows.Count;
  174.                 }
  175.             }
  176.             
  177.             internal DataColumn Staff_NameColumn {
  178.                 get {
  179.                     return this.columnStaff_Name;
  180.                 }
  181.             }
  182.             
  183.             internal DataColumn RealNameColumn {
  184.                 get {
  185.                     return this.columnRealName;
  186.                 }
  187.             }
  188.             
  189.             internal DataColumn EmailColumn {
  190.                 get {
  191.                     return this.columnEmail;
  192.                 }
  193.             }
  194.             
  195.             internal DataColumn MobileColumn {
  196.                 get {
  197.                     return this.columnMobile;
  198.                 }
  199.             }
  200.             
  201.             internal DataColumn SexNameColumn {
  202.                 get {
  203.                     return this.columnSexName;
  204.                 }
  205.             }
  206.             
  207.             internal DataColumn Position_NameColumn {
  208.                 get {
  209.                     return this.columnPosition_Name;
  210.                 }
  211.             }
  212.             
  213.             public StaffViewRow this[int index] {
  214.                 get {
  215.                     return ((StaffViewRow)(this.Rows[index]));
  216.                 }
  217.             }
  218.             
  219.             public event StaffViewRowChangeEventHandler StaffViewRowChanged;
  220.             
  221.             public event StaffViewRowChangeEventHandler StaffViewRowChanging;
  222.             
  223.             public event StaffViewRowChangeEventHandler StaffViewRowDeleted;
  224.             
  225.             public event StaffViewRowChangeEventHandler StaffViewRowDeleting;
  226.             
  227.             public void AddStaffViewRow(StaffViewRow row) {
  228.                 this.Rows.Add(row);
  229.             }
  230.             
  231.             public StaffViewRow AddStaffViewRow(string Staff_Name, string RealName, string Email, string Mobile, string SexName, string Position_Name) {
  232.                 StaffViewRow rowStaffViewRow = ((StaffViewRow)(this.NewRow()));
  233.                 rowStaffViewRow.ItemArray = new object[] {
  234.                         Staff_Name,
  235.                         RealName,
  236.                         Email,
  237.                         Mobile,
  238.                         SexName,
  239.                         Position_Name};
  240.                 this.Rows.Add(rowStaffViewRow);
  241.                 return rowStaffViewRow;
  242.             }
  243.             
  244.             public System.Collections.IEnumerator GetEnumerator() {
  245.                 return this.Rows.GetEnumerator();
  246.             }
  247.             
  248.             public override DataTable Clone() {
  249.                 StaffViewDataTable cln = ((StaffViewDataTable)(base.Clone()));
  250.                 cln.InitVars();
  251.                 return cln;
  252.             }
  253.             
  254.             protected override DataTable CreateInstance() {
  255.                 return new StaffViewDataTable();
  256.             }
  257.             
  258.             internal void InitVars() {
  259.                 this.columnStaff_Name = this.Columns["Staff_Name"];
  260.                 this.columnRealName = this.Columns["RealName"];
  261.                 this.columnEmail = this.Columns["Email"];
  262.                 this.columnMobile = this.Columns["Mobile"];
  263.                 this.columnSexName = this.Columns["SexName"];
  264.                 this.columnPosition_Name = this.Columns["Position_Name"];
  265.             }
  266.             
  267.             private void InitClass() {
  268.                 this.columnStaff_Name = new DataColumn("Staff_Name", typeof(string), null, System.Data.MappingType.Element);
  269.                 this.Columns.Add(this.columnStaff_Name);
  270.                 this.columnRealName = new DataColumn("RealName", typeof(string), null, System.Data.MappingType.Element);
  271.                 this.Columns.Add(this.columnRealName);
  272.                 this.columnEmail = new DataColumn("Email", typeof(string), null, System.Data.MappingType.Element);
  273.                 this.Columns.Add(this.columnEmail);
  274.                 this.columnMobile = new DataColumn("Mobile", typeof(string), null, System.Data.MappingType.Element);
  275.                 this.Columns.Add(this.columnMobile);
  276.                 this.columnSexName = new DataColumn("SexName", typeof(string), null, System.Data.MappingType.Element);
  277.                 this.Columns.Add(this.columnSexName);
  278.                 this.columnPosition_Name = new DataColumn("Position_Name", typeof(string), null, System.Data.MappingType.Element);
  279.                 this.Columns.Add(this.columnPosition_Name);
  280.                 this.columnStaff_Name.AllowDBNull = false;
  281.                 this.columnSexName.AllowDBNull = false;
  282.                 this.columnPosition_Name.AllowDBNull = false;
  283.             }
  284.             
  285.             public StaffViewRow NewStaffViewRow() {
  286.                 return ((StaffViewRow)(this.NewRow()));
  287.             }
  288.             
  289.             protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
  290.                 return new StaffViewRow(builder);
  291.             }
  292.             
  293.             protected override System.Type GetRowType() {
  294.                 return typeof(StaffViewRow);
  295.             }
  296.             
  297.             protected override void OnRowChanged(DataRowChangeEventArgs e) {
  298.                 base.OnRowChanged(e);
  299.                 if ((this.StaffViewRowChanged != null)) {
  300.                     this.StaffViewRowChanged(this, new StaffViewRowChangeEvent(((StaffViewRow)(e.Row)), e.Action));
  301.                 }
  302.             }
  303.             
  304.             protected override void OnRowChanging(DataRowChangeEventArgs e) {
  305.                 base.OnRowChanging(e);
  306.                 if ((this.StaffViewRowChanging != null)) {
  307.                     this.StaffViewRowChanging(this, new StaffViewRowChangeEvent(((StaffViewRow)(e.Row)), e.Action));
  308.                 }
  309.             }
  310.             
  311.             protected override void OnRowDeleted(DataRowChangeEventArgs e) {
  312.                 base.OnRowDeleted(e);
  313.                 if ((this.StaffViewRowDeleted != null)) {
  314.                     this.StaffViewRowDeleted(this, new StaffViewRowChangeEvent(((StaffViewRow)(e.Row)), e.Action));
  315.                 }
  316.             }
  317.             
  318.             protected override void OnRowDeleting(DataRowChangeEventArgs e) {
  319.                 base.OnRowDeleting(e);
  320.                 if ((this.StaffViewRowDeleting != null)) {
  321.                     this.StaffViewRowDeleting(this, new StaffViewRowChangeEvent(((StaffViewRow)(e.Row)), e.Action));
  322.                 }
  323.             }
  324.             
  325.             public void RemoveStaffViewRow(StaffViewRow row) {
  326.                 this.Rows.Remove(row);
  327.             }
  328.         }
  329.         
  330.         [System.Diagnostics.DebuggerStepThrough()]
  331.         public class StaffViewRow : DataRow {
  332.             
  333.             private StaffViewDataTable tableStaffView;
  334.             
  335.             internal StaffViewRow(DataRowBuilder rb) : 
  336.                     base(rb) {
  337.                 this.tableStaffView = ((StaffViewDataTable)(this.Table));
  338.             }
  339.             
  340.             public string Staff_Name {
  341.                 get {
  342.                     return ((string)(this[this.tableStaffView.Staff_NameColumn]));
  343.                 }
  344.                 set {
  345.                     this[this.tableStaffView.Staff_NameColumn] = value;
  346.                 }
  347.             }
  348.             
  349.             public string RealName {
  350.                 get {
  351.                     try {
  352.                         return ((string)(this[this.tableStaffView.RealNameColumn]));
  353.                     }
  354.                     catch (InvalidCastException e) {
  355.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  356.                     }
  357.                 }
  358.                 set {
  359.                     this[this.tableStaffView.RealNameColumn] = value;
  360.                 }
  361.             }
  362.             
  363.             public string Email {
  364.                 get {
  365.                     try {
  366.                         return ((string)(this[this.tableStaffView.EmailColumn]));
  367.                     }
  368.                     catch (InvalidCastException e) {
  369.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  370.                     }
  371.                 }
  372.                 set {
  373.                     this[this.tableStaffView.EmailColumn] = value;
  374.                 }
  375.             }
  376.             
  377.             public string Mobile {
  378.                 get {
  379.                     try {
  380.                         return ((string)(this[this.tableStaffView.MobileColumn]));
  381.                     }
  382.                     catch (InvalidCastException e) {
  383.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  384.                     }
  385.                 }
  386.                 set {
  387.                     this[this.tableStaffView.MobileColumn] = value;
  388.                 }
  389.             }
  390.             
  391.             public string SexName {
  392.                 get {
  393.                     return ((string)(this[this.tableStaffView.SexNameColumn]));
  394.                 }
  395.                 set {
  396.                     this[this.tableStaffView.SexNameColumn] = value;
  397.                 }
  398.             }
  399.             
  400.             public string Position_Name {
  401.                 get {
  402.                     return ((string)(this[this.tableStaffView.Position_NameColumn]));
  403.                 }
  404.                 set {
  405.                     this[this.tableStaffView.Position_NameColumn] = value;
  406.                 }
  407.             }
  408.             
  409.             public bool IsRealNameNull() {
  410.                 return this.IsNull(this.tableStaffView.RealNameColumn);
  411.             }
  412.             
  413.             public void SetRealNameNull() {
  414.                 this[this.tableStaffView.RealNameColumn] = System.Convert.DBNull;
  415.             }
  416.             
  417.             public bool IsEmailNull() {
  418.                 return this.IsNull(this.tableStaffView.EmailColumn);
  419.             }
  420.             
  421.             public void SetEmailNull() {
  422.                 this[this.tableStaffView.EmailColumn] = System.Convert.DBNull;
  423.             }
  424.             
  425.             public bool IsMobileNull() {
  426.                 return this.IsNull(this.tableStaffView.MobileColumn);
  427.             }
  428.             
  429.             public void SetMobileNull() {
  430.                 this[this.tableStaffView.MobileColumn] = System.Convert.DBNull;
  431.             }
  432.         }
  433.         
  434.         [System.Diagnostics.DebuggerStepThrough()]
  435.         public class StaffViewRowChangeEvent : EventArgs {
  436.             
  437.             private StaffViewRow eventRow;
  438.             
  439.             private DataRowAction eventAction;
  440.             
  441.             public StaffViewRowChangeEvent(StaffViewRow row, DataRowAction action) {
  442.                 this.eventRow = row;
  443.                 this.eventAction = action;
  444.             }
  445.             
  446.             public StaffViewRow Row {
  447.                 get {
  448.                     return this.eventRow;
  449.                 }
  450.             }
  451.             
  452.             public DataRowAction Action {
  453.                 get {
  454.                     return this.eventAction;
  455.                 }
  456.             }
  457.         }
  458.     }
  459. }