Ejemplo n.º 1
0
        public static ISDExportDataset GetClients(string clientNumber)
        {
            ISDExportDataset configuration = null;

            try {
                configuration = new ISDExportDataset();
                DataSet ds = fillDataset(USP_EXPORTFILECONFIG, TBL_EXPORTFILECONFIG, new object[] { clientNumber });
                if (ds != null)
                {
                    configuration.Merge(ds);
                }
            }
            catch (Exception ex) { throw new ApplicationException("", ex); }
            return(configuration);
        }
Ejemplo n.º 2
0
        public static ISDExportDataset GetSortedItems(string pickupID)
        {
            //Get sorted items for a pickup
            ISDExportDataset sortedItems = null;

            try {
                sortedItems = new ISDExportDataset();
                DataSet ds = fillDataset(USP_SORTEDITEMS, TBL_SORTEDITEMS, new object[] { pickupID });
                if (ds != null)
                {
                    sortedItems.Merge(ds, false, MissingSchemaAction.Ignore);
                }
            }
            catch (Exception ex) { throw ex; }
            return(sortedItems);
        }
Ejemplo n.º 3
0
        public static ISDExportDataset GetPickups(DateTime pickupDate)
        {
            //Update a collection (dataset) of all pickups for the terminal on the local LAN database
            ISDExportDataset pickups = null;

            try {
                pickups = new ISDExportDataset();
                DataSet ds = fillDataset(USP_PICKUPS, TBL_PICKUPS, new object[] { pickupDate });
                if (ds != null)
                {
                    pickups.Merge(ds);
                }
            }
            catch (Exception ex) { throw new ApplicationException("Unexpected error while reading pickups.", ex); }
            return(pickups);
        }
Ejemplo n.º 4
0
        public static ISDExportDataset GetPickups(DateTime pickupDate)
        {
            //
            ISDExportDataset       pickups = new ISDExportDataset();
            ISDExportServiceClient client  = new ISDExportServiceClient();

            try {
                DataSet ds = client.GetPickups(int.Parse(Program.TerminalCode), pickupDate);
                if (ds != null)
                {
                    pickups.Merge(ds);
                }
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); }
            catch (FaultException <AgentLineHaulFault> afe) { client.Abort(); throw new ApplicationException(afe.Detail.Message); }
            catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); }
            return(pickups);
        }