Beispiel #1
0
        private void DeleteEntity()
        {
            BufferHours bh = FocusedEntity;

            if (bh == null || SWController == null || EntityStore == null || !CanDeleteEntity())
            {
                return;
            }

            if (QuestionMessageYes(GetLocalized("QuestionDeleteBufferHours")))
            {
                try
                {
                    ClientEnvironment.StoreService.BufferHoursService.DeleteByID(bh.ID);
                    BufferHoursList.RemoveEntityById(bh.ID);
                    UpdateButtonState();
                }
                catch (EntityException)
                {
                    ErrorMessage(GetLocalized("CantDeleteTrendCorrection"), GetLocalized("Attention"));
                    return;
                }
            }
        }