Example #1
0
        public ActionResult ListarCuotasPendientesJGrid(GridDataRequest request)
        {
            int totalRecords = 0; string totales = string.Empty;
            var lstItem = CajaDiarioBL.LstCuotasPendientesJGrid(request, ref totalRecords, ref totales);

            VendixGlobal <string> .Crear("TotalesCuotasPendientes", totales);

            var data = new
            {
                total   = (int)Math.Ceiling((float)totalRecords / (float)request.rows),
                page    = request.page,
                records = totalRecords,
                rows    = (from item in lstItem
                           select new
                {
                    id = item.PlanPagoId,
                    cell = new string[] {
                        item.PlanPagoId.ToString(),
                        item.Glosa,
                        item.FechaVencimiento.ToShortDateString(),
                        item.Amortizacion.ToString(),
                        item.Interes.ToString(),
                        item.GastosAdm.ToString(),
                        item.Cuota.ToString(),
                        item.DiasAtrazo.ToString(),
                        item.ImporteMora.ToString(),
                        item.InteresMora.ToString(),
                        item.PagoLibre.ToString(),
                        item.PagoCuota.ToString()
                    }
                }
                           ).ToArray()
            };

            return(Json(data, JsonRequestBehavior.AllowGet));
        }