public async Task CancelOrder(BookOrderSetupModel model)
 {
     using (HttpResponseMessage response = await _apiHelper.ApiClient.PostAsJsonAsync("/api/bookorder/CancelOrder", model))
     {
         if (response.IsSuccessStatusCode == false)
         {
             throw new Exception(response.ReasonPhrase);
         }
     }
 }
Ejemplo n.º 2
0
        public void AddBookOrder(BookOrderSetupModel model)
        {
            int?availableQuantity = _dataAccess.LoadData <int, dynamic>("spBook_CheckAQById", new { Id = model.BookId }, "LibraryDatabase").FirstOrDefault();

            if (availableQuantity <= 0 || availableQuantity is null)
            {
                //book isnt viable
            }
            else
            {
                _dataAccess.SaveData("spBookOrder_AddBookOrder", new { model.BookId, model.UserId }, "LibraryDatabase");
            }
        }
Ejemplo n.º 3
0
 public void CancelOrder(BookOrderSetupModel model)
 {
     _dataAccess.SaveData("spBookOrder_OrderCompleted", new { model.BookId, model.UserId }, "LibraryDatabase");
 }
 public void CancelOrder(BookOrderSetupModel model)
 {
     _data.CancelOrder(model);
 }
 public void AddBookOrder(BookOrderSetupModel model)
 {
     _data.AddBookOrder(model);
 }