Example #1
0
        public ActionResult ListarCreditoPendienteGrd(GridDataRequest request)
        {
            int totalRecords = 0;
            var lstGrd       = CajaDiarioBL.LstCreditoPendienteJGrid(request, ref totalRecords);

            var productsData = new
            {
                total   = (int)Math.Ceiling((float)totalRecords / (float)request.rows),
                page    = request.page,
                records = totalRecords,
                rows    = (from item in lstGrd
                           select new
                {
                    id = item.CreditoId,
                    cell = new string[] {
                        item.CreditoId.ToString(),
                        item.Codigo,
                        item.Cliente,
                        item.MontoCredito.ToString(),
                        item.PersonaId.ToString()
                    }
                }
                           ).ToArray()
            };

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