//
        // GET: /UserEducation/

        public object GetAllEducations()
        {
            MTSHRDataLayer.Qualification Qualificationdata = new MTSHRDataLayer.Qualification();
            var Qualifications = Qualificationdata.Read();
            List <SelectListItem> Qualificationlist = new List <SelectListItem>();

            for (int i = 0; i < Qualifications.Rows.Count; i++)
            {
                SelectListItem li = new SelectListItem();
                li.Value = Qualifications.Rows[i]["id"].ToString();
                li.Text  = Qualifications.Rows[i]["Qualification"].ToString();
                Qualificationlist.Add(li);
            }
            return(JsonConvert.SerializeObject(Qualificationlist));
        }
Esempio n. 2
0
 public JsonResult Read()
 {
     MTSHRDataLayer.Qualification qualification = new MTSHRDataLayer.Qualification();
     return(Json(JsonConvert.SerializeObject(qualification.Read()), JsonRequestBehavior.AllowGet));
 }