⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 totalduty.cs

📁 除了具有传统OA的邮件、工作流、文档等功能外
💻 CS
📖 第 1 页 / 共 2 页
字号:
            
            public void InitVars() {
                this.columnRealName = this.Columns["RealName"];
                this.columnCommon = this.Columns["Common"];
                this.columnLate = this.Columns["Late"];
                this.columnEarly = this.Columns["Early"];
                this.columnAbsence = this.Columns["Absence"];
                this.columnPresence = this.Columns["Presence"];
                this.columnStaff_ID = this.Columns["Staff_ID"];
            }
            
            private void InitClass() {
                this.columnRealName = new DataColumn("RealName", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnRealName);
                this.columnCommon = new DataColumn("Common", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnCommon);
                this.columnLate = new DataColumn("Late", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnLate);
                this.columnEarly = new DataColumn("Early", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnEarly);
                this.columnAbsence = new DataColumn("Absence", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnAbsence);
                this.columnPresence = new DataColumn("Presence", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPresence);
                this.columnStaff_ID = new DataColumn("Staff_ID", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnStaff_ID);
            }
            
            public DutyStatRow NewDutyStatRow() {
                return ((DutyStatRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new DutyStatRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(DutyStatRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.DutyStatRowChanged != null)) {
                    this.DutyStatRowChanged(this, new DutyStatRowChangeEvent(((DutyStatRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.DutyStatRowChanging != null)) {
                    this.DutyStatRowChanging(this, new DutyStatRowChangeEvent(((DutyStatRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.DutyStatRowDeleted != null)) {
                    this.DutyStatRowDeleted(this, new DutyStatRowChangeEvent(((DutyStatRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.DutyStatRowDeleting != null)) {
                    this.DutyStatRowDeleting(this, new DutyStatRowChangeEvent(((DutyStatRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveDutyStatRow(DutyStatRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class DutyStatRow : DataRow {
            
            private DutyStatDataTable tableDutyStat;
            
            public DutyStatRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableDutyStat = ((DutyStatDataTable)(this.Table));
            }
            
            public string RealName {
                get {
                    try {
                        return ((string)(this[this.tableDutyStat.RealNameColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableDutyStat.RealNameColumn] = value;
                }
            }
            
            public int Common {
                get {
                    try {
                        return ((int)(this[this.tableDutyStat.CommonColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableDutyStat.CommonColumn] = value;
                }
            }
            
            public int Late {
                get {
                    try {
                        return ((int)(this[this.tableDutyStat.LateColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableDutyStat.LateColumn] = value;
                }
            }
            
            public int Early {
                get {
                    try {
                        return ((int)(this[this.tableDutyStat.EarlyColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableDutyStat.EarlyColumn] = value;
                }
            }
            
            public int Absence {
                get {
                    try {
                        return ((int)(this[this.tableDutyStat.AbsenceColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableDutyStat.AbsenceColumn] = value;
                }
            }
            
            public int Presence {
                get {
                    try {
                        return ((int)(this[this.tableDutyStat.PresenceColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableDutyStat.PresenceColumn] = value;
                }
            }
            
            public int Staff_ID {
                get {
                    try {
                        return ((int)(this[this.tableDutyStat.Staff_IDColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableDutyStat.Staff_IDColumn] = value;
                }
            }
            
            public bool IsRealNameNull() {
                return this.IsNull(this.tableDutyStat.RealNameColumn);
            }
            
            public void SetRealNameNull() {
                this[this.tableDutyStat.RealNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsCommonNull() {
                return this.IsNull(this.tableDutyStat.CommonColumn);
            }
            
            public void SetCommonNull() {
                this[this.tableDutyStat.CommonColumn] = System.Convert.DBNull;
            }
            
            public bool IsLateNull() {
                return this.IsNull(this.tableDutyStat.LateColumn);
            }
            
            public void SetLateNull() {
                this[this.tableDutyStat.LateColumn] = System.Convert.DBNull;
            }
            
            public bool IsEarlyNull() {
                return this.IsNull(this.tableDutyStat.EarlyColumn);
            }
            
            public void SetEarlyNull() {
                this[this.tableDutyStat.EarlyColumn] = System.Convert.DBNull;
            }
            
            public bool IsAbsenceNull() {
                return this.IsNull(this.tableDutyStat.AbsenceColumn);
            }
            
            public void SetAbsenceNull() {
                this[this.tableDutyStat.AbsenceColumn] = System.Convert.DBNull;
            }
            
            public bool IsPresenceNull() {
                return this.IsNull(this.tableDutyStat.PresenceColumn);
            }
            
            public void SetPresenceNull() {
                this[this.tableDutyStat.PresenceColumn] = System.Convert.DBNull;
            }
            
            public bool IsStaff_IDNull() {
                return this.IsNull(this.tableDutyStat.Staff_IDColumn);
            }
            
            public void SetStaff_IDNull() {
                this[this.tableDutyStat.Staff_IDColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class DutyStatRowChangeEvent : EventArgs {
            
            private DutyStatRow eventRow;
            
            private DataRowAction eventAction;
            
            public DutyStatRowChangeEvent(DutyStatRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public DutyStatRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -