예제 #1
0
        private void BtnCategoryAdd_Click(object sender, RoutedEventArgs e)
        {
            CategoryForm frmCategory = new CategoryForm(true);

            this.Hide();
            frmCategory.ShowDialog();
            this.Show();
        }
예제 #2
0
        private void menu_strip_add_category_Click(object sender, EventArgs e)
        {
            CategoryForm form_Category = new CategoryForm();

            form_Category.ShowDialog();
            categoryListOnInterface();
            tableListOnInterface();
            foodStuffListOnInterface();
        }
예제 #3
0
        private void BtnCategoryEdit_Click(object sender, RoutedEventArgs e)
        {
            if (ProductState.categoryId == -1)
            {
                MessageBox.Show("Vui lòng chọn danh mục để chỉnh sửa!");
                return;
            }
            CategoryForm frmCategory = new CategoryForm(false);

            this.Hide();
            frmCategory.ShowDialog();
            if (frmCategory.isSuccess == true)
            {
                evenHandler?.Invoke(ActionCategory.Update, null);
            }
            this.Show();
        }
예제 #4
0
    private void listCategories_MouseDoubleClick(object sender, MouseEventArgs e)
    {
      // get the category.
      var category = GetSelectedCategory();
      if (null == category)
      {
        return;
      }

      // make a new category.
      var categoryForm = new CategoryForm(_engine, GetSelectedCategory() );

      // load the dialog box.
      if (categoryForm.ShowDialog() != DialogResult.OK)
      {
        return;
      }

      // reload all the categories.
      _categories.ReloadCategories();

      // reload everything
      ReloadCategories();
    }
예제 #5
0
    private void Edit_Click(object sender, EventArgs e)
    {
      // make a new category.
      var category = new CategoryForm(_engine, GetSelectedCategory());

      // load the dialog box.
      if (category.ShowDialog() != DialogResult.OK)
      {
        return;
      }

      // reload all the categories.
      _categories.ReloadCategories();

      // reload everything
      ReloadCategories();
    }
예제 #6
0
        private void добавить атегориюToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CategoryForm categoryForm = new CategoryForm();

            categoryForm.ShowDialog();
        }