private void basicProduct_SelectionChanged(object sender, RT2020.Controls.ProductSearcher.Basic.ProductSelectionEventArgs e) { if (!this.ValidSelection) { int iCount = 0; txtDescription.Text = e.Description; txtReplenishQty.Text = "0"; txtActualQty.Text = "0"; foreach (ListViewItem lvItem in lvDetailsList.Items) { lvItem.Selected = false; if (lvItem.SubItems[11].Text.Trim() == e.ProductId.ToString()) { Guid detailId = Guid.Empty; if (Guid.TryParse(lvItem.Text, out detailId)) { if (detailId != Guid.Empty) { if (iCount == 0) { txtReplenishQty.Text = lvItem.SubItems[8].Text; txtActualQty.Text = lvItem.SubItems[9].Text; txtRemarks_Detail.Text = lvItem.SubItems[10].Text; this.ProductId = e.ProductId; this.RplDetailId = detailId; // new Guid(lvItem.Text); this.SelectedIndex = lvItem.Index; lvItem.Selected = true; iCount++; } } } } } } }
private void basicProduct_SelectionChanged(object sender, RT2020.Controls.ProductSearcher.Basic.ProductSelectionEventArgs e) { if (!this.ValidSelection) { int iCount = 0; txtDescription.Text = e.Description; txtUnitPrice.Text = e.UnitPrice.ToString("n2"); txtUnitAmount.Text = e.UnitPrice.ToString("n2"); foreach (ListViewItem lvItem in lvDetailsList.Items) { lvItem.Selected = false; if (lvItem.SubItems[11].Text == e.ProductId.ToString()) { Guid id = Guid.Empty; if (Guid.TryParse(lvItem.Text, out id)) { if (id != Guid.Empty) { if (iCount == 0) { txtQty.Text = lvItem.SubItems[8].Text; this.ProductId = e.ProductId; this.REJDetailId = id; // new Guid(lvItem.Text); this.SelectedIndex = lvItem.Index; lvItem.Selected = true; } iCount++; } } } } } }
private void basicProduct_SelectionChanged(object sender, RT2020.Controls.ProductSearcher.Basic.ProductSelectionEventArgs e) { txtDescription.Text = e.Description; }