예제 #1
0
        /// <summary>
        /// Удаляет выбранный чек
        /// </summary>
        private void DeleteCheck()
        {
            object item;

            if (listViewMaintenanceChecks.SelectedItems.Count > 0)
            {
                item = listViewMaintenanceChecks.SelectedItems[0].Tag;
            }
            else
            {
                return;
            }

            if (MessageBox.Show("Do you really want to delete selected item?", "", MessageBoxButtons.YesNo) ==
                DialogResult.No)
            {
                return;
            }

            GlobalObjects.CasEnvironment.Manipulator.Delete((MaintenanceCheck)item);
            _maintenanceChecks.Remove(((MaintenanceCheck)item));
        }