コード例 #1
0
 public IHttpActionResult GetDeviceCommandCatalogById(int id)
 {
     try
     {
         DeviceCommandCatalogModel model = new DeviceCommandCatalogModel();
         return(Content(HttpStatusCode.OK, model.GetById(id)));
     }
     catch (CDSException cdsEx)
     {
         return(Content(HttpStatusCode.BadRequest, CDSException.GetCDSErrorMessageByCode(cdsEx.ErrorId)));
     }
     catch (Exception ex)
     {
         return(Content(HttpStatusCode.InternalServerError, ex));
     }
 }