public async Task<IHttpActionResult> PutForUpdate(oPresident_curriculum data)
 {
     object result = await data.InsertOrUpdate();
     if (result == null)
         return Ok();
     else
         return InternalServerError(new Exception(result.ToString()));
 }
 public async Task<IHttpActionResult> PostToQueryAllPresident([FromBody] int aca_year)
 {
     if (aca_year < 0)
         return BadRequest("กรุณาระบุปีการศึกษาให้เป็นค่าที่ถูกต้องและเหมาะสม");
     oPresident_curriculum datacontext = new oPresident_curriculum();
     datacontext.aca_year = aca_year;
     return Ok(await datacontext.SelectAllCurriculumsAndAllPresidents());
 }
 public async Task<IHttpActionResult> PutToSaveAllPresident(JObject data)
 {
     Curriculums_presidents_detail cpdata = data["old_object"].ToObject<Curriculums_presidents_detail>();
     oPresident_curriculum datacontext = new oPresident_curriculum();
     datacontext.aca_year = Convert.ToInt32(data["aca_year"]);
     object result = await datacontext.UpdatePresidentData(cpdata);
     if (result == null)
         return Ok();
     else
         return InternalServerError(new Exception(result.ToString()));
 }
 public async Task<IHttpActionResult> Get()
 {
     oPresident_curriculum datacontext = new oPresident_curriculum();
     datacontext.aca_year = 2558;
     return Ok(await datacontext.SelectAllCurriculumsAndAllPresidents());
 }