public static string GetCreateContactAccountUrl(this AccountingIdentificationViewModel accountingIdentificationViewModel, IUrlHelper urlHelper)
        {
            NullGuard.NotNull(accountingIdentificationViewModel, nameof(accountingIdentificationViewModel))
            .NotNull(urlHelper, nameof(urlHelper));

            return(urlHelper.AbsoluteAction("CreateContactAccount", "Accounting", new { accountingNumber = accountingIdentificationViewModel.AccountingNumber }));
        }
        public static string GetStartLoadingAccountingUrl(this AccountingIdentificationViewModel accountingIdentificationViewModel, IUrlHelper urlHelper)
        {
            NullGuard.NotNull(accountingIdentificationViewModel, nameof(accountingIdentificationViewModel))
            .NotNull(urlHelper, nameof(urlHelper));

            return(urlHelper.AbsoluteAction("StartLoadingAccounting", "Accounting", new { accountingIdentificationViewModel.AccountingNumber }));
        }
        public static string GetDeletionData(this AccountingIdentificationViewModel accountingIdentificationViewModel, IHtmlHelper htmlHelper)
        {
            NullGuard.NotNull(accountingIdentificationViewModel, nameof(accountingIdentificationViewModel))
            .NotNull(htmlHelper, nameof(htmlHelper));

            return('{' + $"accountingNumber: '{accountingIdentificationViewModel.AccountingNumber}', {htmlHelper.AntiForgeryTokenToJsonString()}" + '}');
        }
        public static string GetDeletionUrl(this AccountingIdentificationViewModel accountingIdentificationViewModel, IUrlHelper urlHelper)
        {
            NullGuard.NotNull(accountingIdentificationViewModel, nameof(accountingIdentificationViewModel))
            .NotNull(urlHelper, nameof(urlHelper));

            return(urlHelper.AbsoluteAction("DeleteAccounting", "Accounting"));
        }
        public static string GetStartLoadingAccountingUrlForDefaultAccountingNumber(this AccountingOptionsViewModel accountingOptionsViewModel, IUrlHelper urlHelper)
        {
            NullGuard.NotNull(accountingOptionsViewModel, nameof(accountingOptionsViewModel))
            .NotNull(urlHelper, nameof(urlHelper));

            if (accountingOptionsViewModel.DefaultAccountingNumber.HasValue == false)
            {
                return(null);
            }

            AccountingIdentificationViewModel accountingIdentificationViewModel = new AccountingIdentificationViewModel
            {
                AccountingNumber = accountingOptionsViewModel.DefaultAccountingNumber.Value
            };

            return(accountingIdentificationViewModel.GetStartLoadingAccountingUrl(urlHelper));
        }
        public static string GetActionText(this AccountingIdentificationViewModel accountingIdentificationViewModel)
        {
            NullGuard.NotNull(accountingIdentificationViewModel, nameof(accountingIdentificationViewModel));

            return(accountingIdentificationViewModel.EditMode == EditMode.Create ? "Opret" : "Opdatér");
        }