Ejemplo n.º 1
0
        private void buttonRemove_Click(object sender, EventArgs e)
        {
            if (dataGridViewNameOfCompanies.SelectedRows.Count > 0)
            {
                int id = int.Parse(dataGridViewNameOfCompanies.SelectedRows[0].Cells[0].Value.ToString());
                var directoryCompany = _qt.GetDirectoryCompany(id);

                if (IsValidateRemove(directoryCompany))
                {
                    _qt.RemoveDirectoryCompany(directoryCompany);

                    _qt.Save();

                    FormFill();
                }
            }
        }