Example #1
0
 private void btn_addToGroup_Click(object sender, EventArgs e)
 {
     if (_selectedProductGroup != null && _selectedProduct != null && !_selectedProductGroup.ProductUIDs.Contains(_selectedProduct.UID))
     {
         _selectedProductGroup.ProductUIDs.Add(_selectedProduct.UID);
         ClsDataManager.SetProductGroup(_selectedProductGroup);
         updateProductGroupProducts();
     }
 }
Example #2
0
 private void btn_removeFromGroup_Click(object sender, EventArgs e)
 {
     if (_selectedProductGroup != null && _selectedProductGroupProductUID != null)
     {
         _selectedProductGroup.ProductUIDs.Remove(_selectedProductGroupProductUID);
         ClsDataManager.SetProductGroup(_selectedProductGroup);
         updateProductGroupProducts();
     }
 }
Example #3
0
        private void btn_newProductGroup_Click(object sender, EventArgs e)
        {
            if (txt_newGroupName.TextLength < 2)
            {
                MessageBox.Show("New Group Name should be atleast two characters long", "Invalid Input");
                return;
            }
            ClsProductGroup newProductGroup = new ClsProductGroup(txt_newGroupName.Text);

            ClsDataManager.SetProductGroup(newProductGroup);
            _selectedProductGroup = newProductGroup;
            updateDisplay();
        }