/// <summary> /// Method to Decline the Order /// </summary> /// <param name="orderId">order id</param> /// <returns>Decline order status</returns> string IChefService.DeclineOrder(string orderId) { try { return this.chefBL.DeclineOrder(orderId); } catch (Exception ex) { ServiceFaultDetails serviceException = new ServiceFaultDetails(); serviceException.ErrorMessage = ex.Message; serviceException.Result = false; throw new FaultException<ServiceFaultDetails>(serviceException); } }
/// <summary> /// Method to Get All Orders with its Details /// </summary> /// <returns>list of customer orders</returns> List<CustomerOrder> IChefService.GetNewOrders() { try { return this.chefBL.GetNewOrders(); } catch (Exception ex) { ServiceFaultDetails serviceException = new ServiceFaultDetails(); serviceException.ErrorMessage = ex.Message; serviceException.Result = false; throw new FaultException<ServiceFaultDetails>(serviceException); } }
/// <summary> /// Method to Place an Order /// </summary> /// <param name="order">order data</param> void IWaiterService.PlaceOrder(AddOrder order) { try { this.waiterBL.PlaceOrder(order); } catch (Exception ex) { ServiceFaultDetails serviceException = new ServiceFaultDetails(); serviceException.ErrorMessage = ex.Message; serviceException.Result = false; throw new FaultException<ServiceFaultDetails>(serviceException); } }