// // GET: /PerfilUsuario/ public ActionResult Index() { //Autentica if (Session["ConexaoSapiens"] == null) { return RedirectToAction("Login", "Home"); } //Autoriza if (!AutorizaUsuario(ControlAccessConfig.PerfilUsuario)) { return View("Erro", null, "Módulo não autorizado para este usuário. "); } using (var bll = new PerfilUsuarioBLL()) { var model = bll.ListarTodos(); var ajaxGridFactory = new Grid.Mvc.Ajax.GridExtensions.AjaxGridFactory(); var grid = ajaxGridFactory.CreateAjaxGrid(model.OrderBy(c => c.CodPerfilUsuario).OrderBy(s => s.CodPerfilUsuario).AsQueryable(), 1, false); return View(grid); } }
public ActionResult GridPerfisUsuarioPaginado(int? page) { //Autentica if (Session["ConexaoSapiens"] == null) { return RedirectToAction("Login", "Home"); } //Autoriza if (!AutorizaUsuario(ControlAccessConfig.PerfilUsuario)) { return View("Erro", null, "Módulo não autorizado para este usuário. "); } using (var bll = new PerfilUsuarioBLL()) { var model = bll.ListarTodos(); var ajaxGridFactory = new Grid.Mvc.Ajax.GridExtensions.AjaxGridFactory(); var grid = ajaxGridFactory.CreateAjaxGrid(model.OrderBy(c => c.CodPerfilUsuario).OrderBy(s => s.CodPerfilUsuario).AsQueryable(), page.HasValue ? page.Value : 1, false); return Json(new { Html = grid.ToJson("_GridPerfisUsuario", this), grid.HasItems }, JsonRequestBehavior.AllowGet); } }
public ActionResult GridPrazos() { using (var bll = new CondicaoPagamentoBLL()) { var model = bll.ListarTodos(); var ajaxGridFactory = new Grid.Mvc.Ajax.GridExtensions.AjaxGridFactory(); var grid = ajaxGridFactory.CreateAjaxGrid(model.OrderBy(c => c.codcpg).OrderBy(s => s.codcpg).AsQueryable(), 1, false); return View(grid); } }
public ActionResult GridPrazosPaginados(int? page) { using(var bll = new CondicaoPagamentoBLL()) { var model = bll.ListarTodos(); var ajaxGridFactory = new Grid.Mvc.Ajax.GridExtensions.AjaxGridFactory(); var grid = ajaxGridFactory.CreateAjaxGrid(model.OrderBy(c => c.codcpg).OrderBy(s => s.codcpg).AsQueryable(), page.HasValue ? page.Value : 1, false); return Json(new { Html = grid.ToJson("_GridCondicoesPagamento", this), grid.HasItems }, JsonRequestBehavior.AllowGet); } }
public JsonResult UsuariosPaginados(int? page) { using (var bll = new UsuarioSapiensBLL()) { var vm = bll.ListarTodos().AsQueryable(); var ajaxGridFactory = new Grid.Mvc.Ajax.GridExtensions.AjaxGridFactory(); var grid = ajaxGridFactory.CreateAjaxGrid(vm, page.HasValue? page.Value: 1 , false); return Json(new { Html = grid.ToJson("_GridUsuarios", this), grid.HasItems }, JsonRequestBehavior.AllowGet); } }
public ActionResult PerfisPaginados(int? page) { using (var perfilBLL = new PerfilUsuarioBLL()) { var vm = perfilBLL.ListarTodos().OrderBy(p => p.CodPerfilUsuario).AsQueryable(); var ajaxGridFactory = new Grid.Mvc.Ajax.GridExtensions.AjaxGridFactory(); var grid = ajaxGridFactory.CreateAjaxGrid(vm, page.HasValue? page.Value: 1, false); return Json(new { Html = grid.ToJson("_GridPerfis", this), grid.HasItems }, JsonRequestBehavior.AllowGet); } }
public ActionResult GridPerfis() { using (var perfilBLL = new PerfilUsuarioBLL()) { var usuario = (UsuarioSapiens)Session["ConexaoSapiens"]; usuario.PerfisUsuario = perfilBLL.ObterGruposPorCodUsuario(usuario.Codusu).OrderBy(perfil => perfil.CodPerfilUsuario).ToList(); foreach (var p in usuario.PerfisUsuario) { p.bSituacao = p.SitPerfil == 0 ? false : true; } var vm = perfilBLL.ListarTodos().OrderBy(p =>p.CodPerfilUsuario).AsQueryable(); var ajaxGridFactory = new Grid.Mvc.Ajax.GridExtensions.AjaxGridFactory(); var grid = ajaxGridFactory.CreateAjaxGrid(vm, 1, false); return Json(new { Html = grid.ToJson("_GridPerfis", this), grid.HasItems }, JsonRequestBehavior.AllowGet); } }
public ActionResult Index() { //Autentica if (Session["ConexaoSapiens"] == null) { return RedirectToAction("Login", "Home"); } //Autoriza if (!AutorizaUsuario(ControlAccessConfig.Workflow)) { return View("Erro", null, "Módulo não autorizado para este usuário. "); } using (var bll = new ConfiguracaoWorkflowBLL()) { var listaConfigWorkflow = bll.ListarTodos().Where(w => w.UsuSituacao == "A" && w.UsuGrupo.HasValue).ToList(); bll.ObterNomes(listaConfigWorkflow); var ajaxGridFactory = new Grid.Mvc.Ajax.GridExtensions.AjaxGridFactory(); var grid = ajaxGridFactory.CreateAjaxGrid(listaConfigWorkflow.OrderBy(c => c.UsuId).OrderBy(s => s.UsuId).AsQueryable(), 1, false); return View(grid); } }
public ActionResult GridConfiguracoesWorkflowPaginado(int? page) { using (var bll = new ConfiguracaoWorkflowBLL()) { var listaConfigWorkflow = bll.ListarTodos().Where(w => w.UsuSituacao == "A" && w.UsuGrupo.HasValue).ToList(); bll.ObterNomes(listaConfigWorkflow); var ajaxGridFactory = new Grid.Mvc.Ajax.GridExtensions.AjaxGridFactory(); var grid = ajaxGridFactory.CreateAjaxGrid(listaConfigWorkflow.OrderBy(c => c.UsuId).OrderBy(s => s.UsuId).AsQueryable(), page.HasValue? page.Value:1, false); return Json(new { Html = grid.ToJson("_GridConfiguracoesWorkflow", this), grid.HasItems }, JsonRequestBehavior.AllowGet); } }