Example #1
0
        public static DriverDS GetDrivers(string routeClass)
        {
            //
            DriverDS drivers = null;

            try {
                drivers = new DriverDS();
                DataSet ds = App.Mediator.FillDataset(USP_DRIVERS, TBL_DRIVERS, new object[] { routeClass });
                if (ds != null)
                {
                    drivers.Merge(ds);
                }
            }
            catch (Exception ex) { throw new ApplicationException("Unexpected error while reading drivers.", ex); }
            return(drivers);
        }
Example #2
0
        public static DriverDS GetScanAuditDrivers(DateTime routeDate, string routeClass)
        {
            //
            DriverDS drivers = null;

            try {
                drivers = new DriverDS();
                ScanAuditDS _scans = GetScanAudit(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("Unexpected error while reading drivers.", ex); }
            return(drivers);
        }