private void btnRegresar_Click(object sender, EventArgs e) { InterfazPrincipalTecnico tecnico = new InterfazPrincipalTecnico(); tecnico.Show(); this.Hide(); }
private void salirToolStripMenuItem_Click(object sender, EventArgs e) { InterfazPrincipalTecnico tecnico = new InterfazPrincipalTecnico(); tecnico.Show(); this.Hide(); }
private void login() { string cargo; if (checkGerente.Checked == true) { cargo = "GERENTE"; this.tabla_aux.DataSource = NegocioUsuario.loginUsuario(this.txtUsuario.Text, this.txtPassword.Text, cargo); int var = Convert.ToInt32(this.tabla_aux.Rows[0].Cells[0].Value); if (var != 0) { InterfazPrincipalGerente gerente = new InterfazPrincipalGerente(); gerente.Show(); this.Hide(); } else { MessageBox.Show("Credenciales incorrectas", "LOGIN", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else if (checkCajero.Checked == true) { cargo = "CAJERO"; this.tabla_aux.DataSource = NegocioUsuario.loginUsuario(this.txtUsuario.Text, this.txtPassword.Text, cargo); int var = Convert.ToInt32(this.tabla_aux.Rows[0].Cells[0].Value); if (var != 0) { InterfazPrincipalCajero cajero = new InterfazPrincipalCajero(); cajero.Show(); this.Hide(); } else { MessageBox.Show("Credenciales incorrectas", "LOGIN", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else if (checkTecnico.Checked == true) { cargo = "TECNICO"; this.tabla_aux.DataSource = NegocioUsuario.loginUsuario(this.txtUsuario.Text, this.txtPassword.Text, cargo); int var = Convert.ToInt32(this.tabla_aux.Rows[0].Cells[0].Value); if (var != 0) { InterfazPrincipalTecnico tecnico = new InterfazPrincipalTecnico(); tecnico.Show(); this.Hide(); } else { MessageBox.Show("Credenciales incorrectas", "LOGIN", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }