예제 #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            this.Close();
            IronStoreMain main = new IronStoreMain();

            main.Show();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (txt_username.Text == "" || txt_password.Text == "")
            {
                MessageBox.Show("Please enter Values");
                return;
            }

            else
            {
                string userName = txt_username.Text;
                string password = txt_password.Text;
                // MessageBox.Show(userName+password);
                if (db.Logins.Any(a => a.UserName == userName && a.Password == password))
                {
                    MessageBox.Show("Login Success! Welcome to IronStore Software.");
                    this.Hide();
                    IronStoreMain main = new IronStoreMain();
                    main.Show();
                }
                else
                {
                    MessageBox.Show("Please enter valid Username and Password");
                }
            }
        }