Beispiel #1
0
        public static bool UpdateScanAudits(RSReportsDataset scans)
        {
            //
            bool ret = false;

            if (scans.HasChanges())
            {
                RSReportsDataset _scans = (RSReportsDataset)scans.GetChanges(DataRowState.Modified);
                for (int i = 0; i < _scans.ScanAuditTable.Rows.Count; i++)
                {
                    RSReportsDataset.ScanAuditTableRow scan = _scans.ScanAuditTable[i];
                    bool changed = UpdateScanAudit(scan);
                }
                scans.AcceptChanges();
            }
            ret = true;
            return(ret);
        }
Beispiel #2
0
        public static bool UpdatePickups(RSReportsDataset pickups)
        {
            //
            bool ret = false;

            if (pickups.HasChanges())
            {
                RSReportsDataset _pickups = (RSReportsDataset)pickups.GetChanges(DataRowState.Modified);
                for (int i = 0; i < _pickups.PickupTable.Rows.Count; i++)
                {
                    RSReportsDataset.PickupTableRow pickup = _pickups.PickupTable[i];
                    bool changed = UpdatePickup(pickup);
                }
                pickups.AcceptChanges();
            }
            ret = true;
            return(ret);
        }
Beispiel #3
0
        public static RSReportsDataset GetScanAuditDrivers(DateTime routeDate, string routeClass)
        {
            //
            RSReportsDataset drivers = new RSReportsDataset();

            try {
                RSReportsDataset _scans = GetScanAudits(routeDate, routeClass);
                for (int i = 0; i < _scans.ScanAuditTable.Rows.Count; i++)
                {
                    string driver = _scans.ScanAuditTable[i].Driver;
                    if (drivers.DriverTable.Select("NAME='" + driver + "'").Length == 0)
                    {
                        drivers.DriverTable.AddDriverTableRow(driver, "", 0);
                    }
                }
                drivers.AcceptChanges();
            }
            catch (Exception ex) { throw new ApplicationException(ex.Message, ex); }
            return(drivers);
        }