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

📄 jobdataset.cs

📁 这是一个保障消费者合法权益的系统.使用C #和SQL Server终于实现了这一功能的系统
💻 CS
📖 第 1 页 / 共 3 页
字号:
            public tblJobDetailsRow this[int index] {
                get {
                    return ((tblJobDetailsRow)(this.Rows[index]));
                }
            }
            
            public event tblJobDetailsRowChangeEventHandler tblJobDetailsRowChanged;
            
            public event tblJobDetailsRowChangeEventHandler tblJobDetailsRowChanging;
            
            public event tblJobDetailsRowChangeEventHandler tblJobDetailsRowDeleted;
            
            public event tblJobDetailsRowChangeEventHandler tblJobDetailsRowDeleting;
            
            public void AddtblJobDetailsRow(tblJobDetailsRow row) {
                this.Rows.Add(row);
            }
            
            public tblJobDetailsRow AddtblJobDetailsRow(
                        string CarNo, 
                        System.DateTime JobDate, 
                        int WorkerId, 
                        int KMs, 
                        int Tuning, 
                        int Alignment, 
                        int Balancing, 
                        int Tyres, 
                        int Weights, 
                        int OilChanged, 
                        int OilQty, 
                        int OilFilter, 
                        int GearOil, 
                        int GearOilQty, 
                        int Point, 
                        int Condenser, 
                        int Plug, 
                        int PlugQty, 
                        int FuelFilter, 
                        int AirFilter, 
                        string Remarks) {
                tblJobDetailsRow rowtblJobDetailsRow = ((tblJobDetailsRow)(this.NewRow()));
                rowtblJobDetailsRow.ItemArray = new object[] {
                        CarNo,
                        JobDate,
                        WorkerId,
                        KMs,
                        Tuning,
                        Alignment,
                        Balancing,
                        Tyres,
                        Weights,
                        OilChanged,
                        OilQty,
                        OilFilter,
                        GearOil,
                        GearOilQty,
                        Point,
                        Condenser,
                        Plug,
                        PlugQty,
                        FuelFilter,
                        AirFilter,
                        Remarks};
                this.Rows.Add(rowtblJobDetailsRow);
                return rowtblJobDetailsRow;
            }
            
            public tblJobDetailsRow FindByCarNoJobDate(string CarNo, System.DateTime JobDate) {
                return ((tblJobDetailsRow)(this.Rows.Find(new object[] {
                            CarNo,
                            JobDate})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                tblJobDetailsDataTable cln = ((tblJobDetailsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            internal void InitVars() {
                this.columnCarNo = this.Columns["CarNo"];
                this.columnJobDate = this.Columns["JobDate"];
                this.columnWorkerId = this.Columns["WorkerId"];
                this.columnKMs = this.Columns["KMs"];
                this.columnTuning = this.Columns["Tuning"];
                this.columnAlignment = this.Columns["Alignment"];
                this.columnBalancing = this.Columns["Balancing"];
                this.columnTyres = this.Columns["Tyres"];
                this.columnWeights = this.Columns["Weights"];
                this.columnOilChanged = this.Columns["OilChanged"];
                this.columnOilQty = this.Columns["OilQty"];
                this.columnOilFilter = this.Columns["OilFilter"];
                this.columnGearOil = this.Columns["GearOil"];
                this.columnGearOilQty = this.Columns["GearOilQty"];
                this.columnPoint = this.Columns["Point"];
                this.columnCondenser = this.Columns["Condenser"];
                this.columnPlug = this.Columns["Plug"];
                this.columnPlugQty = this.Columns["PlugQty"];
                this.columnFuelFilter = this.Columns["FuelFilter"];
                this.columnAirFilter = this.Columns["AirFilter"];
                this.columnRemarks = this.Columns["Remarks"];
            }
            
            private void InitClass() {
                this.columnCarNo = new DataColumn("CarNo", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnCarNo);
                this.columnJobDate = new DataColumn("JobDate", typeof(System.DateTime), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnJobDate);
                this.columnWorkerId = new DataColumn("WorkerId", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnWorkerId);
                this.columnKMs = new DataColumn("KMs", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnKMs);
                this.columnTuning = new DataColumn("Tuning", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnTuning);
                this.columnAlignment = new DataColumn("Alignment", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnAlignment);
                this.columnBalancing = new DataColumn("Balancing", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnBalancing);
                this.columnTyres = new DataColumn("Tyres", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnTyres);
                this.columnWeights = new DataColumn("Weights", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnWeights);
                this.columnOilChanged = new DataColumn("OilChanged", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnOilChanged);
                this.columnOilQty = new DataColumn("OilQty", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnOilQty);
                this.columnOilFilter = new DataColumn("OilFilter", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnOilFilter);
                this.columnGearOil = new DataColumn("GearOil", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnGearOil);
                this.columnGearOilQty = new DataColumn("GearOilQty", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnGearOilQty);
                this.columnPoint = new DataColumn("Point", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPoint);
                this.columnCondenser = new DataColumn("Condenser", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnCondenser);
                this.columnPlug = new DataColumn("Plug", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPlug);
                this.columnPlugQty = new DataColumn("PlugQty", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPlugQty);
                this.columnFuelFilter = new DataColumn("FuelFilter", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnFuelFilter);
                this.columnAirFilter = new DataColumn("AirFilter", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnAirFilter);
                this.columnRemarks = new DataColumn("Remarks", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnRemarks);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnCarNo,
                                this.columnJobDate}, true));
                this.columnCarNo.AllowDBNull = false;
                this.columnJobDate.AllowDBNull = false;
                this.columnWorkerId.AllowDBNull = false;
            }
            
            public tblJobDetailsRow NewtblJobDetailsRow() {
                return ((tblJobDetailsRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new tblJobDetailsRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(tblJobDetailsRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.tblJobDetailsRowChanged != null)) {
                    this.tblJobDetailsRowChanged(this, new tblJobDetailsRowChangeEvent(((tblJobDetailsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.tblJobDetailsRowChanging != null)) {
                    this.tblJobDetailsRowChanging(this, new tblJobDetailsRowChangeEvent(((tblJobDetailsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.tblJobDetailsRowDeleted != null)) {
                    this.tblJobDetailsRowDeleted(this, new tblJobDetailsRowChangeEvent(((tblJobDetailsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.tblJobDetailsRowDeleting != null)) {
                    this.tblJobDetailsRowDeleting(this, new tblJobDetailsRowChangeEvent(((tblJobDetailsRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovetblJobDetailsRow(tblJobDetailsRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class tblJobDetailsRow : DataRow {
            
            private tblJobDetailsDataTable tabletblJobDetails;
            
            internal tblJobDetailsRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tabletblJobDetails = ((tblJobDetailsDataTable)(this.Table));
            }
            
            public string CarNo {
                get {
                    return ((string)(this[this.tabletblJobDetails.CarNoColumn]));
                }
                set {
                    this[this.tabletblJobDetails.CarNoColumn] = value;
                }
            }
            
            public System.DateTime JobDate {
                get {
                    return ((System.DateTime)(this[this.tabletblJobDetails.JobDateColumn]));
                }
                set {
                    this[this.tabletblJobDetails.JobDateColumn] = value;
                }
            }
            
            public int WorkerId {
                get {
                    return ((int)(this[this.tabletblJobDetails.WorkerIdColumn]));
                }
                set {
                    this[this.tabletblJobDetails.WorkerIdColumn] = value;
                }
            }
            
            public int KMs {
                get {
                    try {
                        return ((int)(this[this.tabletblJobDetails.KMsColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tabletblJobDetails.KMsColumn] = value;
                }
            }
            
            public int Tuning {
                get {
                    try {
                        return ((int)(this[this.tabletblJobDetails.TuningColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tabletblJobDetails.TuningColumn] = value;
                }
            }
            
            public int Alignment {
                get {
                    try {
                        return ((int)(this[this.tabletblJobDetails.AlignmentColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tabletblJobDetails.AlignmentColumn] = value;
                }
            }
            
            public int Balancing {
                get {
                    try {
                        return ((int)(this[this.tabletblJobDetails.BalancingColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tabletblJobDetails.BalancingColumn] = value;
                }
            }
            
            public int Tyres {
                get {
                    try {
                        return ((int)(this[this.tabletblJobDetails.TyresColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tabletblJobDetails.TyresColumn] = value;
                }
            }
            
            public int Weights {
                get {
                    try {
                        return ((int)(this[this.tabletblJobDetails.WeightsColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tabletblJobDetails.WeightsColumn] = value;
                }
            }
            
            public int OilChanged {
                get {
                    try {
                        return ((int)(this[this.tabletblJobDetails.OilChangedColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }

⌨️ 快捷键说明

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