Пример #1
0
        private void ButtonVoltar_Click(object sender, EventArgs e)
        {
            Register_ATV here  = new Register_ATV();
            Dashboard    there = new Dashboard();

            this.Hide();
            this.Closed += (s, args) => here.Close();
            there.Show();
        }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Register_ATV atividade = new Register_ATV();
            Dashboard    here      = new Dashboard();

            this.Hide();
            this.Closed += (s, args) => here.Close();
            atividade.Show();
        }
Пример #3
0
        private void ButtonCadastrar_Click(object sender, EventArgs e)
        {
            Class.UserVar     user = new Class.UserVar();
            DataBase.Database data = new DataBase.Database();
            bool queryDb           = data.CommandSQL("UPDATE dia SET tipo_atividade = '" + selectTipo.SelectedItem + "', duracao_atv = '" + inputTempo.Text + "'WHERE cpf ='" + user.Cpf + "' and dia = '" + user.Dia + "';");

            if (queryDb)
            {
                Register_ATV here  = new Register_ATV();
                Dashboard    there = new Dashboard();
                this.Hide();
                this.Closed += (s, args) => here.Close();
                there.Show();
                MessageBox.Show("Alteração Efetuada!", "Muito Obrigado!"
                                , MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
            else
            {
                MessageBox.Show("Alteração Não Efetuada!", "ERRO!"
                                , MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }