Beispiel #1
0
        public ActionResult Index()
        {
            var cargoDAO = new CargoDAO();

            ModelState.Clear();
            return(View(cargoDAO.SelecionarCargo()));
        }
Beispiel #2
0
 public JsonResult JsSelect(string q, int?page, int?pageSize)
 {
     try
     {
         var cargoDAO = new CargoDAO();
         IQueryable <dynamic> lista = cargoDAO.SelecionarCargo().Select(u => new { id = u.IdCargo, dsCargo = u.dsCargo }).AsQueryable();
         return(Json(new JsonSelect <object>(lista, page, 10), JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         Response.StatusCode = 500;
         return(Json(ex.Message, JsonRequestBehavior.AllowGet));
     }
 }