gr672_bda vor 4 Jahren
Ursprung
Commit
31ffa34f8a
1 geänderte Dateien mit 7 neuen und 1 gelöschten Zeilen
  1. 7 1
      ProjectAnalogParus/InfoUserPage.xaml.cs

+ 7 - 1
ProjectAnalogParus/InfoUserPage.xaml.cs

@@ -20,11 +20,17 @@ namespace ProjectAnalogParus
     /// </summary>
     public partial class InfoUserPage : Page
     {
-        public InfoUserPage()
+        public int? UserID { get; set; }
+        public InfoUserPage(int? UserID)
         {
             gr672_bdaEntities db = new gr672_bdaEntities();
             InitializeComponent();
 
+            User us = db.User.SingleOrDefault(item => item.IdUser == UserID);
+            txtName.Text = us.NameUser;
+            txtFullName.Text = us.FullNameUser;
+            txtPassword.Text = us.Password;
+            txtRole.Text = us.Role.NameRole;
             
         }
     }