예제 #1
0
        //HandleFormSubmit


        private void loginButton_Click(object sender, EventArgs e)
        {
            List <string> getData = new List <string>();

            DataBase.Database data = new DataBase.Database();


            List <string> day = new List <string>();

            day     = data.CommandSelectSQL("select MAX(dia) from dia where cpf = '" + inputLogin.Text + "';");
            getData = data.CommandSelectSQL("select cpf,senha,nome from pessoa where cpf = '" + inputLogin.Text + "' and senha ='" + inputSenha.Text + "'");

            if (getData.Count != 0)
            {
                Class.UserVar.CPF_LOGIN   = getData[0];
                Class.UserVar.SENHA_LOGIN = getData[1];
                Class.UserVar.TODAY       = day[0];

                Views.Dashboard userView     = new Views.Dashboard();
                Welcome_View    welcome_View = new Welcome_View();
                this.Hide();
                this.Closed += (s, args) => welcome_View.Close();
                userView.Show();
            }
            else
            {
                MessageBox.Show("Login ou Senha Incorretos!", "Seu Login foi mal Sucedido!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #2
0
        private void ButtonVoltar(object sender, EventArgs e)
        {
            Warning      warning      = new Warning();
            Welcome_View welcome_View = new Welcome_View();

            this.Hide();
            this.Closed += (s, args) => warning.Close();
            welcome_View.Show();
        }
예제 #3
0
        private void LoadRegisterScreen(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Welcome_View welcome_View = new Welcome_View();
            Warning      warning      = new Warning();

            this.Hide();
            this.Closed += (s, args) => welcome_View.Close();
            warning.Show();
        }