private void OpenCategory() { try { if (grdCategories.SelectedRows.Count == 0) { throw new Exception("No Category Selected"); } else { DataGridViewRow row = this.grdCategories.SelectedRows[0]; clsCategory lcCategory = row.DataBoundItem as clsCategory; if (lcCategory != null) { frmCategory.Run(lcCategory.ID); updateDisplayFromDB(); //Update the screen to reflect the changes } else { throw new Exception("Error! Null Category"); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void SetDetails(clsCategory prCategory) { _Category = prCategory; updateDisplay(); }