Example #1
0
        public ActionResult ListarDesembolsoJGrid(GridDataRequest request)
        {
            int totalRecords = 0;
            var lstItem      = CajaDiarioBL.LstDesembolsoJGrid(request, ref totalRecords);

            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.CreditoId,
                    cell = new string[] {
                        item.CreditoId.ToString(),
                        item.Persona.Codigo,
                        item.Persona.NombreCompleto,
                        item.MontoCredito.ToString(),
                        item.MontoGastosAdm.ToString(),
                        item.MontoDesembolso.ToString(),
                        item.Estado
                    }
                }
                           ).ToArray()
            };

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