public static string GetResolveBudgetAccountUrl(this ApplyPostingLineViewModel applyPostingLineViewModel, IUrlHelper urlHelper, int accountingNumber)
        {
            NullGuard.NotNull(applyPostingLineViewModel, nameof(applyPostingLineViewModel))
            .NotNull(urlHelper, nameof(urlHelper));

            return(urlHelper.AbsoluteAction("ResolveBudgetAccount", "Accounting", new { accountingNumber, accountNumber = "{accountNumber}", statusDate = "{statusDate}" }));
        }
        public static string GetAddPostingLineToPostingJournalUrl(this ApplyPostingLineViewModel applyPostingLineViewModel, IUrlHelper urlHelper, int accountingNumber)
        {
            NullGuard.NotNull(applyPostingLineViewModel, nameof(applyPostingLineViewModel))
            .NotNull(urlHelper, nameof(urlHelper));

            return(urlHelper.AbsoluteAction("AddPostingLineToPostingJournal", "Accounting", new { accountingNumber }));
        }
        public static string GetRemovePostingLineFromPostingJournalUrl(this ApplyPostingLineViewModel applyPostingLineViewModel, IUrlHelper urlHelper, int accountingNumber)
        {
            NullGuard.NotNull(applyPostingLineViewModel, nameof(applyPostingLineViewModel))
            .NotNull(urlHelper, nameof(urlHelper));

            if (applyPostingLineViewModel.Identifier.HasValue == false)
            {
                return(null);
            }

            return(urlHelper.AbsoluteAction("RemovePostingLineFromPostingJournal", "Accounting", new { accountingNumber, postingLineIdentifier = applyPostingLineViewModel.Identifier.Value }));
        }
        public static string GetRemovePostingLineFromPostingJournalData(this ApplyPostingLineViewModel applyPostingLineViewModel, IHtmlHelper htmlHelper, string postingJournalKey)
        {
            NullGuard.NotNull(applyPostingLineViewModel, nameof(applyPostingLineViewModel))
            .NotNull(htmlHelper, nameof(htmlHelper))
            .NotNullOrWhiteSpace(postingJournalKey, nameof(postingJournalKey));

            StringBuilder removePostingLineFromPostingJournalDataBuilder = new StringBuilder();

            removePostingLineFromPostingJournalDataBuilder.Append("{");
            removePostingLineFromPostingJournalDataBuilder.Append($"postingJournalKey: '{postingJournalKey}', ");
            removePostingLineFromPostingJournalDataBuilder.Append("postingJournalHeader: null, ");
            removePostingLineFromPostingJournalDataBuilder.Append(htmlHelper.AntiForgeryTokenToJsonString());
            removePostingLineFromPostingJournalDataBuilder.Append("}");

            return(removePostingLineFromPostingJournalDataBuilder.ToString());
        }