コード例 #1
0
        public UI(int ID)
        {
            InitializeComponent();
            headersource();
            var UserInfo = users.getUserInfo(ID);

            txtName.Text = UserInfo.UserName;
            txtAdress.Document.Blocks.Clear();
            txtAdress.Document.Blocks.Add(new Paragraph(new Run(UserInfo.UserAdress.Trim())));
            txtDisc.Text   = UserInfo.UserDisct;
            txtMail.Text   = UserInfo.UserMail;
            txtPotKod.Text = UserInfo.UserPostaKod.ToString();
            txtProv.Text   = UserInfo.UserProvi;
            txtTelNU.Text  = UserInfo.UserTel.ToString();
            string filePath = UserInfo.profilPhoto;

            //var img = services.stringToImage();
            //ImgDeneme.Source = img.FirstOrDefault();

            if (UserInfo.profilPhoto == null || UserInfo.profilPhoto == "")
            {
                BitmapImage bitmapImage = new BitmapImage();
                bitmapImage.BeginInit();
                bitmapImage.UriSource = new Uri("C:\\b\\anon.jpg");
                bitmapImage.EndInit();
                ImgUser.Source = bitmapImage;
            }
            else
            {
                BitmapImage bitmapImage = new BitmapImage();
                bitmapImage.BeginInit();
                bitmapImage.UriSource = new Uri(filePath);
                bitmapImage.EndInit();
                ImgUser.Source = bitmapImage;
            }


            lblUserId.Content = "" + ID + "";

            services.log(ID);

            tabControl.SelectedItem = null;

            //var item = users.aa(ID);
            //dtDEneme.ItemsSource = item;
        }
コード例 #2
0
        private void DtGridTicket_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var row = (V_FeedBakDetail)dtGridTicket.SelectedItem;

            if (dtGridTicket.SelectedItem != null)
            {
                TicketPopUp.IsOpen = false;
                TicketPopUp.IsOpen = true;
                var userName = ticket.getUserInfo(int.Parse(row.UserID.ToString()));
                lblUserName.Content = "Kullanıcı Adı " + userName.UserName + "";
                lblMail.Content     = "Mail Adresi: " + userName.UserMail + "";
                var ProductName = ticket.UserTicketProduct(int.Parse(row.ProductID.ToString()), false);
                lblProductName.Content = "Ürün İsmi: " + ProductName.ToString() + "";
                var CompanyName = ticket.UserTicketProduct(int.Parse(row.ProductID.ToString()), true);
                lblFirma.Content = "Firma Adı: " + CompanyName.ToString() + "";
                lblPoint.Content = "Ürün Ortalama Puanınız: " + ((row.Dayanıklılık + row.DısGörünüs + row.Kalite + row.KullanımKolaylıgı + row.FiyatPerf) / 5).ToString() + "";

                var image = services.Image(int.Parse(row.ProductID.ToString()));

                ImgTicket.Source = image;


                if (ticket.FlagStatus(row.FeedBackDetail_ID) == false)
                {
                    lblTicketStatus.Content = "Bildirim Durumu : Açık";
                }
                else
                {
                    lblTicketStatus.Content = "Bildirim Durumu : Kapalı";
                }
                lblSikayet.Content = "" + row.UserReview.ToUpper() + "";

                if (row.CompanyReview != null && row.CompanyReview != "")
                {
                    lblFirmaAcıklamasi.Content = "" + row.CompanyReview.ToUpper() + "";
                }
                else
                {
                    lblFirmaAcıklamasi.Content = "Firma Henüz Geri Dönüş Yapmamıştır";
                }
            }
        }