private void Load() { using (var BLT = new BanLapTopEntities()) { var User = (from n in BLT.TaiKhoans where n.IdNguoiDung == IdAdmin select n).FirstOrDefault(); if (User != null) { ImgAd.ToolTip = User.HoTen; txtNameUsers.Text = User.HoTen; byte[] bitImage = User.Avatar; if (bitImage != null) { ImgAd.Fill = new ImageBrush(ToImage(bitImage)); } else { ImgAd.Fill = new ImageBrush(new BitmapImage(new Uri("pack://application:,,,/Image/User.png", UriKind.Absolute))); } } } TongDoanhThu Pro = new TongDoanhThu(); txtTitle.Text = "Thống Kê"; UserView.Children.Clear(); UserView.Children.Add(Pro); }
private void Home_Click(object sender, RoutedEventArgs e) { TongDoanhThu Pro = new TongDoanhThu(); txtTitle.Text = "Thống Kê"; UserView.Children.Clear(); UserView.Children.Add(Pro); }