gr672_bda 4 年之前
父節點
當前提交
31ffa34f8a
共有 1 個文件被更改,包括 7 次插入1 次删除
  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;
             
         }
     }