private void DeleteSupplier_Click(object sender, EventArgs e) { //Get the selected value int[] selRow = ((GridView)GcSupplier.MainView).GetSelectedRows(); DataRowView dataRow = (DataRowView)(((GridView)GcSupplier.MainView).GetRow(selRow[0])); string temp = dataRow["SupplierID"].ToString(); int id = int.Parse(temp); //Delete customer supplierBUS.DeleteSupplier(id); MessageBox.Show("Delete Successful!!!", "Succes", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); //this.Close(); Reload(); }