示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool chechPassword = false;

            if (textBox1.Text == "" & textBox2.Text == "")
            {
                MessageBox.Show("Введите данные", "Ошибка", MessageBoxButtons.OK);
            }
            else
            {
                foreach (Autorization author in Program.sinDB.Autorization)
                {
                    if (textBox1.Text == author.Login & textBox2.Text == author.Password)
                    {
                        chechPassword = true;
                    }
                }
            }
            if (chechPassword)
            {
                FormMenu Menu = new FormMenu();
                textBox1.Text = "";
                textBox2.Text = "";
                this.Hide();
                Menu.Show();
            }
            else
            {
                MessageBox.Show("Данные введены неверно", "Ошибка", MessageBoxButtons.OK);
                textBox1.Text = "";
                textBox2.Text = "";
            }
        }
示例#2
0
        public void Back()
        {
            Form menu = new FormMenu();

            this.Hide();
            menu.Show();
        }
示例#3
0
        private void buttonClients_Click(object sender, EventArgs e)
        {
            FormMenu Menu = new FormMenu();

            Menu.StartPosition = FormStartPosition.Manual;
            Menu.Left          = this.Left;
            Menu.Top           = this.Top;
            this.Hide();
            Menu.Show();
        }