Exemplo n.º 1
0
        protected virtual void Init(Program p, IAccountingService accounting)
        {
            base.Init(p);
            Content  = ContentEditModel.FromDomain(p.Content);
            Issuance = IssuanceEditModel.FromDomain(p.Issuance);
            if (Issuance.Type == IssuanceType.ProgramBudget &&
                !String.IsNullOrEmpty(p.Issuance.Account))
            {
                var a = accounting.GetProgramAwardSource(p, null);
                if (null != a)
                {
                    Issuance.Ledger = accounting.GetLedger(a);
                    Issuance.Budget = BudgetEditModel.FromDomain(a.Budget);
                }
            }

            Title = p.Title;
        }
Exemplo n.º 2
0
        protected virtual void Init(Program p, IAccountingService accounting)
        {
            base.Init(p);
            Content = ContentEditModel.FromDomain(p.Content);
            Issuance = IssuanceEditModel.FromDomain(p.Issuance);
            if (Issuance.Type == IssuanceType.ProgramBudget &&
                !String.IsNullOrEmpty(p.Issuance.Account))
            {
                var a = accounting.GetProgramAwardSource(p, null);
                if (null != a)
                {
                    Issuance.Ledger = accounting.GetLedger(a);
                    Issuance.Budget = BudgetEditModel.FromDomain(a.Budget);
                }
            }

            Title = p.Title;
        }