gr672_bda 4 gadi atpakaļ
vecāks
revīzija
31ffa34f8a
1 mainītis faili ar 7 papildinājumiem un 1 dzēšanām
  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;
             
         }
     }