private void bt_Buscar_Click(object sender, EventArgs e) { form_usuario._IdUsuario = Convert.ToInt32(textIdUsuario.Text); NL_Usuario x = new NL_Usuario(form_usuario); mensagem = x.PesquisarUsuario(); textNome.Text = x.usuario._nome; // textPass.Text = x.usuario._senha; textRG.Text = x.usuario._Rg.ToString(); textBoxTelefone.Text = x.usuario._telefone.ToString(); // dateTimePickerDtNascimento.Value = new DateTime(x.usuario._dataNasc.Year, x.usuario._dataNasc.Month, x.usuario._dataNasc.Day); }
private void bt_entrar_Click(object sender, EventArgs e) { this.dadosLogin._IdUsuario = Convert.ToInt32(user.Text); this.dadosLogin._senha = senha.Text; NL_Usuario x = new NL_Usuario(dadosLogin); mensagem = x.Login(); if (mensagem._codRetorno == 0) { MessageBox.Show(mensagem._mensagem); this.Close(); } else { user.Text = " "; senha.Text = " "; MessageBox.Show(mensagem._mensagem); } }
private void BtConfirmar_Click(object sender, EventArgs e) { if (textNovaSenha.Text == textConfirmeNova.Text) { this.dadosAtuais._IdUsuario = Convert.ToInt32(textUsuario.Text); this.dadosNovos._IdUsuario = Convert.ToInt32(textUsuario.Text); this.dadosAtuais._senha = textSenhaAtual.Text; this.dadosNovos._senha = textNovaSenha.Text; NL_Usuario x = new NL_Usuario(this.dadosAtuais, this.dadosNovos); mensagem = x.AlterarSenha(); MessageBox.Show(mensagem._mensagem); } else { MessageBox.Show("Confirme a nova senha Corretamente!"); } }
private void bt_cadastrar_User_Click(object sender, EventArgs e) { Object selectedGerencia = comboBoxGerencia.SelectedItem; Object selectedBar = comboBoxBar.SelectedItem; Object selectedRecepcao = comboBoxRecepcao.SelectedItem; Object selectedCaixa = comboBoxCaixa.SelectedItem; form_usuario._IdUsuario = Convert.ToInt32(textIdUsuario.Text); form_usuario._senha = textPass.Text; form_usuario._nome = textNome.Text; form_usuario._Rg = Convert.ToInt32(txtRG.Text); form_usuario._Email = textEmail.Text; form_usuario._telefone = Convert.ToInt32(textBoxTelefone.Text); form_usuario._dataNasc = dateTimePickerDtNascimento.Value.Date; if ((selectedGerencia.ToString() == "SIM")) { form_usuario._perfilGerencia = 1; } else { form_usuario._perfilGerencia = 0; } if ((selectedRecepcao.ToString() == "SIM")) { form_usuario._perfilRecepcao = 1; } else { form_usuario._perfilRecepcao = 0; } if ((selectedBar.ToString() == "SIM")) { form_usuario._perfilBar = 1; } else { form_usuario._perfilBar = 0; } if ((selectedCaixa.ToString() == "SIM")) { form_usuario._perfilCaixa = 1; } else { form_usuario._perfilCaixa = 0; } NL_Usuario x = new NL_Usuario(form_usuario); mensagem = x.CadastrarUsuario(); MessageBox.Show(mensagem._mensagem); }