public ActionResult Delete(int id, string orderId) { string str = null; if (orderId.IndexOf('?') != -1) { str = orderId.Split('?')[1]; str = str.Split('=')[1]; } var result = new DeleteMassage(); int returnValue = _orderProvider.DeleteItem(id, str); if (returnValue == 0) { result.IsSuccess = true; result.ErrorMessage = "Delete success!"; } else { result.IsSuccess = false; result.ErrorMessage = "The current item has been deleted!"; } return(Json(result)); }
public ActionResult Delete(int id) { var result = new DeleteMassage(); int returnValue = _albumProvider.DeleteAlbum(id); if (returnValue == 0) { result.IsSuccess = true; result.ErrorMessage = "Delete success!"; } else { result.IsSuccess = false; result.ErrorMessage = "The current Album has been deleted!"; } return(Json(result)); }
public ActionResult DeleteOrder(string Id) { var i = Id; int returnValue = _orderProvider.DeleteOrder(i); var result = new DeleteMassage(); if (returnValue == 0) { result.IsSuccess = true; result.ErrorMessage = "Delete success!"; } else { result.IsSuccess = false; result.ErrorMessage = "The current order has been deleted!"; } //else //{ //result.IsSuccess = false; //result.ErrorMessage = "Network busy, please try again later"; //} return(Json(result)); }