Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            wfInicioSesion frm = new wfInicioSesion();
            wfMenuTurnos frm1 = new wfMenuTurnos();
            wfPantallaTurnos frm2 = new wfPantallaTurnos();

            this.Hide();
            frm1.Show();
            frm2.Show();
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            wfInicioSesion frmSesion = new wfInicioSesion();
            wfMenuTurnos frmTurno = new wfMenuTurnos();
            wfPantallaTurnos frmPantalla = new wfPantallaTurnos();
            wfTerminal frmTerminal = new wfTerminal();

                try
                {
                    String S_cadena = "Server=192.168.1.100;User ID= root; Database= bd_turnos; Password=GrupoSGT014;";
                    SQL_Conexion.ConnectionString = S_cadena;
                    SQL_Conexion.Open();
                    SQL_cmd = new MySqlCommand("Select id_usuario from tabm_usuario WHERE usur_pass='******'", SQL_Conexion);

                    Object obj = SQL_cmd.ExecuteScalar();

                    if (obj == null)
                    {
                        MessageBox.Show("Error", "El  usuario y contraseña son invalidos validos, intente de nuevo");
                        contadorInicioSesion += 1;
                        textBox1.Text = "";
                        textBox2.Text = "";
                        SQL_Conexion.Close();

                    }
                    else
                         {
                             MessageBox.Show("Bienvenido al sistema");
                                 textBox1.Text = "";
                                 textBox2.Text = "";
                                 SQL_Conexion.Close();
                                 this.Hide();

                                 frmPantalla.Show();

                           }
                }
                catch (MySqlException)
                {

                }
        }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            wfInicioSesion frm = new wfInicioSesion();
            wfMenuTurnos wfMenuTurnos = new wfMenuTurnos();
            wfPantallaTurnos wfPantallaTurnos = new wfPantallaTurnos();

            try
            {
                String S_cadena = "Server=192.168.1.100;UID= root; Database= bd_turnos; Password=GrupoSGT014;";
                SQL_Conexion.ConnectionString = S_cadena;
                SQL_Conexion.Open();
                SQL_cmd = new MySqlCommand("INSERT INTO tabm_modulo VALUES  ('" + txtIdmodulo.Text + "','" + txtModl_nom.Text + "','" + txtModl_estd.Text + "','" + txtModl_desp.Text  + "')", SQL_Conexion);
                SQL_cmd.ExecuteNonQuery();
                SQL_Conexion.Close();

                MessageBox.Show("Item agregado Exitosamente ", "Bienvenido al sistema", MessageBoxButtons.OK, MessageBoxIcon.Information);

            }
            catch (MySqlException)
            {

            }
        }