Beispiel #1
0
        public wndItems()
        {
            InitializeComponent();

            // get items to populate data grid
            ItemDataGrid.ItemsSource = product.getItems();
        }
        /// <summary>
        /// This method populates the items drop downs
        /// </summary>
        private void popItemLists()
        {
            try
            {
                // items logic get items method
                Items = clsIL.getItems();

                // loop through and populate items in combo box
                foreach (var item in Items)
                {
                    // add item description
                    itemsCb.Items.Add(item.itemDesc);

                    // If the user has selected
                    if (isOkayToEdit)
                    {
                        editItemsCB.Items.Add(item.itemDesc);
                    }
                }
            }
            catch (Exception ex)
            {
                HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name,
                            MethodInfo.GetCurrentMethod().Name, ex.Message);
            }
        }