private void btnAddNew_Click(object sender, EventArgs e) { var frmProduct = new FormProductMaintenance(); var result = frmProduct.ShowDialog(); if (result == DialogResult.OK) { LoadContent(); } }
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(); } }