public IHttpActionResult GetAirlineNameByid([FromUri] long id) { string name = apiFacade.GetMyCompany(id).AirlineName; if (name == "") { return(NotFound()); } return(Ok(name)); }
public IHttpActionResult UpdateAirlineDetails([FromBody] AirlineCompany airline, [FromUri] long id) { if (apiFacade.GetMyCompany(id) == null) { return(BadRequest(ModelState)); } else { airline.Id = id; GetAdminFacade().UpdateAirlineDetails(GetAdminLoginToken(), airline); return(Ok()); } }
public IHttpActionResult MofidyAirlineDetails([FromBody] AirlineCompany airline, [FromUri] long id) { try { if (apiFacade.GetMyCompany(id) == null) { return(BadRequest(ModelState)); } else { airline.Id = id; getAirlineFacade().MofidyAirlineDetails(airlineLoginToken, airline); return(Ok()); } } catch (Exception exp) { return(BadRequest(exp.ToString())); } }