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

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