Example #1
0
        private void btnDeletePolicy_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Удалить полис?", "Удаление", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
            {
                int idPolicy = Convert.ToInt32(_dgvPolicy.Rows[_dgvPolicy.SelectedCells[0].RowIndex].Cells[0].Value);

                policyList.Delete(idPolicy);

                loadPolicy();
            }
        }