예제 #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            App    app     = Application.Current as App;
            string ID      = app.ID;
            User   webUser = new User();

            webUser = sc.FindUID(ID);
            welcomelabel.Content = "Welcome:" + webUser.Uname + "!";
        }
예제 #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            App    app = Application.Current as App;
            string ID  = app.ID;


            User webUser = new User();

            webUser           = sc.FindUID(ID);
            idlabel.Content   = webUser.UID.ToString();
            namelabel.Content = webUser.Uname;
            agelabel.Content  = webUser.Uage.ToString();
            sexlabel.Content  = webUser.Usex;
            datelabel.Content = webUser.Udate;
        }
예제 #3
0
        private void enterbutton_Click(object sender, RoutedEventArgs e)
        {
            string ID       = idtextBox.Text;
            string Password = passwordBox.Password;

            loginUser.UID      = int.Parse(ID);
            loginUser.Password = Password;
            webUser            = sc.FindUID(ID);
            if (webUser.Password == loginUser.Password)
            {
                App app = Application.Current as App;
                app.ID = loginUser.UID.ToString();
                Login win = new Login();
                this.Close();
                win.Show();
            }
            else
            {
                MessageBox.Show("ID or Pass have wrong!");
            }
        }