コード例 #1
0
        private void btDepartmentDelete_Click(object sender, EventArgs e)
        {
            switch (MessageBox.Show("Удаление специальности", "Удалить специальность " + mtbDepartmentNumber.Text + " " + tbDepartmentName.Name + "?", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
            {
            case DialogResult.Yes:
                procedure.spDepartment_Delete(Convert.ToInt32(dgvDepartment.CurrentRow.Cells[0].Value.ToString()));
                break;

            case DialogResult.No:
                break;
            }
        }