Пример #1
0
        private void pictureBox4_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form f = new frm_menu();

            f.Closed += (s, args) => this.Close();
            f.Show();
        }
Пример #2
0
        private void EfetuarLogin()
        {
            var user = DataContextFactory.DataContext.tb_usuario.Count(x => x.usuario == usuarioTextBox.Text && x.senha == senhaTextBox.Text);
            var adm  = DataContextFactory.DataContext.tb_adm.Count(x => x.usuario == usuarioTextBox.Text && x.senha == senhaTextBox.Text);

            if (user > 0 && func.Checked)
            {
                this.Hide();
                Form f = new frm_menu();
                f.Closed += (s, args) => this.Close();
                f.Show();
            }
            else if (adm > 0 && adminis.Checked)
            {
                this.Hide();
                Form f = new frm_adimin();
                f.Closed += (s, args) => this.Close();
                f.Show();
            }
            else
            {
                MessageBox.Show("Usuário ou senha incorretos");
            }
        }