//Código do login do usuario↓
        private void btnLogar_Click(object sender, RoutedEventArgs e)
        {
            var    login = new Modelo.Login();
            string Email_Contato;
            string Senha;

            Email_Contato = txbLogin.Text;
            Senha         = txbSenha.Text;

            if (login.Logon(Email_Contato, Senha) == true)
            {
                Apresentacao.frmPaginaPrincipal frmC = new Apresentacao.frmPaginaPrincipal();
                frmC.ShowDialog();
            }
            if (login.Logon(Email_Contato, Senha) == false)
            {
                MessageBox.Show("Login ou Senha incorretos");
            }
        }
Beispiel #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.frmPaginaInicial = ((SistemaEvolution.Apresentacao.frmPaginaPrincipal)(target));
                return;

            case 2:
                this.mniPaginaCadastros = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 3:
                this.mniPaginaUsuarios = ((System.Windows.Controls.MenuItem)(target));

            #line 20 "..\..\..\Apresentacao\frmPaginaPrincipal.xaml"
                this.mniPaginaUsuarios.Click += new System.Windows.RoutedEventHandler(this.mniPaginaUsuarios_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.mniPaginaClientes = ((System.Windows.Controls.MenuItem)(target));

            #line 26 "..\..\..\Apresentacao\frmPaginaPrincipal.xaml"
                this.mniPaginaClientes.Click += new System.Windows.RoutedEventHandler(this.mniPaginaClientes_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.mniPaginaProdutos = ((System.Windows.Controls.MenuItem)(target));

            #line 32 "..\..\..\Apresentacao\frmPaginaPrincipal.xaml"
                this.mniPaginaProdutos.Click += new System.Windows.RoutedEventHandler(this.mniPaginaProdutos_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.mniPaginaFuncionario = ((System.Windows.Controls.MenuItem)(target));

            #line 37 "..\..\..\Apresentacao\frmPaginaPrincipal.xaml"
                this.mniPaginaFuncionario.Click += new System.Windows.RoutedEventHandler(this.mniPaginaFuncionario_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.mniPaginaChamados = ((System.Windows.Controls.MenuItem)(target));

            #line 47 "..\..\..\Apresentacao\frmPaginaPrincipal.xaml"
                this.mniPaginaChamados.Click += new System.Windows.RoutedEventHandler(this.mniPaginaChamados_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }