private async void Init() { IsReportLoaded = true; report = new TrialBalanceReport(); LedgerAccounts = new ObservableCollection <LedgerAccount>(await Service.GetAllLedgerAccountsAsync()); Ledgergenerals = new ObservableCollection <LedgerGeneral>(await Service.GetAllLedgerGeneralsAsync()); }
private TrialBalanceReport CreateTrialBalanceReport(long sobId, long fromCodeCombinationId, long toCodeCombinationId, long periodId) { List <TrialBalanceModel> modelList = mapTrialBalanceModel(service.TrialBalance(AuthenticationHelper.User.CompanyId, sobId, fromCodeCombinationId >= toCodeCombinationId ? toCodeCombinationId : fromCodeCombinationId, toCodeCombinationId <= fromCodeCombinationId ? fromCodeCombinationId : toCodeCombinationId, periodId)); TrialBalanceReport report = new TrialBalanceReport(); report.Parameters["CompanyName"].Value = companyService .GetSingle(AuthenticationHelper.User.CompanyId.ToString(), AuthenticationHelper.User.CompanyId).Name; report.Parameters["SOBId"].Value = sobId; report.Parameters["FromCodeCombinationId"].Value = fromCodeCombinationId; report.Parameters["ToCodeCombinationId"].Value = toCodeCombinationId; report.Parameters["PeriodId"].Value = periodId; report.DataSource = modelList; return(report); }