protected override void Salvar() { base.Salvar(); Control[] array = { Txtcodigocliente, Txtaplicar, Cmbmoneda }; if (!Funciones.Fun_Validar_Campos_Vacios(array)) { if (Rbnreciboingreso.Checked) { Opcion_Pago.Proceso.genpropago pago = new Opcion_Pago.Proceso.genpropago(Txtaplicar.Text, Txtcodigocliente.Text, 1); if (pago.ShowDialog() == DialogResult.OK) { Fun_Procesar_Salvar(pago.cmd2); } } else if (Rbnaplicardeposito.Checked) { Fun_Procesar_Salvar(""); } } else { LblAlerta.Text = Mensajes.Stg_Campos_EnBlanco; } }
protected override void Salvar() { base.Salvar(); Control[] array = { Txtcobro, Txtcodigocliente, Txtmonto, Txtconcepto, Cmbmoneda }; string id = ""; if (!Funciones.Fun_Validar_Campos_Vacios(array)) { Opcion_Pago.Proceso.genpropago pago = new Opcion_Pago.Proceso.genpropago(Txtmonto.Text, Txtcodigocliente.Text, 1); if (pago.ShowDialog() == DialogResult.OK) { string cmd = string.Format("exec Spr_cxc_cobro_adelantado '{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}'", _OpcionSQL, Properties.Settings.Default.idsesion, 1, Txtcobro.Text, Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(Dtpfecha), Txtreferencia.Text, Funciones.Fun_Convierte_String_aEntrero(Txtcodigocliente.Text), Funciones.Fun_Convierte_String_aDecimal(Txtmonto.Text), Cmbmoneda.SelectedValue, Txtconcepto.Text.Trim()); DataSet ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); if (_OpcionSQL == "Modificar") { id = ds.Tables[0].Rows[0][0].ToString(); } else { id = ds.Tables[1].Rows[0][0].ToString(); } string cmdpago = string.Format("exec Spr_gen_pago '{0}','{1}','{2}','{3}','{4}'", Properties.Settings.Default.idsesion, 1, id, Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(Dtpfecha), pago.cmd2); DataSet ds2 = FuncionesSQL.Fun_Sql_Ejecutar(cmdpago); if (Ckbimprimir.Checked == true) { var Reporte = new Reporte_General.CXC.cxcrepcobroadelantado01(); Reporte._montoescrito = Funciones.Fun_Numero_aLetras_ConDecimal(Txtmonto.Text); Reporte._id = id; Reporte.Show(); Reporte.Owner = this; } Funciones.Fun_Limpiar_Formulario(MainPanel); if (_OpcionSQL == "Insertar") { Crear(); } else { Modificar(); } Ckbimprimir.Checked = true; LblAlerta.Text = ""; } else { LblAlerta.Text = Mensajes.Stg_Campos_EnBlanco; } } else { LblAlerta.Text = Mensajes.Stg_Campos_EnBlanco; } }