Ejemplo n.º 1
0
        private List <IncomeStatementItem> GetIncomeStatementTransactionalData()
        {
            IncomeStatementSelection selection = (IncomeStatementSelection)Session["IncomeStatementReportSelection"];

            ViewBag.PeriodBegin = selection.PeriodBegin.ToShortDateString();
            ViewBag.PeriodEnd   = selection.PeriodEnd.ToShortDateString();
            foreach (var item in selection.BranchList)
            {
                if (item.Value == selection.Branch)
                {
                    ViewBag.Branch = item.Text;
                }
            }
            ELT.BL.ReportingBL ReportBL = new ELT.BL.ReportingBL();
            if (Session["IncomeStatementReportData"] == null)
            {
                var    user = GetCurrentELTUser();
                string ELT_account_number = user.elt_account_number;
                if (ELT_account_number == null)
                {
                    Response.Redirect("~/Account/Login", true);
                }
                Session["IncomeStatementReportData"]
                    = ReportBL.GetIncomeStatementItem(ELT_account_number, selection);
            }

            var model = (List <IncomeStatementItem>)Session["IncomeStatementReportData"];

            return(model);
        }
Ejemplo n.º 2
0
        private List <TrialBalanceItem> GetTrialBalanceTransactionalData()
        {
            TrialBalanceSelection selection = (TrialBalanceSelection)Session["TrialBalanceReportSelection"];

            ViewBag.AsOf   = selection.PeriodEnd.ToShortDateString();
            ViewBag.Branch = selection.Branch;

            foreach (var item in selection.BranchList)
            {
                if (item.Value == selection.Branch)
                {
                    ViewBag.Branch = item.Text;
                }
            }
            ELT.BL.ReportingBL ReportBL = new ELT.BL.ReportingBL();
            if (Session["TrialBalanceMasterReportData"] == null)
            {
                var    user = GetCurrentELTUser();
                string ELT_account_number = user.elt_account_number;
                if (ELT_account_number == null)
                {
                    Response.Redirect("~/Account/Login", true);
                }
                Session["TrialBalanceMasterReportData"]
                    = ReportBL.GetTrialBalanceItem(ELT_account_number, selection);
            }

            var model       = (List <TrialBalanceItem>)Session["TrialBalanceMasterReportData"];
            var returnvalue = from m in model select m;

            return(model);
        }