public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<Lote> result = LoteService.ReadLote(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.Identificador, p.FechaProduccion.ToShortDateString(), p.Producto.Nombre, p.Producto.MedidaDiametro.ValorIn.ToString(), p.Linea.Nombre, p.Id.ToString() }
                    }).ToArray()
            };

            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<SystemLog> result = SystemLogService.ReadLog(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.Usuario.Nombre, p.Accion, p.Modulo, p.Date.ToShortDateString(),  p.Id.ToString() }
                    }).ToArray()
            };

            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
Beispiel #3
0
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<Person> result = PersonService.ReadPerson(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.Firstname, p.Lastname, p.Email, p.Telephone, p.CreatedDate.ToString(), p.Id.ToString() }
                    }).ToArray()

            };
            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<Equipo> result = EquipoService.ReadEquipo(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    where p.Activo
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.Serie, p.Marca, p.Modelo, p.Descripcion, p.Id.ToString() }
                    }).ToArray()
            };

            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
        public ActionResult GetDetalle(GridSettingsWeb grid, long id)
        {
            GridResult<Resultado> result = ResultadoService.ReadResultado(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    where p.LoteId == id
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.LoteId.ToString(),  p.NormaUM, p.ResultadoValor.ToString(), (p.Aprobado == 1 ? "Aprobado" : "Rechazado"), p.Id.ToString() }
                    }).ToArray()
            };

            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<Lote> result = LoteService.ReadLote(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    where p.Aprobado == true
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.Identificador, p.Producto.Codigo, p.Linea.Planta.NombrePlanta, p.Linea.Nombre, p.Turno.NombreTurno, p.FechaProduccion.ToShortDateString(),
                        p.CantidadProducida.ToString(), (p.Aprobado == true ? "Aprobado" : "Rechazado"), p.Id.ToString() }
                    }).ToArray()
            };

            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<TipoProducto> result = TipoProductoService.ReadTipoProducto(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.Nombre, p.Descripcion, p.Id.ToString() }
                    }).ToArray()
            };

            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
Beispiel #8
0
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<Usuario> result = UsuarioService.ReadUsuario(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    select new
                    {
                        id = p.Id,
                        //cell = new string[] { p.Nombre, p.Username, p.puesto, p.Planta.NombrePlanta, p.Perfil.Nombre, p.Id.ToString() }
                        cell = new string[] { p.Nombre, p.Username, p.Puesto, p.Planta.NombrePlanta, p.Id.ToString() }
                    }).ToArray()
            };
            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<Producto> result = ProductoService.ReadProducto(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                from p in result.Rows
                where p.Activo
                select new
                {
                    id = p.Id,
                    cell = new string[] { p.Codigo, p.Nombre, p.Descripcion, p.MedidaDiametro.ValorIn.ToString(), p.Id.ToString() }
                }).ToArray()
            };
            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<Calibracion> result = CalibracionService.ReadCalibracion(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    where p.Activo == true
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.NoInformeCalib.ToString(), p.Equipo.CodigoActivoFijo, p.FechaCalibracion.ToShortDateString(), p.FechaVencimiento.ToShortDateString(), p.PDFInforme, p.Id.ToString() }
                    }).ToArray()
            };

            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
Beispiel #11
0
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<Color> result = ColorService.ReadColor(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    where p.Activo == true
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.Codigo, p.Nombre, p.Tipo, p.Id.ToString() }
                    }).ToArray()
            };

            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<Proveedor> result = ProveedorService.ReadProveedor(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.Nombre, p.RFC, p.Giro, p.Direccion, p.Ciudad, p.Estado, p.CorreoContacto, p.Id.ToString() }
                    }).ToArray()
            };

            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
Beispiel #13
0
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<Linea> result = LineaService.ReadLinea(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    where p.Activo
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.Nombre, p.Descripcion, p.Planta.NombrePlanta, p.Id.ToString() }
                    }).ToArray()
            };

            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
Beispiel #14
0
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<Planta> result = PlantaService.ReadPlanta(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    where p.Activo == true
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.NombrePlanta, p.Ciudad, p.Estado, p.RFC, p.Id.ToString() }
                    }).ToArray()
            };

            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<Especificacion> result = EspecificacionService.ReadEspecificacion(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.Producto.Codigo, p.Norma.Nombre, p.NormaEnsayo.Nombre, p.Ensayo.Nombre,  p.Minimo.ToString(), p.Maximo.ToString(), p.Objetivo.ToString(), p.Id.ToString() }
                    }).ToArray()
            };

            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
        public ActionResult GetList(GridSettingsWeb grid)
        {
            GridResult<Lote> result = LoteService.ReadLote(grid);

            var jsonData = new
            {
                total = result.TotalPages,
                result.PageIndex,
                records = result.TotalRecords,
                rows = (
                    from p in result.Rows
                    where p.Aprobado == true && p.Activo == true
                    select new
                    {
                        id = p.Id,
                        cell = new string[] { p.Identificador, p.Producto.Codigo, p.Linea.Nombre, p.Turno.NombreTurno, p.FechaProduccion.ToShortDateString(),
                        p.CantidadProducida.ToString(), (p.Aprobado == true ? "Aprobado" : "Rechazado"), p.Id.ToString() }
                    }).ToArray()
            };
            //GridResult<Resultado> result = ResultadoService.ReadResultado(grid);

            //var jsonData = new
            //{
            //    total = result.TotalPages,
            //    result.PageIndex,
            //    records = result.TotalRecords,
            //    rows = (
            //        from p in result.Rows
            //        select new
            //        {
            //            id = p.Id,
            //            //cell = new string[] { p.EnviadoLapem.ToString(), p.ProductoDesc, p.NormaId.ToString(), p.NormaUM, p.NormaVMin.ToString(), p.NormaVMax.ToString() }
            //            cell = new string[] { p.NormaUM, p.NormaVMin.ToString(), p.NormaVMax.ToString() }
            //        }).ToArray()
            //};

            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }