private void btn_aceptar_Click(object sender, EventArgs e) { ClaseMultiusos cm = new ClaseMultiusos(); List <string> comandos = new List <string>(); try { /*cm.InsertarDatosAplicaciones("tbl_transferencia", "0,'" + dtp_Fecha.Value.ToString("yyyy-MM-dd") + "'," + txt_Importe.Text + ",'" + txt_Nota.Text + "'," + txt_Cuenta.Text + "," + txt_CuentaOrg.Text + "," + txt_Agencia.Text + "," + txt_Empleado.Text + "," + txt_tipoTrans.Text + " , 1"); * cm.InsertarDatosAplicaciones("tbl_movimientos_cuenta", "0, 'Pago a organizaciones'," + txt_Importe.Text + ",'" + dtp_Fecha.Value.ToString("yyyy-MM-dd") + "'," + txt_Cuenta.Text + ",2"); * cm.InsertarDatosAplicaciones("tbl_movimientos_cuenta", "0, 'Ingreso por pago a organizaciones'," + txt_Importe.Text + ",'" + dtp_Fecha.Value.ToString("yyyy-MM-dd") + "'," + txt_CuentaOrg.Text + ",2"); * cm.ModificarDatos("tbl_cuenta", "saldo = " + newSaldo, "id_cuenta", txt_Cuenta.Text); * cm.ModificarDatos("tbl_cuenta", "saldo = " + newSaldo2, "id_cuenta", txt_CuentaOrg.Text); */ comandos.Add(cm.DevolverSentencia_Insert("tbl_transferencia", "0,'" + dtp_Fecha.Value.ToString("yyyy-MM-dd") + "'," + txt_Importe.Text + ",'" + txt_Nota.Text + "'," + txt_Cuenta.Text + "," + txt_CuentaOrg.Text + "," + txt_Agencia.Text + "," + txt_Empleado.Text + "," + txt_tipoTrans.Text + " , 1")); comandos.Add(cm.DevolverSentencia_Insert("tbl_movimientos_cuenta", "0, " + txt_Importe.Text + ",'" + dtp_Fecha.Value.ToString("yyyy-MM-dd") + "',0," + txt_Cuenta.Text + ",2,1")); comandos.Add(cm.DevolverSentencia_Insert("tbl_movimientos_cuenta", "0, " + txt_Importe.Text + ",'" + dtp_Fecha.Value.ToString("yyyy-MM-dd") + "',1," + txt_CuentaOrg.Text + ",2,1")); comandos.Add(cm.DevolverSentencia_Modificar("tbl_cuenta", "saldo = " + newSaldo, "id_cuenta", txt_Cuenta.Text)); comandos.Add(cm.DevolverSentencia_Modificar("tbl_cuenta", "saldo = " + newSaldo2, "id_cuenta", txt_CuentaOrg.Text)); cm.EjectuarOperacionExterna(comandos, "Transferencia a organizacion", "81500"); MessageBox.Show("Transaccion realizada"); limpiar(); RegresarAEstadoInicial(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void btn_aceptar_Click(object sender, EventArgs e) { try { ClaseMultiusos cm = new ClaseMultiusos(); List <string> comandos = new List <string>(); /*cm.InsertarDatosAplicaciones("tbl_transferencia_externa", txt_codigo.Text + ",'" + dtp_Fecha.Value.ToString("yyyy-MM-dd") + "'," + txt_Importe.Text + ",'" + txt_Nota.Text + "'," + txt_Cuenta.Text + "," + txt_BenExterno.Text + "," + txt_Agencia.Text + "," + txt_Empleado.Text + ", 'Solicitud Enviada' , 1"); * cm.InsertarDatosAplicaciones("tbl_solicitud_compensacion", "0, '" + dtp_Fecha.Value.ToString("yyyy-MM-dd") + "', 'Pendiente'," + txt_codigo.Text); * cm.InsertarDatosAplicaciones("tbl_movimientos_cuenta", "0, 'Transferencia Externa'," + txt_Importe.Text + ",'" + dtp_Fecha.Value.ToString("yyyy-MM-dd") + "'," + txt_Cuenta.Text + ",1"); * cm.ModificarDatos("tbl_cuenta", "saldo = " + newSaldo, "id_cuenta", txt_Cuenta.Text);*/ comandos.Add(cm.DevolverSentencia_Insert("tbl_transferencia_externa", txt_codigo.Text + ",'" + dtp_Fecha.Value.ToString("yyyy-MM-dd") + "','" + txt_Importe.Text + "','" + txt_Nota.Text + "'," + txt_Cuenta.Text + "," + txt_BenExterno.Text + "," + txt_Agencia.Text + "," + txt_Empleado.Text + ", 'Solicitud Enviada' , 1")); comandos.Add(cm.DevolverSentencia_Insert("tbl_solicitud_compensacion", "0, '" + dtp_Fecha.Value.ToString("yyyy-MM-dd") + "', 'Pendiente'," + txt_codigo.Text)); comandos.Add(cm.DevolverSentencia_Insert("tbl_movimientos_cuenta", "0,'" + txt_Importe.Text + "','" + dtp_Fecha.Value.ToString("yyyy-MM-dd") + "',1," + txt_Cuenta.Text + ",1,1")); comandos.Add(cm.DevolverSentencia_Modificar("tbl_cuenta", "saldo = '" + newSaldo + "'", "id_cuenta", txt_Cuenta.Text)); //MessageBox.Show(cm.gg()); cm.EjectuarOperacionExterna(comandos, "Ingreso de Transferencia Externa", "81500"); MessageBox.Show("Transaccion realizada"); limpiar(); RegresarAEstadoInicial(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }