public JsonResult Add(AddEditLocation Loc) { MTSHRDataLayer.Location data_location = new MTSHRDataLayer.Location(); int result = data_location.Create(Loc.LocationName); return(Json(new { success = result }, JsonRequestBehavior.AllowGet)); }
public JsonResult Read() { MTSHRDataLayer.Location location = new MTSHRDataLayer.Location(); return(Json(JsonConvert.SerializeObject(location.Read()), JsonRequestBehavior.AllowGet)); }