Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            User    newUser = new User(-1, txtNome.Text, txtLogin.Text, txtSenha.Text, txtEmail.Text, comboBox1.Text, new Series());
            dbClass dbc     = new dbClass();

            if (dbc.cadastraUsuario(newUser))
            {
                MessageBox.Show("Usuário cadastrado!");
                this.Close();
            }
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            dbClass dbc  = new dbClass();
            User    back = dbc.verificaUsuario(this.user.login, this.user.senha);

            this.user = back;
            qSeries   = back.series.cont;
            last      = 0;
            limpaPaineis();
            CarregaSeries();
        }
Example #3
0
        private void btnExcluir_Click(object sender, EventArgs e)
        {
            Serie   name = this.user.series.series.ElementAt(cmbSeries.Items.IndexOf(cmbSeries.Text));
            dbClass dbc  = new dbClass();

            if (dbc.excluiSerie(name))
            {
                MessageBox.Show("Série excluida!");
            }
            Form   frmAcoes = Application.OpenForms["frmAcoes"];
            Button btn      = (Button)frmAcoes.Controls["btnRecarregar"];

            btn.PerformClick();
            this.Close();
        }
Example #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.serie = new Serie(this.user.id, txtNome.Text, txtEp.Text, txtTemporada.Text, txtCategoria.Text, txtImgSrc.Text);
            dbClass dbc = new dbClass();

            if (dbc.cadastraSerie(this.serie))
            {
                MessageBox.Show("Série cadastrada!", "Séries Manager", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            Form   frmAcoes      = Application.OpenForms["frmAcoes"];
            Button btnRecarregar = (Button)frmAcoes.Controls["btnRecarregar"];

            btnRecarregar.PerformClick();
            this.Close();
        }
Example #5
0
        public void atualizaSerie()
        {
            dbClass dbc = new dbClass();

            dbc.atualizaSerie(this._serie);
        }