Exemplo n.º 1
0
        //Controls
        private void btn_save_Click(object sender, EventArgs e)
        {
            ClsNotice newNotice = new ClsNotice(txt_noticeText.Text);

            ClsDataManager.SetNotice(newNotice);
            updateDisplay();
        }
Exemplo n.º 2
0
 private void btn_editProduct_Click(object sender, EventArgs e)
 {
     if (_selectedProduct != null && _editProductForm.ShowDialog(_selectedProduct))
     {
         _selectedProduct.UpdateLastModified();
         ClsDataManager.SetProduct(_selectedProduct);
     }
 }
Exemplo n.º 3
0
 private void btn_deleteProductGroup_Click(object sender, EventArgs e)
 {
     if (_selectedProductGroup != null)
     {
         ClsDataManager.DeleteProductGroup(_selectedProductGroup);
         updateDisplay();
     }
 }
Exemplo n.º 4
0
 private void btn_delete_Click(object sender, EventArgs e)
 {
     if (_selectedNotice != null)
     {
         ClsDataManager.DeleteNotice(_selectedNotice);
         updateDisplay();
     }
 }
Exemplo n.º 5
0
        private async void frm_home_Load(object sender, EventArgs e)
        {
            SetControl(false);
            await ClsDataManager.GetAllData();

            SetControl(true);
            lbl_dbConnection.Text = "Retreived all data from Database";
        }
Exemplo n.º 6
0
 private void btn_removeFromGroup_Click(object sender, EventArgs e)
 {
     if (_selectedProductGroup != null && _selectedProductGroupProductUID != null)
     {
         _selectedProductGroup.ProductUIDs.Remove(_selectedProductGroupProductUID);
         ClsDataManager.SetProductGroup(_selectedProductGroup);
         updateProductGroupProducts();
     }
 }
Exemplo n.º 7
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();
     }
 }
Exemplo n.º 8
0
        private void btn_newProduct_Click(object sender, EventArgs e)
        {
            ClsProduct newProduct = new ClsProduct();

            if (newProduct != null && _editProductForm.ShowDialog(newProduct))
            {
                newProduct.UpdateLastModified();
                ClsDataManager.SetProduct(newProduct);
                updateDisplay();
            }
        }
Exemplo n.º 9
0
 private void btn_deleteSale_Click(object sender, EventArgs e)
 {
     if (_selectedSale != null)
     {
         var confirmResult = MessageBox.Show("Delete selected Sale?", "Confirm Deletion", MessageBoxButtons.YesNo);
         if (confirmResult == DialogResult.Yes)
         {
             ClsDataManager.DeleteSale(_selectedSale);
             updateDisplay();
         }
     }
 }
Exemplo n.º 10
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();
        }