Exemple #1
0
        private void GetSubGroup()
        {
            List <string> tempList = ListProducts.Select(x => x.ProductGroup).OrderBy(x => x).ToList();

            tempList = tempList.Distinct().ToList();
            SubGroup = tempList.Where(s => s.Substring(0, 2).Contains(SelectedMainGroup)).ToList();
            SubGroup = SubGroup.Select(x => x.Substring(3)).ToList();
            NotifyPropertyChanged("");
        }
        private void btnDell_Click(object sender, EventArgs e)
        {
            var element = ListProducts.SelectedItems[0];

            if (element == null)
            {
                return;
            }

            Presenter.DeleteProduct(int.Parse(element.Tag.ToString()));
            ListProducts.Select();
        }
        private void EditProduct()
        {
            var element = ListProducts.SelectedItems[0];

            if (element == null)
            {
                return;
            }

            Presenter.EditProduct(int.Parse(element.Tag.ToString()));
            ListProducts.Select();
        }
Exemple #4
0
 private void GetProductGroups()
 {
     MainGroup = ListProducts.Select(x => x.ProductGroup.Substring(0, 2)).OrderBy(x => x).ToList();
     MainGroup = MainGroup.Distinct().ToList();
 }
 private void btnNew_Click(object sender, EventArgs e)
 {
     Presenter.CreateProduct();
     ListProducts.Select();
 }