예제 #1
0
 public IHttpActionResult DeletOrderbyId(int id)
 {
     try
     {
         OM.DeleteOrder(id);;
         return(Ok("pppp0"));
     }
     catch (Exception e)
     {
         return(BadRequest(e.ToString()));
     }
 }
예제 #2
0
 public IActionResult DeleteOrder(int id)
 {
     try
     {
         logic.DeleteOrder(id);
         return(NoContent());
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message));
     }
 }
예제 #3
0
 public ActionResult DeleteOrder(int id, FormCollection collection)
 {
     try
     {
         // TODO: Add delete logic here
         orderLogic.DeleteOrder(id);
         return(RedirectToAction("IndexOrder"));
     }
     catch
     {
         return(View());
     }
 }
예제 #4
0
 public async Task <IActionResult> DeleteOrderDetails([FromRoute] int id)
 {
     return(Ok(await _order.DeleteOrder(id)));
 }