Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
             
            User user1 = new User();
            user1.Username = username.Text;
            user1.Password = password.Text;

            bool logined = false;
            foreach (User item in Users.AllUsers)
            {
                if (item.Username == user1.Username && item.Password == user1.Password)
                {
                    logined = true;
                    break;
                }
            }
            if (logined)
            {
                Product product = new Product(this);
                this.Hide();
                product.Show();
            }
            else
            {
                Registor registor = new Registor();
                this.Hide();
                registor.Show();
            }

        }
Esempio n. 2
0
 private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     Registor registor = new Registor();
     this.Hide();
     registor.Show();
 }