コード例 #1
0
        private void btnAddCategory_Click(object sender, EventArgs e)
        {
            var frm = new CategoryProcessing(-1);

            frm.ShowDialog(this);
            if (frm.IsChange)
            {
                FillData2CategoryGrid();
            }
        }
コード例 #2
0
 private void dgvCategory_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgvCategory.Columns[e.ColumnIndex].Name == "edit")
     {
         var categoryId = GetSelectedCategoryId();
         var form       = new CategoryProcessing(categoryId);
         form.ShowDialog(this);
         if (form.IsChange)
         {
             FillData2CategoryGrid();
         }
     }
 }