Exemple #1
0
        private void CompanyNamedataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            //if (CompanyNamedataGridView.Columns[e.ColumnIndex].Name == "Delete")
            //{
            //    if (MessageBox.Show("Are you sure want to delete this record ?", "Message", MessageBoxButtons.YesNo,
            //            MessageBoxIcon.Question) == DialogResult.Yes)
            //        companyClassBindingSource.RemoveCurrent();
            //}

            rowId = e.RowIndex;
            bool delete = _companyManager.DeleteDataSource();

            if (delete)
            {
                MessageBox.Show("Delete Successfully");
            }
        }