public SowListViewModel(ISowService pSowService)
        {
            try
            {
                _sowService = pSowService;

                _currentCompanyId = GlobalSetting.Instance != null ? GlobalSetting.Instance.CurrentCompanyId : -1;

                SelectedSowCommand = new Command <SowDto>(async s => await SelectedSowAsync(s));
            }
            catch (Exception ex)
            {
                var viewModelName = this.GetType().FullName;
                var methodName    = nameof(SowListViewModel);
                var exMessage     = ex.InnerException == null?string.Format($"ErrorMessage: {ex.Message}") :
                                        string.Format($"ErrorMessage: {ex.Message}, InnerException Message: {ex.InnerException.Message}");

                NavigationService.DisplayAlert(AppResources.ErrorOccured,
                                               new ViewModelMethodExecutionException(viewModelName, methodName, exMessage).Message, "Ok");
                throw ex;
            }
        }
Beispiel #2
0
 public SowController(ISowService sowService) => _sowService = sowService;
Beispiel #3
0
 public SowController(ISowService sowService, IAttachmentService attachmentService)
 {
     _sowService        = sowService;
     _attachmentService = attachmentService;
 }