public JsonResult AddStaffRole(StaffRole role) { StaffData data = new StaffData(); try { data.AddStaffRole(role); return(Json(new { data = "บันทึกข้อมูลสำเร็จ", success = true }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { data = ex.Message, success = false }, JsonRequestBehavior.AllowGet)); } }