TotalDuty.cs
上传用户:xgw_05
上传日期:2009-12-11
资源大小:20208k
文件大小:20k
源码类别:

OA系统

开发平台:

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.WorkAttendance.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 TotalDuty : DataSet {
  22.         
  23.         private DutyStatDataTable tableDutyStat;
  24.         
  25.         public TotalDuty() {
  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 TotalDuty(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["DutyStat"] != null)) {
  38.                     this.Tables.Add(new DutyStatDataTable(ds.Tables["DutyStat"]));
  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 DutyStatDataTable DutyStat {
  61.             get {
  62.                 return this.tableDutyStat;
  63.             }
  64.         }
  65.         
  66.         public override DataSet Clone() {
  67.             TotalDuty cln = ((TotalDuty)(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["DutyStat"] != null)) {
  85.                 this.Tables.Add(new DutyStatDataTable(ds.Tables["DutyStat"]));
  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.tableDutyStat = ((DutyStatDataTable)(this.Tables["DutyStat"]));
  106.             if ((this.tableDutyStat != null)) {
  107.                 this.tableDutyStat.InitVars();
  108.             }
  109.         }
  110.         
  111.         private void InitClass() {
  112.             this.DataSetName = "TotalDuty";
  113.             this.Prefix = "";
  114.             this.Namespace = "http://tempuri.org/TotalDuty.xsd";
  115.             this.Locale = new System.Globalization.CultureInfo("en-US");
  116.             this.CaseSensitive = false;
  117.             this.EnforceConstraints = true;
  118.             this.tableDutyStat = new DutyStatDataTable();
  119.             this.Tables.Add(this.tableDutyStat);
  120.         }
  121.         
  122.         private bool ShouldSerializeDutyStat() {
  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 DutyStatRowChangeEventHandler(object sender, DutyStatRowChangeEvent e);
  133.         
  134.         [System.Diagnostics.DebuggerStepThrough()]
  135.         public class DutyStatDataTable : DataTable, System.Collections.IEnumerable {
  136.             
  137.             private DataColumn columnRealName;
  138.             
  139.             private DataColumn columnCommon;
  140.             
  141.             private DataColumn columnLate;
  142.             
  143.             private DataColumn columnEarly;
  144.             
  145.             private DataColumn columnAbsence;
  146.             
  147.             private DataColumn columnPresence;
  148.             
  149.             private DataColumn columnStaff_ID;
  150.             
  151.             internal DutyStatDataTable() : 
  152.                     base("DutyStat") {
  153.                 this.InitClass();
  154.             }
  155.             
  156.             internal DutyStatDataTable(DataTable table) : 
  157.                     base(table.TableName) {
  158.                 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  159.                     this.CaseSensitive = table.CaseSensitive;
  160.                 }
  161.                 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  162.                     this.Locale = table.Locale;
  163.                 }
  164.                 if ((table.Namespace != table.DataSet.Namespace)) {
  165.                     this.Namespace = table.Namespace;
  166.                 }
  167.                 this.Prefix = table.Prefix;
  168.                 this.MinimumCapacity = table.MinimumCapacity;
  169.                 this.DisplayExpression = table.DisplayExpression;
  170.             }
  171.             
  172.             [System.ComponentModel.Browsable(false)]
  173.             public int Count {
  174.                 get {
  175.                     return this.Rows.Count;
  176.                 }
  177.             }
  178.             
  179.             internal DataColumn RealNameColumn {
  180.                 get {
  181.                     return this.columnRealName;
  182.                 }
  183.             }
  184.             
  185.             internal DataColumn CommonColumn {
  186.                 get {
  187.                     return this.columnCommon;
  188.                 }
  189.             }
  190.             
  191.             internal DataColumn LateColumn {
  192.                 get {
  193.                     return this.columnLate;
  194.                 }
  195.             }
  196.             
  197.             internal DataColumn EarlyColumn {
  198.                 get {
  199.                     return this.columnEarly;
  200.                 }
  201.             }
  202.             
  203.             internal DataColumn AbsenceColumn {
  204.                 get {
  205.                     return this.columnAbsence;
  206.                 }
  207.             }
  208.             
  209.             internal DataColumn PresenceColumn {
  210.                 get {
  211.                     return this.columnPresence;
  212.                 }
  213.             }
  214.             
  215.             internal DataColumn Staff_IDColumn {
  216.                 get {
  217.                     return this.columnStaff_ID;
  218.                 }
  219.             }
  220.             
  221.             public DutyStatRow this[int index] {
  222.                 get {
  223.                     return ((DutyStatRow)(this.Rows[index]));
  224.                 }
  225.             }
  226.             
  227.             public event DutyStatRowChangeEventHandler DutyStatRowChanged;
  228.             
  229.             public event DutyStatRowChangeEventHandler DutyStatRowChanging;
  230.             
  231.             public event DutyStatRowChangeEventHandler DutyStatRowDeleted;
  232.             
  233.             public event DutyStatRowChangeEventHandler DutyStatRowDeleting;
  234.             
  235.             public void AddDutyStatRow(DutyStatRow row) {
  236.                 this.Rows.Add(row);
  237.             }
  238.             
  239.             public DutyStatRow AddDutyStatRow(string RealName, int Common, int Late, int Early, int Absence, int Presence, int Staff_ID) {
  240.                 DutyStatRow rowDutyStatRow = ((DutyStatRow)(this.NewRow()));
  241.                 rowDutyStatRow.ItemArray = new object[] {
  242.                         RealName,
  243.                         Common,
  244.                         Late,
  245.                         Early,
  246.                         Absence,
  247.                         Presence,
  248.                         Staff_ID};
  249.                 this.Rows.Add(rowDutyStatRow);
  250.                 return rowDutyStatRow;
  251.             }
  252.             
  253.             public System.Collections.IEnumerator GetEnumerator() {
  254.                 return this.Rows.GetEnumerator();
  255.             }
  256.             
  257.             public override DataTable Clone() {
  258.                 DutyStatDataTable cln = ((DutyStatDataTable)(base.Clone()));
  259.                 cln.InitVars();
  260.                 return cln;
  261.             }
  262.             
  263.             protected override DataTable CreateInstance() {
  264.                 return new DutyStatDataTable();
  265.             }
  266.             
  267.             internal void InitVars() {
  268.                 this.columnRealName = this.Columns["RealName"];
  269.                 this.columnCommon = this.Columns["Common"];
  270.                 this.columnLate = this.Columns["Late"];
  271.                 this.columnEarly = this.Columns["Early"];
  272.                 this.columnAbsence = this.Columns["Absence"];
  273.                 this.columnPresence = this.Columns["Presence"];
  274.                 this.columnStaff_ID = this.Columns["Staff_ID"];
  275.             }
  276.             
  277.             private void InitClass() {
  278.                 this.columnRealName = new DataColumn("RealName", typeof(string), null, System.Data.MappingType.Element);
  279.                 this.Columns.Add(this.columnRealName);
  280.                 this.columnCommon = new DataColumn("Common", typeof(int), null, System.Data.MappingType.Element);
  281.                 this.Columns.Add(this.columnCommon);
  282.                 this.columnLate = new DataColumn("Late", typeof(int), null, System.Data.MappingType.Element);
  283.                 this.Columns.Add(this.columnLate);
  284.                 this.columnEarly = new DataColumn("Early", typeof(int), null, System.Data.MappingType.Element);
  285.                 this.Columns.Add(this.columnEarly);
  286.                 this.columnAbsence = new DataColumn("Absence", typeof(int), null, System.Data.MappingType.Element);
  287.                 this.Columns.Add(this.columnAbsence);
  288.                 this.columnPresence = new DataColumn("Presence", typeof(int), null, System.Data.MappingType.Element);
  289.                 this.Columns.Add(this.columnPresence);
  290.                 this.columnStaff_ID = new DataColumn("Staff_ID", typeof(int), null, System.Data.MappingType.Element);
  291.                 this.Columns.Add(this.columnStaff_ID);
  292.             }
  293.             
  294.             public DutyStatRow NewDutyStatRow() {
  295.                 return ((DutyStatRow)(this.NewRow()));
  296.             }
  297.             
  298.             protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
  299.                 return new DutyStatRow(builder);
  300.             }
  301.             
  302.             protected override System.Type GetRowType() {
  303.                 return typeof(DutyStatRow);
  304.             }
  305.             
  306.             protected override void OnRowChanged(DataRowChangeEventArgs e) {
  307.                 base.OnRowChanged(e);
  308.                 if ((this.DutyStatRowChanged != null)) {
  309.                     this.DutyStatRowChanged(this, new DutyStatRowChangeEvent(((DutyStatRow)(e.Row)), e.Action));
  310.                 }
  311.             }
  312.             
  313.             protected override void OnRowChanging(DataRowChangeEventArgs e) {
  314.                 base.OnRowChanging(e);
  315.                 if ((this.DutyStatRowChanging != null)) {
  316.                     this.DutyStatRowChanging(this, new DutyStatRowChangeEvent(((DutyStatRow)(e.Row)), e.Action));
  317.                 }
  318.             }
  319.             
  320.             protected override void OnRowDeleted(DataRowChangeEventArgs e) {
  321.                 base.OnRowDeleted(e);
  322.                 if ((this.DutyStatRowDeleted != null)) {
  323.                     this.DutyStatRowDeleted(this, new DutyStatRowChangeEvent(((DutyStatRow)(e.Row)), e.Action));
  324.                 }
  325.             }
  326.             
  327.             protected override void OnRowDeleting(DataRowChangeEventArgs e) {
  328.                 base.OnRowDeleting(e);
  329.                 if ((this.DutyStatRowDeleting != null)) {
  330.                     this.DutyStatRowDeleting(this, new DutyStatRowChangeEvent(((DutyStatRow)(e.Row)), e.Action));
  331.                 }
  332.             }
  333.             
  334.             public void RemoveDutyStatRow(DutyStatRow row) {
  335.                 this.Rows.Remove(row);
  336.             }
  337.         }
  338.         
  339.         [System.Diagnostics.DebuggerStepThrough()]
  340.         public class DutyStatRow : DataRow {
  341.             
  342.             private DutyStatDataTable tableDutyStat;
  343.             
  344.             internal DutyStatRow(DataRowBuilder rb) : 
  345.                     base(rb) {
  346.                 this.tableDutyStat = ((DutyStatDataTable)(this.Table));
  347.             }
  348.             
  349.             public string RealName {
  350.                 get {
  351.                     try {
  352.                         return ((string)(this[this.tableDutyStat.RealNameColumn]));
  353.                     }
  354.                     catch (InvalidCastException e) {
  355.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  356.                     }
  357.                 }
  358.                 set {
  359.                     this[this.tableDutyStat.RealNameColumn] = value;
  360.                 }
  361.             }
  362.             
  363.             public int Common {
  364.                 get {
  365.                     try {
  366.                         return ((int)(this[this.tableDutyStat.CommonColumn]));
  367.                     }
  368.                     catch (InvalidCastException e) {
  369.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  370.                     }
  371.                 }
  372.                 set {
  373.                     this[this.tableDutyStat.CommonColumn] = value;
  374.                 }
  375.             }
  376.             
  377.             public int Late {
  378.                 get {
  379.                     try {
  380.                         return ((int)(this[this.tableDutyStat.LateColumn]));
  381.                     }
  382.                     catch (InvalidCastException e) {
  383.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  384.                     }
  385.                 }
  386.                 set {
  387.                     this[this.tableDutyStat.LateColumn] = value;
  388.                 }
  389.             }
  390.             
  391.             public int Early {
  392.                 get {
  393.                     try {
  394.                         return ((int)(this[this.tableDutyStat.EarlyColumn]));
  395.                     }
  396.                     catch (InvalidCastException e) {
  397.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  398.                     }
  399.                 }
  400.                 set {
  401.                     this[this.tableDutyStat.EarlyColumn] = value;
  402.                 }
  403.             }
  404.             
  405.             public int Absence {
  406.                 get {
  407.                     try {
  408.                         return ((int)(this[this.tableDutyStat.AbsenceColumn]));
  409.                     }
  410.                     catch (InvalidCastException e) {
  411.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  412.                     }
  413.                 }
  414.                 set {
  415.                     this[this.tableDutyStat.AbsenceColumn] = value;
  416.                 }
  417.             }
  418.             
  419.             public int Presence {
  420.                 get {
  421.                     try {
  422.                         return ((int)(this[this.tableDutyStat.PresenceColumn]));
  423.                     }
  424.                     catch (InvalidCastException e) {
  425.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  426.                     }
  427.                 }
  428.                 set {
  429.                     this[this.tableDutyStat.PresenceColumn] = value;
  430.                 }
  431.             }
  432.             
  433.             public int Staff_ID {
  434.                 get {
  435.                     try {
  436.                         return ((int)(this[this.tableDutyStat.Staff_IDColumn]));
  437.                     }
  438.                     catch (InvalidCastException e) {
  439.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  440.                     }
  441.                 }
  442.                 set {
  443.                     this[this.tableDutyStat.Staff_IDColumn] = value;
  444.                 }
  445.             }
  446.             
  447.             public bool IsRealNameNull() {
  448.                 return this.IsNull(this.tableDutyStat.RealNameColumn);
  449.             }
  450.             
  451.             public void SetRealNameNull() {
  452.                 this[this.tableDutyStat.RealNameColumn] = System.Convert.DBNull;
  453.             }
  454.             
  455.             public bool IsCommonNull() {
  456.                 return this.IsNull(this.tableDutyStat.CommonColumn);
  457.             }
  458.             
  459.             public void SetCommonNull() {
  460.                 this[this.tableDutyStat.CommonColumn] = System.Convert.DBNull;
  461.             }
  462.             
  463.             public bool IsLateNull() {
  464.                 return this.IsNull(this.tableDutyStat.LateColumn);
  465.             }
  466.             
  467.             public void SetLateNull() {
  468.                 this[this.tableDutyStat.LateColumn] = System.Convert.DBNull;
  469.             }
  470.             
  471.             public bool IsEarlyNull() {
  472.                 return this.IsNull(this.tableDutyStat.EarlyColumn);
  473.             }
  474.             
  475.             public void SetEarlyNull() {
  476.                 this[this.tableDutyStat.EarlyColumn] = System.Convert.DBNull;
  477.             }
  478.             
  479.             public bool IsAbsenceNull() {
  480.                 return this.IsNull(this.tableDutyStat.AbsenceColumn);
  481.             }
  482.             
  483.             public void SetAbsenceNull() {
  484.                 this[this.tableDutyStat.AbsenceColumn] = System.Convert.DBNull;
  485.             }
  486.             
  487.             public bool IsPresenceNull() {
  488.                 return this.IsNull(this.tableDutyStat.PresenceColumn);
  489.             }
  490.             
  491.             public void SetPresenceNull() {
  492.                 this[this.tableDutyStat.PresenceColumn] = System.Convert.DBNull;
  493.             }
  494.             
  495.             public bool IsStaff_IDNull() {
  496.                 return this.IsNull(this.tableDutyStat.Staff_IDColumn);
  497.             }
  498.             
  499.             public void SetStaff_IDNull() {
  500.                 this[this.tableDutyStat.Staff_IDColumn] = System.Convert.DBNull;
  501.             }
  502.         }
  503.         
  504.         [System.Diagnostics.DebuggerStepThrough()]
  505.         public class DutyStatRowChangeEvent : EventArgs {
  506.             
  507.             private DutyStatRow eventRow;
  508.             
  509.             private DataRowAction eventAction;
  510.             
  511.             public DutyStatRowChangeEvent(DutyStatRow row, DataRowAction action) {
  512.                 this.eventRow = row;
  513.                 this.eventAction = action;
  514.             }
  515.             
  516.             public DutyStatRow Row {
  517.                 get {
  518.                     return this.eventRow;
  519.                 }
  520.             }
  521.             
  522.             public DataRowAction Action {
  523.                 get {
  524.                     return this.eventAction;
  525.                 }
  526.             }
  527.         }
  528.     }
  529. }