private void SaveAlarm() { this.Item.EndEdit(); if (this.operation == Utils.Operation.Add) { ((AlarmsDTO)Item).Id = settingsService.AlarmCreate((AlarmsDTO)Item); } else { settingsService.AlarmUpdate((AlarmsDTO)Item); } }