private void toolBar_btnApprove_Click(object sender) { item_inventory item_inventory = (item_inventory)item_inventoryDataGrid.SelectedItem; item_inventory.id_branch = (int)cbxBranch.SelectedValue; if (InventoryDB.Approve()) { toolBar.msgApproved(InventoryDB.NumberOfRecords); } }