public IHttpActionResult PostBuyEnterpCard(EnterpCardsDTO enterpCardDTO) { if (EnterpCardsService.buyEnterpCard(enterpCardDTO) == null) { return(BadRequest("System error, please try later")); } return(Ok(enterpCardDTO)); }
public IHttpActionResult GetIsEnterpCardExist(EnterpCardsDTO enterpCardDTO) { //פונקתית סליקה if (EnterpCardsService.isEnterpCardExist(enterpCardDTO)) { return(BadRequest("The card exists in the Enterprise")); } return(Ok("Card successfully registered")); }
public IHttpActionResult RemoveEnterpCard(int id) { if (EnterpCardsService.okToRemove(id)) { return(BadRequest("There are cards used")); } var d = EnterpCardsService.removeEnterpCard(id); if (d) { return(Ok()); } return(BadRequest("System error, please try later")); }