コード例 #1
0
ファイル: PopupView.cs プロジェクト: DubeyAnkur/WineHangoutz
        public async void SaveReview()
        {
            try
            {
                BTProgressHUD.Show("Saving the review...");
                ServiceWrapper sw     = new ServiceWrapper();
                Review         review = new Review();
                review.ReviewDate   = DateTime.Now;
                review.ReviewUserId = Convert.ToInt32(CurrentUser.RetreiveUserId());
                if (txtComments.Text == "Describe your tasting")
                {
                    txtComments.Text = "";
                }
                string reviewtxt = txtComments.Text;
                reviewtxt.Trim();
                review.RatingText  = reviewtxt;
                review.IsActive    = true;
                review.PlantFinal  = storeid.ToString();
                review.RatingStars = Convert.ToInt32(StartsSelected);
                //review.SKU = SKU;
                review.Barcode = WineId;

                await sw.InsertUpdateReview(review);

                //NavController.DismissViewController(true, null);
                BTProgressHUD.ShowSuccessWithStatus("Thank you!!!", 2000);
                ((IPopupParent)parent).RefreshParent();
            }
            catch (Exception ex)
            {
                LoggingClass.LogError(ex.Message, screen, ex.StackTrace);
            }
        }