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; } }
public SowController(ISowService sowService) => _sowService = sowService;
public SowController(ISowService sowService, IAttachmentService attachmentService) { _sowService = sowService; _attachmentService = attachmentService; }