public async Task <bool> SaveAward()
        {
            if (OriginalAward == null)
            {
                await _client.AddAwardAsync(EditedAward);

                return(true);
            }
            else if (!EditedAward.Equals(OriginalAward))
            {
                await _client.UpdateAwardAsync(EditedAward);

                return(true);
            }
            return(false);
        }
예제 #2
0
        public async Task <bool> SaveAward()
        {
            if (originalAward == null)
            {
                await DB.AddAward(EditedAward.PlayId, EditedAward.CategoryId,
                                  MainViewModel.LoggedUser.UserId);

                return(true);
            }
            else if (!EditedAward.Equals(originalAward))
            {
                EditedAward.EditedBy = MainViewModel.LoggedUser.UserId;
                await DB.UpdateAward(EditedAward);

                return(true);
            }
            return(false);
        }