Example #1
0
        public ActionResult ListarCuentasxCobrarJGrid(GridDataRequest request)
        {
            int totalRecords = 0;
            var lstItem      = CajaDiarioBL.LstCuentasxCobrarJGrid(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.Id,
                    cell = new string[] {
                        item.OrdenVentaId.ToString(),
                        item.CuentaxCobrarId.ToString(),
                        item.Oficina,
                        ObtenerOp(item.Operacion),
                        item.Origen,
                        item.Monto.ToString(),
                        item.Estado,
                        item.FechaReg.ToString()
                    }
                }
                           ).ToArray()
            };

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