Beispiel #1
0
        private async void OnSave()
        {
            var editingSLStandardDescription = Mapper.Map <EditableSLStandardDescription, SLStandardDescription>(SLStandardDescription);

            try
            {
                if (EditMode)
                {
                    await _sLStandardDescriptionsService.UpdateSLStandardDescriptionAsync(editingSLStandardDescription);
                }
                else
                {
                    await _sLStandardDescriptionsService.AddSLStandardDescriptionAsync(editingSLStandardDescription);
                }
                Done?.Invoke();
            }
            catch (Exception ex)
            {
                Failed?.Invoke(ex);
            }
            finally
            {
                SLStandardDescription = null;
            }
        }
Beispiel #2
0
 public void SetSLStandardDescription(SLStandardDescription sLStandardDescription)
 {
     SLStandardDescription = Mapper.Map <SLStandardDescription, EditableSLStandardDescription>(sLStandardDescription);
     SLStandardDescription.ErrorsChanged += RaiseCanExecuteChanged;
 }