public JsonResult Add(Qualification qual) { MTSHRDataLayer.Qualification data_qualification = new MTSHRDataLayer.Qualification(); int result = data_qualification.Create(qual.qualification); return(Json(new { success = result }, JsonRequestBehavior.AllowGet)); }
// // 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)); }
public JsonResult Read() { MTSHRDataLayer.Qualification qualification = new MTSHRDataLayer.Qualification(); return(Json(JsonConvert.SerializeObject(qualification.Read()), JsonRequestBehavior.AllowGet)); }