예제 #1
0
        private async void InitializeMyStashList()
        {
            Snus[] snus = await ProfileHandler.GetSnusForThisProfile();

            foreach (Snus s in snus)
            {
                MyStashList.Add(s);
            }
        }
예제 #2
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";
     }
 }