public IHttpActionResult AttachEquipmentClassMessageCatalog(int id, EquipmentClassMessageCatalogModel.Format_Update dataModel) { try { EquipmentClassMessageCatalogModel model = new EquipmentClassMessageCatalogModel(); model.UpdateByEquipmentClassId(id, dataModel); return(Content(HttpStatusCode.OK, HttpResponseFormat.Success())); } catch (CDSException cdsEx) { return(Content(HttpStatusCode.BadRequest, CDSException.GetCDSErrorMessageByCode(cdsEx.ErrorId))); } catch (Exception ex) { string logAPI = "[Delete] " + Request.RequestUri.ToString(); StringBuilder logMessage = LogHelper.BuildExceptionMessage(ex); Global._appLogger.Error(logAPI + logMessage); return(Content(HttpStatusCode.InternalServerError, ex)); } }
public IHttpActionResult GetEquipmentClassMessageCatalog(int id) { EquipmentClassMessageCatalogModel model = new EquipmentClassMessageCatalogModel(); return(Content(HttpStatusCode.OK, model.GetAllByEquipmentClassId(id))); }