Exemplo n.º 1
0
 private async void OnSelectedListView(PromotionProductModel promotion)
 {
     UpdateCommand Data = new UpdateCommand()
     {
         UserId      = UserId,
         PromotionId = promotion.Id
     };
     await App.Current.MainPage.Navigation.PushAsync(new GetPromotionPage(Data));
 }
Exemplo n.º 2
0
 public IActionResult AddPromotion([FromBody] PromotionProductModel command)
 {
     try
     {
         var result = context.Tb_PromotionProduct.Add(command);
         if (result == null)
         {
             return(BadRequest());
         }
         else
         {
             context.SaveChanges();
             return(Ok("Success"));
         }
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }