private static string GetBudgetObjectCodeFmsYearAsString(ProjectFirmaModels.Models.BudgetObjectCode budgetObjectCode)
 {
     if (budgetObjectCode == null)
     {
         return(UnknownString);
     }
     return(budgetObjectCode.FbmsYear.ToString());
 }
 private static HtmlString MakeBudgetObjectCodeHrefString(ProjectFirmaModels.Models.BudgetObjectCode budgetObjectCode)
 {
     if (budgetObjectCode == null)
     {
         // We don't know what Budget Code to assign for this in the Publishing Processing, so we have to punt here.
         return(new HtmlString(UnknownString));
     }
     return(UrlTemplate.MakeHrefString(budgetObjectCode.GetDetailUrl(), budgetObjectCode.GetDisplayName()));
 }
Beispiel #3
0
        /*
         * public ObligationItemBudgetGridSpec ObligationItemBudgetGridSpec { get; }
         * public string ObligationItemBudgetGridName { get; }
         * public string ObligationItemBudgetGridDataUrl { get; }
         */

        public BudgetObjectCodeDetailViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.BudgetObjectCode budgetObjectCode) : base(currentFirmaSession)
        {
            PageTitle  = $"Budget Object Code: {budgetObjectCode.GetDisplayName()}";
            EntityName = "Budget Object Code Detail";

            BudgetObjectCode         = budgetObjectCode;
            BudgetObjectCodeIndexUrl = SitkaRoute <BudgetObjectCodeController> .BuildUrlFromExpression(c => c.BudgetObjectCodeIndex());

            ContractualInvoiceGridName        = "budgetObjectCodeItemInvoices";
            ContractualInvoiceGridSpec        = new ContractualInvoiceGridSpec(currentFirmaSession);
            ContractualItemInvoiceGridDataUrl = SitkaRoute <BudgetObjectCodeController> .BuildUrlFromExpression(fc => fc.ContractualInvoiceGridOnBudgetObjectCodeDetailJsonData(budgetObjectCode));

            //ObligationItemBudgetGridName = "budgetObjectCodeItemBudgets";
            //ObligationItemBudgetGridSpec = new ObligationItemBudgetGridSpec(currentFirmaSession);
            //ObligationItemBudgetGridDataUrl = SitkaRoute<BudgetObjectCodeController>.BuildUrlFromExpression(fc => fc.ObligationItemBudgetGridOnBudgetObjectCodeDetailJsonData(budgetObjectCode));
        }
Beispiel #4
0
 public static void DeleteBudgetObjectCode(this IQueryable <BudgetObjectCode> budgetObjectCodes, BudgetObjectCode budgetObjectCodeToDelete)
 {
     DeleteBudgetObjectCode(budgetObjectCodes, new List <BudgetObjectCode> {
         budgetObjectCodeToDelete
     });
 }