public ActionResult Index()
        {
            var condPag = new CondPagamentoDAO();

            ModelState.Clear();
            return(View(condPag.SelecionarCondPagamento()));
        }
 public JsonResult JsSelect(string q, int?page, int?pageSize)
 {
     try
     {
         var condPag = new CondPagamentoDAO();
         IQueryable <dynamic> lista = condPag.SelecionarCondPagamento().Select(u => new { Id = u.IdCondPag, Text = u.dsCondPag }).AsQueryable();
         return(Json(new JsonSelect <object>(lista, page, 10), JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         Response.StatusCode = 500;
         return(Json(ex.Message, JsonRequestBehavior.AllowGet));
     }
 }