Beispiel #1
0
        public JsonResult ReadAllServidoresSde(int ClienteId)
        {
            ClienteDAO           clienteDAO = new ClienteDAO();
            IQueryable <Cliente> clientes   = clienteDAO.GetServidoresSde(ClienteId);

            DataTableParser <Sde> dtParser = new DataTableParser <Sde>(Request, clientes.SingleOrDefault().ServidoresSde.AsQueryable().Select(
                                                                           /*Definindo os campos que serao apresentandos, alem de eliminar os atributos circular*/
                                                                           s => new Sde()
            {
                ArcgisVersion = s.ArcgisVersion,
                ConnDirect    = s.ConnDirect,
                DataReg       = s.DataReg,
                EstReg        = s.EstReg,
                Instance      = s.Instance,
                Login         = s.Login,
                Name          = s.Name,
                Password      = s.Password,
                SdeId         = s.SdeId,
                Server        = s.Server,
                Service       = s.Service,
                Version       = s.Version
            }));

            return(Json(dtParser.Parse(), JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        /// <summary>
        /// Monta a query primeiro pra depois consulta tudo (o processamento fica inteiro no servidor)
        /// </summary>
        /// <returns></returns>
        public JsonResult ReadAll()
        {
            ClienteDAO           clienteDAO = new ClienteDAO();
            IQueryable <Cliente> clientes   = clienteDAO.ReadAll();

            DataTableParser <Cliente> dtParser = new DataTableParser <Cliente>(Request, clientes);

            return(Json(dtParser.Parse(), JsonRequestBehavior.AllowGet));
        }
Beispiel #3
0
        public JsonResult ReadAll()
        {
            ClientSideJavascriptExceptionDAO           dao    = new ClientSideJavascriptExceptionDAO();
            IQueryable <ClientSideJavaScriptException> errors = dao.ReadAll();

            DataTableParser <ClientSideJavaScriptException> dtParser = new DataTableParser <ClientSideJavaScriptException>(Request, errors);

            return(Json(dtParser.Parse(), JsonRequestBehavior.AllowGet));
        }
        /// <summary>
        /// Processa primeiro depois passa todos os dados para o parser que processa no lado do cliente o outro filtro
        /// </summary>
        /// <returns></returns>
        public JsonResult ListEnumerable()
        {
            Thread.Sleep(2000);
            UsuarioDAO  userDAO  = new UsuarioDAO();
            List <User> allUsers = userDAO.GetAllIEnumerable();

            DataTableParser <User> dtParser = new DataTableParser <User>(Request, allUsers.AsQueryable());

            return(Json(dtParser.Parse(), JsonRequestBehavior.AllowGet));
        }
Beispiel #5
0
        /// <summary>
        /// Retorna todos os itens do menu ativos
        /// </summary>
        /// <returns></returns>
        public JsonResult ReadAll()
        {
            MenuDAO dao = new MenuDAO();
            IEnumerable <MenuItem> menuItens = dao.ReadAll().ToList <MenuItem>().Select(x => new MenuItem {
                Name = x.Name, Root = x.Root, MenuItemId = x.MenuItemId, ParentId = x.ParentId, Children = null, Icon = x.Icon, Url = x.Url, Leaf = x.Leaf
            });

            DataTableParser <MenuItem> dtParser = new DataTableParser <MenuItem>(Request, menuItens.AsQueryable());

            return(Json(dtParser.Parse(), JsonRequestBehavior.AllowGet));
        }
Beispiel #6
0
        public JsonResult ReadAllArcgisServer(int ClienteId)
        {
            ClienteDAO           clienteDAO = new ClienteDAO();
            IQueryable <Cliente> clientes   = clienteDAO.GetArcgisServers(ClienteId);

            DataTableParser <ArcgisServer> dtParser = new DataTableParser <ArcgisServer>(Request, clientes.SingleOrDefault().ArcgisServers.AsQueryable().Select(
                                                                                             /*Definindo os campos que serao apresentandos, alem de eliminar os atributos circular*/
                                                                                             s => new ArcgisServer()
            {
                ArcgisVersion = s.ArcgisVersion,
                Name          = s.Name,
                Url           = s.Url,
                Login         = s.Login,
                Password      = s.Password,
                DataReg       = s.DataReg,
                EstReg        = s.EstReg
            }));

            return(Json(dtParser.Parse(), JsonRequestBehavior.AllowGet));
        }