Пример #1
0
        private void btn_aceptar_Click(object sender, EventArgs e)
        {
            ClaseMultiusos cm = new ClaseMultiusos();

            try
            {
                cm.InsertarDatosAplicaciones("tbl_cuenta", txtIdCuenta.Text + "," + txtNumeroCuenta.Text + ",'" + DtpFechaCreacion.Value.ToString("yyyy-MM-dd") + "',0," + txt_TipoCuenta.Text + "," + txt_Empleado.Text + "," + txt_Agencia.Text + "," + txt_Moneda.Text + ",1");
                if (banderaTipoInsertCuenta == 0)
                {
                    foreach (DataGridViewRow row in dtg_Organizacion.Rows)
                    {
                        cm.InsertarDatosAplicaciones("tbl_cliente_has_tbl_cuenta", (Convert.ToString(row.Cells[0].Value)) + "," + txtIdCuenta.Text);
                    }
                    cm.InsertarDatosAplicaciones("tbl_organizacion_clientes_has_tbl_cuenta", txt_Organizacion.Text + "," + txtIdCuenta.Text);
                }
                else if (banderaTipoInsertCuenta == 1)
                {
                    cm.InsertarDatosAplicaciones("tbl_cliente_has_tbl_cuenta", txt_CodCliente.Text + "," + txtIdCuenta.Text);
                }
                MessageBox.Show("Insercion de datos exitosa");
                limpiar();
                regresarAEstadoInicial();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Пример #2
0
        private void btn_aceptar_Click(object sender, EventArgs e)
        {
            ClaseMultiusos cm = new ClaseMultiusos();

            try
            {
                cm.EliminarDatos("tbl_cliente_has_tbl_cuenta", "FK_id_Cuenta", txt_CodigoACambiar.Text);
                cm.ModificarDatos("tbl_cuenta", "id_cuenta=" + txtIdCuenta.Text + ", numero_de_cuenta=" + txtNumeroCuenta.Text + ", fecha_creacion='" + DtpFechaCreacion.Value.ToString("yyyy-MM-dd") + "', FK_id_tipo_cuenta=" + txt_TipoCuenta.Text + ", FK_id_empleado=" + txt_Empleado.Text + ", FK_id_agencia=" + txt_Agencia.Text + ", FK_id_moneda=" + txt_Moneda.Text, "id_cuenta", txt_CodigoACambiar.Text);
                if (banderaTipoInsertCuenta == 0)
                {
                    foreach (DataGridViewRow row in dtg_Organizacion.Rows)
                    {
                        cm.InsertarDatosAplicaciones("tbl_cliente_has_tbl_cuenta", (Convert.ToString(row.Cells[0].Value)) + "," + txtIdCuenta.Text);
                    }
                }
                else if (banderaTipoInsertCuenta == 1)
                {
                    cm.InsertarDatosAplicaciones("tbl_cliente_has_tbl_cuenta", txt_CodCliente.Text + "," + txtIdCuenta.Text);
                }
                limpiar();
                regresarAEstadoInicial();
                MessageBox.Show("Datos Modificados Exitosamente");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Пример #3
0
 private void btn_aceptar_Click(object sender, EventArgs e)
 {
     try
     {
         ClaseMultiusos cm = new ClaseMultiusos();
         cm.InsertarDatosAplicaciones("tbl_organizacion_clientes", txt_idOrg.Text + ",'" + txt_nombreOrg.Text + "'");
         MessageBox.Show("Datos Ingresados");
         regresarAEstadoInicial();
     }catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Пример #4
0
 private void btn_aceptar_Click(object sender, EventArgs e)
 {
     try
     {
         ClaseMultiusos cm = new ClaseMultiusos();
         cm.InsertarDatosAplicaciones("tbl_beneficiario_externo", txt_ID.Text + "," + txt_CuentaDestino.Text + ",'" + txt_TipoCuentaDestino.Text + "','" + txt_Nombre.Text + "','" + txt_Apellido1.Text + "','" + txt_Apellido2.Text + "','" + txt_TipoDoc.Text + "'," + txt_NDoc.Text + "," + txt_Telefono.Text + ",'" + txt_Correo.Text + "'," + txt_Cliente.Text + "," + txt_BancoExterno.Text + ",1");
         MessageBox.Show("Datos Ingresados");
         regresarAEstadoInicial();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Пример #5
0
 private void btn_aceptar_Click(object sender, EventArgs e)
 {
     try
     {
         ClaseMultiusos cm = new ClaseMultiusos();
         cm.InsertarDatosAplicaciones("tbl_cliente", txt_idCliente.Text + "," + txt_DPI.Text + ",'" + txt_nombreCl.Text + "','" + txt_Apellido1.Text + "','" + txt_Apellido2.Text + "'," + txt_Telefono.Text + "," + txt_Celular.Text + ",'" + txt_correo.Text + "','" + dtp_FecNac.Value.ToString("yyyy-MM-dd") + "','" + cbo_Genero.Text + "','" + txt_NIT.Text + "',1");
         MessageBox.Show("Datos Ingresados");
         regresarAEstadoInicial();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
        private void btn_masAgregar_Click(object sender, EventArgs e)
        {
            ClaseMultiusos cm = new ClaseMultiusos();

            try
            {
                cm.InsertarDatosAplicaciones("tbl_cliente_has_tbl_organizacion_clientes", txt_cliente.Text + "," + txt_org.Text);
                MessageBox.Show("Cliente agregado a la organizacion \"" + cbo_org.Text + "\"");
                cargarDTG();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }