コード例 #1
0
        private void buttonNew_Click(object sender, EventArgs e)
        {
            CategoryCard categoryCard = new CategoryCard();
            Category     category     = new Category();

            categoryCard.SetParameters(true, category);
            categoryCard.ShowDialog();
            InsertDataIntoTable();
        }
コード例 #2
0
 private void buttonOpen_Click(object sender, EventArgs e)
 {
     if (categoriesTable.SelectedRows.Count > 0)
     {
         int      id       = Convert.ToInt32(categoriesTable.SelectedRows[0].Cells["Id"].Value.ToString());
         Category category = new Category();
         category = categoryRepositoryBus.GetCategoryById(id);
         CategoryCard categoryCard = new CategoryCard();
         categoryCard.SetParameters(false, category);
         categoryCard.ShowDialog();
         InsertDataIntoTable();
     }
 }