예제 #1
0
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            var frmProduct = new FormProductMaintenance();
            var result     = frmProduct.ShowDialog();

            if (result == DialogResult.OK)
            {
                LoadContent();
            }
        }
예제 #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            int id      = (int)ProductList.CurrentRow.Cells[0].Value;
            var product = PrdApi.ProductList.FirstOrDefault(t => t.Id == id);

            var frmProduct = new FormProductMaintenance(product);
            var result     = frmProduct.ShowDialog();

            if (result == DialogResult.OK)
            {
                LoadContent();
            }
        }