예제 #1
0
        private void guardar()
        {
            int flag;

            if (cbAlergia.Checked)
            {
                flag = 1;
            }
            else
            {
                flag = 0;
            }

            Metodos guardarsalud = new Metodos();

            guardarsalud.Inicializar();

            string tabla   = "Salud";
            string setters = "saludAlergia, saludAlergiaDesc, saludSangre, saludMed, saludObraSoc, saludTelEm, saludExtra, socioID";
            string valores = "'" + flag + "','" + txtDescripcion.Text + "','" + txtSangre.Text + "','" + txtMedicamentos.Text + "','" + txtObra.Text + "'," + txtTelefonoEmerg.Text + ",'" + txtExtra.Text + "'," + lblID.Text + "";

            //MessageBox.Show(valores);

            guardarsalud.Insertar(tabla, setters, valores);
        }
예제 #2
0
        private void guardar()
        {
            string tabla   = "Profesional";
            string valores = "'" + txtNombre.Text + "','" + txtDomicilio.Text + "'," + txtTelefono.Text + ",'" + txtMail.Text + "'";
            string seters  = "profNombre, profDomicilio, profTelefono, profMail";

            Metodos nuevoprof = new Metodos();

            nuevoprof.Inicializar();
            nuevoprof.Insertar(tabla, seters, valores);
        }
예제 #3
0
        private void guardar()
        {
            string valores = "actDesc, actMeses, actNombre";
            string tabla   = "Actividades";
            string seters  = "'" + txtDescripcion.Text + "','" + txtMeses.Text + "','" + txtNombreActividad.Text + "'";

            Metodos nuevaact = new Metodos();

            nuevaact.Inicializar();
            nuevaact.Insertar(tabla, seters, valores);
        }
예제 #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            int flag;

            if (cbAlergia.Checked)
            {
                flag = 1;
            }
            else
            {
                flag = 0;
            }

            conModificar.Open();

            OleDbCommand cmdchequeo = new OleDbCommand();

            cmdchequeo.CommandText = "SELECT * FROM Salud";
            cmdchequeo.Connection  = conModificar;

            OleDbDataReader lector = cmdchequeo.ExecuteReader();

            while (lector.Read())
            {
                if (lector[1].ToString() == idsocio.ToString())
                {
                    control = true;
                    break;
                }
            }

            if (control == true)
            {
                string seters = "saludAlergia = '" + flag + "', saludAlergiaDesc = '" + txtDescripcion.Text + "', saludSangre = '" + txtSangre.Text + "', saludMed = '" + txtMedicamentos.Text + "', saludObraSoc = '" + txtObrasocial.Text + "', saludTelEm = " + txtEmergencia.Text + ", saludExtra = '" + txtExtra.Text + "'";
                string tabla  = "Salud";
                string key    = "socioID";

                Metodos guardar = new Metodos();
                guardar.Inicializar();
                guardar.Update(tabla, idsocio, seters, key);
            }
            else
            {
                string tabla   = "Salud";
                string seters  = "saludAlergia, saludAlergiaDesc, saludSangre, saludMed, saludObraSoc, saludTelEm, saludExtra, socioID";
                string valores = "'" + flag + "','" + txtDescripcion.Text + "','" + txtSangre.Text + "','" + txtMedicamentos.Text + "','" + txtObrasocial.Text + "','" + txtEmergencia.Text + "','" + txtExtra.Text + "'," + idsocio.ToString() + "";

                Metodos crear = new Metodos();
                crear.Inicializar();
                crear.Insertar(tabla, seters, valores);
            }

            conModificar.Close();
        }
예제 #5
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            Metodos guardar = new Metodos();

            guardar.Inicializar();

            string tabla   = "Grupo";
            string seters  = "grupoCategoria, grupoSocioPpal, grupoApellido, grupoNombre";
            string valores = "'" + cbCategoria.Text + "','" + txtSocioPpal.Text + "','" + txtApellido.Text + "','" + txtNombre.Text + "'";

            guardar.Insertar(tabla, seters, valores);
        }
예제 #6
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            Metodos insertar = new Metodos();

            insertar.Inicializar();

            string tabla   = "Niveles";
            string sets    = "nivelNumero, nivelNombre";
            string valores = "'" + txtNumero.Text + "','" + txtNombre.Text + "'";

            insertar.Insertar(tabla, sets, valores);
        }
예제 #7
0
        private void guardar()
        {
            int flag;

            if (rbHombre.Checked)
            {
                flag = 1;
            }
            else
            {
                flag = 0;
            }

            int estado;

            if (cbEstado.Checked)
            {
                estado = 1;
            }
            else
            {
                estado = 0;
            }

            Metodos nuevometodo = new Metodos();

            nuevometodo.Inicializar();


            string tabla   = "Socio";
            string seters  = "socioNombre, socioDNI, socioDireccion, socioMail, socioTelefono, socioCelular, socioGenero, socioNotas, socioFechaIng, socioFechaNac, socioCategoria, socioNivel, socioEstado";
            string valores = "'" + txtNombre.Text + "'," + txtDNI.Text + ",'" + txtDireccion.Text + "','" + txtMail.Text + "'," + txtTelefono.Text + "," + txtCelular.Text + ",'" + flag + "','" + txtNotas.Text + "'," + dtpHoy.Value.ToOADate() + "," + dtpNacimiento.Value.ToOADate() + ",'" + cbCategoria.Text + "','" + cbNivel.Text + "'," + estado + "";

            //double intermedio = DateTime.Now.ToOADate();
            //MessageBox.Show(intermedio.ToString());
            //MessageBox.Show(valores);


            nuevometodo.Insertar(tabla, seters, valores);
        }
예제 #8
0
        private void guardar()
        {
            Metodos guardar = new Metodos();

            int tarjeta;

            if (cbCard.Checked)
            {
                tarjeta = 1;
            }
            else
            {
                tarjeta = 2;
            }

            string tabla   = "Categoria";
            string sets    = "catDesc, catNombre, catMesAct, catMesInact, catClubCard, catCant";
            string valores = "'" + txtDescripcion.Text + "','" + txtNombre.Text + "'," + txtMesAct.Text + "," + txtMesInact.Text + "," + tarjeta + "," + cbCant.Text;

            guardar.Inicializar();
            guardar.Insertar(tabla, sets, valores);
        }