private void BTN_FACURAS_Click(object sender, EventArgs e) { ABRIR_CONTENEDOR(new FACTURAS()); //BTN_FACURAS.BackColor = Color.FromArgb(0, 99, 177); //IMG_FACTURA.BackColor = Color.FromArgb(0, 99, 177); Size = new Size(1204, 515); this.lineShape1.X1 = 7; this.lineShape1.X2 = 239; this.lineShape1.Y1 = 431; this.lineShape1.Y2 = 431; this.pictureBox5.Location = new Point(4, 436); PANEL_PRINCIPAL PM = new PANEL_PRINCIPAL(); PM.Refresh(); }
private void BTN_ACCEDER_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand("SELECT * FROM USUARIOS WHERE USUARIO = @USUARIO AND PASSWORD = @PASSWORD ", conexion); SqlDataReader Trallendo_Datos; cmd.CommandType = CommandType.Text; conexion.Open(); cmd.Parameters.AddWithValue("@USUARIO", TXT_USUARIO.Text); cmd.Parameters.AddWithValue("@PASSWORD", TXT_PASSWORD.Text); Trallendo_Datos = cmd.ExecuteReader(); if (Trallendo_Datos.Read()) { CODIGO = Trallendo_Datos.GetInt32(0); USUARIO = Trallendo_Datos.GetString(3); PANEL_PRINCIPAL PM = new PANEL_PRINCIPAL(); NOTIFICACION.CONFIRMAR_NOTIFICACION("USUARIO CORRECTO.."); this.Hide(); PM.Show(); } else { ERROR.ERROR_M("CONTRASEÑA O USUARIO INCORRECTO"); } conexion.Close(); conexion.Open(); SqlCommand Consulta = new SqlCommand("ACT_DATOS", conexion); cmd.CommandType = CommandType.StoredProcedure; Consulta.ExecuteNonQuery(); conexion.Close(); }