예제 #1
0
 public async Task <IHttpActionResult> GetById(int id)
 {
     try
     {
         return(Json(await userHandler.GetById(id)));
     }
     catch (InternalServerErrorException e)
     {
         return(Json(APIError.From(e)));
     }
 }
예제 #2
0
 public async Task <IHttpActionResult> Insert(JObject body)
 {
     try
     {
         return(Json(await panduanHandler.Insert(body)));
     }
     catch (InternalServerErrorException e)
     {
         return(Json(APIError.From(e)));
     }
 }
 public async Task <IHttpActionResult> GetAllKategoriBahan()
 {
     try
     {
         return(Json(await kategoriBahanHandler.GetAllKategoriBahan()));
     }
     catch (InternalServerErrorException e)
     {
         return(Json(APIError.From(e)));
     }
 }
예제 #4
0
 public async Task <IHttpActionResult> GetListByMultipleBahan(string ids)
 {
     try
     {
         return(Json(await panduanHandler.GetListByMultipleBahan(ids)));
     }
     catch (InternalServerErrorException e)
     {
         return(Json(APIError.From(e)));
     }
 }
예제 #5
0
 public async Task <IHttpActionResult> Delete(string ids)
 {
     try
     {
         return(Json(await panduanHandler.DeleteMultiple(ids)));
     }
     catch (InternalServerErrorException e)
     {
         return(Json(APIError.From(e)));
     }
 }
예제 #6
0
 public async Task <IHttpActionResult> GetListByKategori(int id)
 {
     try
     {
         return(Json(await bahanHandler.GetListByKategori(id)));
     }
     catch (InternalServerErrorException e)
     {
         return(Json(APIError.From(e)));
     }
 }
예제 #7
0
 public async Task <IHttpActionResult> GetAllRole()
 {
     try
     {
         return(Json(await roleHandler.GetAllRole()));
     }
     catch (InternalServerErrorException e)
     {
         return(Json(APIError.From(e)));
     }
 }
예제 #8
0
 public async Task <IHttpActionResult> DoRegister(JObject body)
 {
     try
     {
         return(Json(await userHandler.DoRegister(body)));
     }
     catch (NotPermittedException e)
     {
         return(Json(APIError.From(e)));
     }
     catch (InternalServerErrorException e)
     {
         return(Json(APIError.From(e)));
     }
 }
예제 #9
0
 public async Task <IHttpActionResult> DoLogin(JObject body)
 {
     try
     {
         return(Json(await userHandler.DoLogin(body)));
     }
     catch (UnauthorizedException e)
     {
         return(Json(APIError.From(e)));
     }
     catch (InternalServerErrorException e)
     {
         return(Json(APIError.From(e)));
     }
 }
 public async Task <IHttpActionResult> Delete(JObject body)
 {
     try
     {
         return(Json(await detailPanduanHandler.Delete(body)));
     }
     catch (NotFoundException e)
     {
         return(Json(APIError.From(e)));
     }
     catch (InternalServerErrorException e)
     {
         return(Json(APIError.From(e)));
     }
 }
 public async Task <IHttpActionResult> Update(JObject body)
 {
     try
     {
         return(Json(await kategoriBahanHandler.Update(body)));
     }
     catch (NotFoundException e)
     {
         return(Json(APIError.From(e)));
     }
     catch (InternalServerErrorException e)
     {
         return(Json(APIError.From(e)));
     }
 }
예제 #12
0
 public async Task <IHttpActionResult> Delete(int id)
 {
     try
     {
         return(Json(await panduanHandler.Delete(id)));
     }
     catch (NotFoundException e)
     {
         return(Json(APIError.From(e)));
     }
     catch (InternalServerErrorException e)
     {
         return(Json(APIError.From(e)));
     }
 }