private void OnTabSelected(object sender, TabControlEventArgs e) { //Event handler for change in tab selection this.Cursor = Cursors.WaitCursor; try { if (this.mIssue == null) { return; } switch (e.TabPage.Name) { case "tabDetail": break; case "tabOSD": ScanDS osdscans = CustomerProxy.GetOSDScans(this.mIssue.PROID); this.oSDScanTableBindingSource.DataSource = osdscans; if (this.grdPOD.Selected.Rows.Count > 0) { long id = Convert.ToInt64(this.grdPOD.Selected.Rows[0].Cells["LabelSequenceNumber"].Value); for (int i = 0; i < this.grdOSD.Rows.Count; i++) { if (Convert.ToInt64(this.grdOSD.Rows[i].Cells["LabelSequenceNumber"].Value) == id) { this.grdOSD.Rows[0].Selected = true; break; } } } break; case "tabPOD": ScanDS podscans = CustomerProxy.GetPODScans(this.mIssue.PROID); this.pODScanTableBindingSource.DataSource = podscans; if (this.grdOSD.Selected.Rows.Count > 0) { long id = Convert.ToInt64(this.grdOSD.Selected.Rows[0].Cells["LabelSequenceNumber"].Value); for (int i = 0; i < this.grdPOD.Rows.Count; i++) { if (Convert.ToInt64(this.grdPOD.Rows[i].Cells["LabelSequenceNumber"].Value) == id) { this.grdPOD.Rows[0].Selected = true; break; } } } break; } } catch (Exception ex) { reportError(ex); } finally { setUserServices(); this.Cursor = Cursors.Default; } }
public static ScanDS GetPODScans(long cProID) { //Get a list of store locations ScanDS scans = null; try { _Client = new IssueMgtServiceClient(); scans = _Client.GetPODScans(cProID); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetPODScans() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetPODScans() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetPODScans() communication error.", ce); } return(scans); }
public ScanDS GetPODScans(long cProID) { //Get a list of store locations ScanDS scans = null; try { scans = new ScanDS(); DataSet ds = fillDataset(USP_PODSCANS, TBL_PODSCANS, new object[] { cProID }); if (ds.Tables[TBL_PODSCANS].Rows.Count > 0) { scans.Merge(ds); } } catch (Exception ex) { throw new ApplicationException("Unexpected error while reading POD scans.", ex); } return(scans); }
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; } } }