Пример #1
0
        public Users(string userID)
        {
            InitializeComponent();
            ErrorMessage.Visible = false;
            Connect2DB con = new Connect2DB();

            this.userID = userID;
            if (userID == null)
            {
                ErrorMessage.Visible = true;
            }
            else
            {
                UserAllName.Text = con.getUserAllName(userID);
                if (UserAllName.Text == null)
                {
                    ErrorMessage.Visible = true;
                }
                else
                {
                    UserAge.Text = "Age: " + con.getUserAge(userID);
                }
            }
        }