示例#1
0
        public static RSReportsDataset GetDepots(string terminalCode)
        {
            //
            RSReportsDataset       depots = new RSReportsDataset();
            RSReportsServiceClient client = new RSReportsServiceClient();

            try {
                DataSet ds = client.GetDepots();
                if (ds != null)
                {
                    depots.Merge(ds);
                    for (int i = 0; i < depots.DepotTable.Rows.Count; i++)
                    {
                        string orderClass = depots.DepotTable[i].RS_OrderClass;
                        if (!(terminalCode.Length == 0 || orderClass == terminalCode))
                        {
                            depots.DepotTable[i].Delete();
                        }
                    }
                    depots.DepotTable.AcceptChanges();
                }
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); }
            catch (FaultException <RoadshowFault> rfe) { client.Abort(); throw new ApplicationException(rfe.Detail.Message); }
            catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); }
            return(depots);
        }
示例#2
0
        public static RSReportsDataset GetScanAudits(DateTime routeDate, string routeClass, string driverName)
        {
            //
            RSReportsDataset scans = null;

            try {
                scans = new RSReportsDataset();
                RSReportsDataset _scans = GetScanAudits(routeDate, routeClass);
                if (driverName != "All")
                {
                    scans.Merge(_scans.ScanAuditTable.Select("Driver ='" + driverName + "'"));
                }
                else
                {
                    scans.Merge(_scans);
                }
            }
            catch (Exception ex) { throw new ApplicationException(ex.Message, ex); }
            return(scans);
        }
示例#3
0
        public static RSReportsDataset GetUpdateUsers(string routeClass)
        {
            //
            RSReportsDataset       users  = new RSReportsDataset();
            RSReportsServiceClient client = new RSReportsServiceClient();

            try {
                DataSet ds = client.GetUpdateUsers(routeClass);
                if (ds != null)
                {
                    users.Merge(ds);
                }
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); }
            catch (FaultException <RoadshowFault> rfe) { client.Abort(); throw new ApplicationException(rfe.Detail.Message); }
            catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); }
            return(users);
        }
示例#4
0
        public static RSReportsDataset GetOrderTypes()
        {
            //
            RSReportsDataset       types  = new RSReportsDataset();
            RSReportsServiceClient client = new RSReportsServiceClient();

            try {
                DataSet ds = client.GetOrderTypes();
                if (ds != null)
                {
                    types.Merge(ds);
                }
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); }
            catch (FaultException <RoadshowFault> rfe) { client.Abort(); throw new ApplicationException(rfe.Detail.Message); }
            catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); }
            return(types);
        }
示例#5
0
        public static RSReportsDataset GetScanAudits(DateTime routeDate, string routeClass)
        {
            //
            RSReportsDataset       scans  = new RSReportsDataset();
            RSReportsServiceClient client = new RSReportsServiceClient();

            try {
                DataSet ds = client.ReadScanAudits(routeDate, routeClass);
                if (ds != null)
                {
                    scans.Merge(ds);
                }
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); }
            catch (FaultException <RoadshowFault> rfe) { client.Abort(); throw new ApplicationException(rfe.Detail.Message); }
            catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); }
            return(scans);
        }