public SubsidiaryLedgerDto GetSubsidiaryLedger(string subsidiaryLedgerUID)
        {
            Assertion.AssertObject(subsidiaryLedgerUID, "subsidiaryLedgerUID");

            var subsidiaryLedger = SubsidiaryLedger.Parse(subsidiaryLedgerUID);

            return(SubsidiaryLedgerMapper.Map(subsidiaryLedger));
        }
 static internal SubsidiaryLedgerDto Map(SubsidiaryLedger subsidiaryLedger)
 {
     return(new SubsidiaryLedgerDto {
         UID = subsidiaryLedger.UID,
         TypeName = subsidiaryLedger.SubsidiaryLedgerType.Name,
         Name = subsidiaryLedger.Name,
         Description = subsidiaryLedger.Description,
         AccountsPrefix = subsidiaryLedger.AccountsPrefix,
         BaseLedger = subsidiaryLedger.BaseLedger.MapToNamedEntity()
     });
 }
        public SubsidiaryAccountDto GetSubsidiaryAccount(string subsidiaryLedgerUID,
                                                         int subsidiaryAccountId)
        {
            Assertion.AssertObject(subsidiaryLedgerUID, "subsidiaryLedgerUID");
            Assertion.Assert(subsidiaryAccountId > 0, "subsidiaryAccountId");

            var subsidiaryLedger = SubsidiaryLedger.Parse(subsidiaryLedgerUID);

            SubsidiaryAccount subsidiaryAccount = subsidiaryLedger.GetAccountWithId(subsidiaryAccountId);

            return(SubsidiaryLedgerMapper.MapAccount(subsidiaryAccount));
        }