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; } }
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; } } }