Пример #1
0
        public static DeliveryDS GetDelivery(int companyID, int storeNumber, DateTime from, DateTime to, long proID)
        {
            //Get a list of store locations
            DeliveryDS delivery = null;

            try {
                _Client  = new IssueMgtServiceClient();
                delivery = _Client.GetDelivery(companyID, storeNumber, from, to, proID);
                _Client.Close();
            }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetDelivery() timeout error.", te); }
            catch (FaultException fe) { throw new ApplicationException("GetDelivery() service error.", fe); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetDelivery() communication error.", ce); }
            return(delivery);
        }
Пример #2
0
        public DeliveryDS GetDeliveries(int companyID, int storeNumber, DateTime from, DateTime to)
        {
            //Get a list of store locations
            DeliveryDS deliveries = null;

            try {
                deliveries = new DeliveryDS();
                DataSet ds = fillDataset(USP_DELIVERY, TBL_DELIVERY, new object[] { companyID, storeNumber, from, to });
                if (ds.Tables[TBL_DELIVERY].Rows.Count > 0)
                {
                    deliveries.Merge(ds);
                }
            }
            catch (Exception ex) { throw new ApplicationException("Unexpected error while reading deliveries.", ex); }
            return(deliveries);
        }
Пример #3
0
 private void showDeliveryInfo(bool showCartons)
 {
     //Clear and validate
     this.grdDelivery.SelectedObject = null;
     if (this.mIssue != null)
     {
         //Display delivery info
         DeliveryDS delivery = CustomerProxy.GetDelivery(this.mIssue.CompanyID, this.mIssue.StoreNumber, this.mIssue.OFD1FromDate, this.mIssue.OFD1ToDate, this.mIssue.PROID);
         if (delivery.DeliveryTable.Rows.Count > 0)
         {
             this.grdDelivery.SelectedObject = new DeliveryInfo(delivery.DeliveryTable[0]);
         }
         if (showCartons)
         {
             ScanDS osdscans = CustomerProxy.GetOSDScans(this.mIssue.PROID);
             this.oSDScanTableBindingSource.DataSource = osdscans;
             ScanDS podscans = CustomerProxy.GetPODScans(this.mIssue.PROID);
             this.pODScanTableBindingSource.DataSource = podscans;
         }
     }
 }