Ejemplo n.º 1
0
 private async void AddSnusToStash()
 {
     ErrorMessage = "";
     if (Name != "")
     {
         var snus = new Snus
         {
             Name         = Name,
             Price        = Price,
             SnusStrength = Strength,
             ProfileId    = ProfileHandler.CurrentProfile.ProfileId
         };
         if (await DataTransferUtility.PostSnus(snus) == true)
         {
             MyStashList.Add(snus);
         }
         ErrorMessage = "Snus added to stash";
     }
     else
     {
         ErrorMessage = "The Name field has to be filled";
     }
 }