コード例 #1
0
        private void PrepareSchedule(ScheduleReportModel ScheduleReportModel)
        {
            IEnumerable <GetPrintScheduleByDID_Result> results = db.GetPrintScheduleByDID(
                Convert.ToInt16(ScheduleReportModel.BranchId),
                Convert.ToInt16(ScheduleReportModel.ClientId),
                Convert.ToInt16(ScheduleReportModel.LoanApplicationId),
                Convert.ToInt16(ScheduleReportModel.DisbursementId),
                Convert.ToInt16(ScheduleReportModel.LoanCycleId));


            List <GetPrintScheduleByDID_Result> resultsFinalList = results.ToList <GetPrintScheduleByDID_Result>();

            GetPrintScheduleByDID_Result row = new GetPrintScheduleByDID_Result();

            foreach (var item in resultsFinalList)
            {
                row = item;

                break;
            }

            PrintCollectionSchedule(resultsFinalList, new ReportBuilderModel {
                ReportHeading = "Collection report", ActualPaid = row.ActualPaidAmount.Value.ToString(), ScheduleDate = row.ScheduleDate.Value.ToShortDateString(), BranchName = row.BranchCode + " / " + row.BranchName
            });
        }
コード例 #2
0
        public ActionResult PrintSchedule(ScheduleReportModel ScheduleReportModel)
        {
            PrepareSchedule(ScheduleReportModel);
            ViewBag.BranchId          = new SelectList(db.Branches, "BranchId", "BranchCode");
            ViewBag.ClientId          = new SelectList(db.Clients, "ClientId", "ClientName");
            ViewBag.LoanApplicationId = new SelectList(db.LoanApplications, "LoanApplicationId", "LoanApplicationNo");
            ViewBag.DisbursementId    = new SelectList(db.LoanDisbursements, "LoanDisbursementId", "DisbursementCode");
            ViewBag.LoanCycleId       = new SelectList(db.LoanCycles, "LoanCycleId", "LoanCycle1");

            return(View(ScheduleReportModel));
        }