Exemple #1
0
        //************************************ Autocomplete *********************************************
        // autocomplete for skills
        public JsonResult GetAutoSkills(string Prefix)
        {
            List <Skill> result;
            List <Skill> all;

            if (string.IsNullOrEmpty(Prefix))
            {
                all    = skillsbusinessManager.GetAll();
                result = all.Except(searchSkills, new IdComparer()).ToList();
            }
            else
            {
                all    = skillsbusinessManager.GetAll();
                result = all.Except(searchSkills, new IdComparer()).ToList();
                result = result.Where(s => s.Name.ToLower().Contains(Prefix.ToLower())).ToList();
            }

            var translatedResult = SkillModel.Translate(result);

            return(Json(translatedResult, JsonRequestBehavior.AllowGet));
        }
Exemple #2
0
 // GET: Skills
 public ActionResult Index()
 {
     return(View(skillsBusinessManager.GetAll()));
 }