Ejemplo n.º 1
0
        private void DtGridFeedBack_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (dtGridFeedBack.SelectedItem != null)
            {
                popUpPoint.IsOpen = false;
                int counter = 0;
                var row     = (Sells)dtGridFeedBack.SelectedItem;
                userID    = row.UserID;
                ProductID = row.ProductID;
                var image = services.Image(int.Parse(row.ProductID.ToString()));
                ImgFeedBack.Source = image;

                var listUserPoint = UserPro.UserPoint(ProductID, userID);

                if (row.DeliveryFlag == 0)
                {
                    lblTicket.Content       = "Bilet Durumu: Açık";
                    rchBoxReview.IsReadOnly = false;
                }
                else
                {
                    lblTicket.Content       = "Bilet Durumu: Kapalı";
                    rchBoxReview.IsReadOnly = true;
                }

                if (listUserPoint == null)
                {
                    txtDısGörünüs.Text       = "Dış Görünüş Puanını Buraya Giriniz";
                    txtDısGörünüs.IsReadOnly = false;
                    txtFiyPerf.Text          = "Fiyat Performans Puanını Buraya Giriniz";
                    txtFiyPerf.IsReadOnly    = false;
                    txtKullanımK.Text        = "Kullanım Kolaylığı Puanını Buraya Giriniz";
                    txtKullanımK.IsReadOnly  = false;
                    txtKalite.Text           = "Kalite Puanını Buraya Giriniz";
                    txtKalite.IsReadOnly     = false;
                    txtDay.Text = "Dayanıklılık Puanını Buraya Giriniz";
                }
                else
                {
                    foreach (var item in listUserPoint)
                    {
                        if (counter == 0)
                        {
                            txtDısGörünüs.Text       = "Ürün Puanınız=" + item + "";
                            txtDısGörünüs.IsReadOnly = true;
                        }
                        if (counter == 1)
                        {
                            txtFiyPerf.Text       = "Ürün Puanınız=" + item + "";
                            txtFiyPerf.IsReadOnly = true;
                        }
                        if (counter == 2)
                        {
                            txtKullanımK.Text       = "Ürün Puanınız=" + item + "";
                            txtKullanımK.IsReadOnly = true;
                        }
                        if (counter == 3)
                        {
                            txtKalite.Text       = "Ürün Puanınız= " + item + "";
                            txtKalite.IsReadOnly = true;
                        }
                        if (counter == 4)
                        {
                            txtDay.Text           = "Ürün Puanınız= " + item + "";
                            txtFiyPerf.IsReadOnly = true;
                        }

                        if (counter == 5)
                        {
                            rchBoxReview.Document.Blocks.Clear();
                            rchBoxReview.Document.Blocks.Add(new Paragraph(new Run(item)));
                        }

                        counter++;
                    }
                }
                popUpPoint.IsOpen     = true;
                popUpPoint.Visibility = Visibility.Visible;
            }
        }