Example #1
0
        public JsonResult Add(Skills skill)
        {
            MTSHRDataLayer.Skills data_skills = new MTSHRDataLayer.Skills();
            int result = data_skills.Create(skill.Skill);

            return(Json(new { success = result }, JsonRequestBehavior.AllowGet));
        }
Example #2
0
        //
        // GET: /UserSkills/

        public object GetAllSkills()
        {
            MTSHRDataLayer.Skills Skilldata = new MTSHRDataLayer.Skills();
            var Skills = Skilldata.Read();
            List <SelectListItem> Skillslist = new List <SelectListItem>();

            for (int i = 0; i < Skills.Rows.Count; i++)
            {
                SelectListItem li = new SelectListItem();
                li.Value = Skills.Rows[i]["id"].ToString();
                li.Text  = Skills.Rows[i]["Skills"].ToString();
                Skillslist.Add(li);
            }
            return(JsonConvert.SerializeObject(Skillslist));
        }
Example #3
0
 public JsonResult Read()
 {
     MTSHRDataLayer.Skills skills = new MTSHRDataLayer.Skills();
     return(Json(JsonConvert.SerializeObject(skills.Read()), JsonRequestBehavior.AllowGet));
 }