Beispiel #1
0
        public ActionResult Services(string categoria, string ordenar_por, int?preco_inicial, int?preco_final)
        {
            ordenar_por = ordenar_por ?? "Relevancia";
            string[] orderByString = { "Relevancia", "Menor Para Maior", "Maior Para Menor" };
            int      index         = orderByString.ToList().IndexOf(orderByString.ToList().Where(i => i == ordenar_por).First());

            return(View(ServiceDAO.GetList(index, categoria, preco_inicial, preco_final)));
        }
        public ActionResult GetList()
        {
            if (!Authentication.IsValid())
            {
                return(Json(new { Error = "Not Authenticated" }));
            }
            JsonResult json = Json(new { Services = ServiceDAO.GetList() }, JsonRequestBehavior.AllowGet);

            json.MaxJsonLength = int.MaxValue;
            return(json);
        }
 public List <Service> GetList(int orderIndex, string category, int?sp, int?ep)
 {
     return(ServiceDAO.GetList(orderIndex, category, sp, ep));
 }
 public IEnumerable <Service> GetList()
 {
     return(ServiceDAO.GetList());
 }