Esempio n. 1
0
        //
        // GET: /DirectSchoolClients/

        public ActionResult Index(string sort)
        {
            DirectSchoolClientClient         dscc    = new DirectSchoolClientClient();
            IEnumerable <DirectSchoolClient> results = dscc.GetAll();

            if (sort != null)
            {
                switch (sort)
                {
                case "Name":
                    results = results.OrderBy(x => x.Name);
                    break;

                case "Status":
                    results = results.OrderBy(x => x.Status);
                    break;

                case "Category":
                    results = results.OrderBy(x => x.Category);
                    break;

                default:
                    break;
                }
            }

            return(View(results));
        }
Esempio n. 2
0
        public ActionResult Dashboard()
        {
            DirectSchoolClientClient dscc = new DirectSchoolClientClient();

            return(View(dscc.GetAll()));
        }