private void button1_Click_1(object sender, EventArgs e) { try { if (txtSenha1.Text == txtSenha2.Text) { Business.LoginBusiness bu = new Business.LoginBusiness(); DataBase.Entity.tb_login mod = new DataBase.Entity.tb_login(); mod.nm_email = usuario; mod.pw_senha = txtSenha1.Text; bu.AlterarSenha(mod); MessageBox.Show("Senha alterada com sucesso"); Telas.FrmLoginOtica tela = new FrmLoginOtica(); tela.Show(); Hide(); } else { throw new ArgumentException("As senhas não conferem"); } } catch (ArgumentException ex) { MessageBox.Show(ex.Message); } }
private void timer1_Tick(object sender, EventArgs e) { Telas.FrmLoginOtica tela = new FrmLoginOtica(); tela.Show(); DataBase.Entity.db_a4f62c_oticaEntities db = new DataBase.Entity.db_a4f62c_oticaEntities(); db.tb_login.Where(x => x.id_login > 0); timer1.Stop(); Hide(); }
private void pictureBox2_Click(object sender, EventArgs e) { Telas.FrmLoginOtica telas = new FrmLoginOtica(); telas.Show(); Hide(); }