private void btnAceptar_Click(object sender, EventArgs e) { try { TableBaseBE TableBaseBE = new TableBaseBE() { USUARIO = General.General.GetCodigoUsuario, OPCION = 2, Table_Id = txtTable_Id.Text, Table_Parent_Id = txtTable_Parent_Id.Text, Table_Name = txtTable_Name.Text, Table_Order = txtTable_Order.Text, Table_Value = txtTable_Value.Text, }; DataSet dsTableBase = new DataSet(); dsTableBase = TableBaseBL.ProcesarTableBase(TableBaseBE); //MessageBox.Show("Se Proceso Correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Dispose(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private bool validaUsuarioActivacionMenu() { TableBaseBL oTableBaseBL = new TableBaseBL(); TableBaseBE oTableBaseBE = new TableBaseBE(); string indActivador = string.Empty; //DataSet ds = null; List <TableBaseBE> lstTableBase = new List <TableBaseBE>(); oTableBaseBE.Table_Parent_Id = AppSettings.listaUsuariosMenuDinamico; oTableBaseBE.OPCION = 1; lstTableBase = oTableBaseBL.ProcesarTableBase(oTableBaseBE); if (lstTableBase.Count > 0) { foreach (TableBaseBE tableBase in lstTableBase) { if (tableBase.Table_Value == General.GetCodigoUsuario.Trim()) { return(true); } } } return(false); }
private void validaActivacionMenu() { if (validaUsuarioActivacionMenu()) { TableBaseBL oTableBaseBL = new TableBaseBL(); TableBaseBE oTableBaseBE = new TableBaseBE(); string indActivador = string.Empty; //DataSet ds = null; List <TableBaseBE> lstTableBaseBE = new List <TableBaseBE>(); oTableBaseBE.Table_Id = AppSettings.activadorMenuDinamico; oTableBaseBE.OPCION = 1; lstTableBaseBE = oTableBaseBL.ProcesarTableBase(oTableBaseBE); indActivador = lstTableBaseBE[0].Table_Value; //ds.Tables[0].Rows[0]["Table_Value"].ToString(); if (indActivador == "1") { //mnuDinamico.Visible = false; mnuDinamico.Items.Clear(); mnuDinamico.Visible = true; loadMenu(); } else { mnuDinamico.Visible = true; } } else { mnuDinamico.Visible = true; } }
private void LlenarCombos() { try { LlenarTipoCuenta(); String Table_Id = "00070"; TableBaseBE TableBaseBE = new TableBaseBE() { OPCION = 1, USUARIO = General.General.GetCodigoUsuario, Table_Parent_Id = Table_Id }; General.General.LlenarCombobox(cbovalorFormaPagoID, "Table_Name", "Table_Value", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "00074"; General.General.LlenarCombobox(cbovalorTipoDesemID, "Table_Name", "Table_Value", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "00035"; //Moneda cboIdMoneda_tt.DataSource = TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]; cboIdMoneda_tt.DisplayMember = "Table_Name"; cboIdMoneda_tt.ValueMember = "Table_Id"; } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void CargarTablas() { try { DataSet ds = new DataSet(); TableBaseBE TableBaseBE = new TableBaseBE() { OPCION = 4, USUARIO = General.General.GetUsuario, Table_Name = txtTabla.Text }; ds = TableBaseBL.ProcesarTableBase(TableBaseBE); dgvTablasPadre.DataSource = ds.Tables[0]; lblRegistros.Text = ds.Tables[0].Rows.Count.ToString() + " registro(s)"; } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void LlenarCombos() { String Table_Id = "00009"; TableBaseBE TableBaseBE = new TableBaseBE() { OPCION = 1, USUARIO = General.General.GetCodigoUsuario, Table_Parent_Id = Table_Id }; General.General.LlenarCombobox(cboIdCargo_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); }
private void LlenarCombos() { string Table_Id = "00035"; TableBaseBE TableBaseBE = new TableBaseBE() { OPCION = 1, USUARIO = General.General.GetCodigoUsuario, Table_Parent_Id = Table_Id }; cboIdMoneda_tt.DataSource = TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]; cboIdMoneda_tt.DisplayMember = "Table_Name"; cboIdMoneda_tt.ValueMember = "Table_Id"; cboIdMoneda_tt_SelectedIndexChanged(new object(), new EventArgs()); }
private void LlenarCombos() { String Table_Id = "00009"; TableBaseBE TableBaseBE = new TableBaseBE() { OPCION = 1, USUARIO = General.General.GetCodigoUsuario, Table_Parent_Id = Table_Id }; General.General.LlenarCombobox(cboIdCargo_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); //cboIdCargo_tt.DataSource = TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]; //cboIdCargo_tt.DisplayMember = "Table_Name"; //cboIdCargo_tt.ValueMember = "Table_Id"; }
private void LlenarCombos() { try { String Table_Id = "00118"; //Estados de Lotes para filtros de aprobacion TableBaseBE TableBaseBE = new TableBaseBE() { OPCION = 1, USUARIO = General.General.GetCodigoUsuario, Table_Parent_Id = Table_Id }; DataTable dt = TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]; General.General.LlenarCombobox(cboIdEstado_tt, "Table_Name", "Table_Value", dt); cboIdEstado_tt.SelectedValue = "00059"; //Por Aprobar } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/* LLenar Combobox */ private void LlenarCombos() { try { //cboConcepto TarifarioBE TarifarioBE = new TarifarioBE() { OPCION = 5, USUARIO = General.General.GetUsuario }; General.General.LlenarCombobox(cboConcepto, "tipCxcNombre", "tipCxcID", TarifarioBL.ProcesarTarifario(TarifarioBE).Tables[0]); // Combos de Tabla Base String Table_Id = "00102"; // Porcentaje Conceptos TableBaseBE TableBaseBE = new TableBaseBE() { OPCION = 1, USUARIO = General.General.GetCodigoUsuario, Table_Parent_Id = Table_Id }; General.General.LlenarCombobox(cboPorConcepto, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "00098"; // Frecuencia General.General.LlenarCombobox(cboFrecuencia, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "00035"; // Moneda General.General.LlenarCombobox(cboMoneda, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "00126"; // Tipo de Calculo General.General.LlenarCombobox(cboIdTipoCalculo_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void LlenarCombos() { DocumentoBE DocumentoBE = new DocumentoBE() { OPCION = 1, USUARIO = General.General.GetCodigoUsuario }; General.General.LlenarCombobox(cboIdDocumento, "vDocumento", "IdDocumento", DocumentoBL.ProcesarDocumento(DocumentoBE).Tables[0]); //cboIdDocumento.DataSource = DocumentoBL.ProcesarDocumento(DocumentoBE).Tables[0]; //cboIdDocumento.DisplayMember = "vDocumento"; //cboIdDocumento.ValueMember = "IdDocumento"; String Table_Id = "00012"; TableBaseBE TableBaseBE = new TableBaseBE() { OPCION = 1, USUARIO = General.General.GetCodigoUsuario, Table_Parent_Id = Table_Id }; General.General.LlenarCombobox(cboIdFormaPago_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "00433"; //Tipo Confirmacion General.General.LlenarCombobox(cboIdTipoConfirmacion_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "00999"; //Tipo Transferencia Titularidad General.General.LlenarCombobox(cboIdTipoTransferencia_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "01003"; //Tipo Carta/Documentos Pagadora General.General.LlenarCombobox(cboIdTipoCartaP_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "01003"; //Tipo Carta/Documentos Pagadora General.General.LlenarCombobox(cboIdTipoCartaE_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "01057"; //Frecuencia General.General.LlenarCombobox(cboIdFrecuencia_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "01060"; //Días de Pago Frecuencia General.General.LlenarCombobox(cboIdDiasPagoFrecuencia_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); //cboIdFormaPago_tt.DataSource = TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]; //cboIdFormaPago_tt.DisplayMember = "Table_Name"; //cboIdFormaPago_tt.ValueMember = "Table_Id"; }
private void LlenarCombos() { try { String Table_Id = "00035"; TableBaseBE TableBaseBE = new TableBaseBE() { OPCION = 1, USUARIO = General.General.GetCodigoUsuario, Table_Parent_Id = Table_Id }; General.General.LlenarCombobox(cboIdMoneda_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void LlenarCombos() { try { //General.General.LlenarCombobox(cboIdPagadora, "vcPagadora", "IdPagadora", _dsPagadoras.Tables[0], false); String Table_Id = "00001"; //SECTORES TableBaseBE TableBaseBE = new TableBaseBE() { OPCION = 1, USUARIO = General.General.GetCodigoUsuario, Table_Parent_Id = Table_Id }; General.General.LlenarCombobox(cboidsector_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); //TableBaseBE.Table_Parent_Id = "00042"; //TIPO LINEA //General.General.LlenarCombobox(cboIdTipoLin_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "00234"; //TIPO SERVICIO General.General.LlenarCombobox(cboIdTipoSer_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "00035"; //MONEDA General.General.LlenarCombobox(cboIdMoneda_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); TableBaseBE.Table_Parent_Id = "00009"; //CARGO General.General.LlenarCombobox(cboidcargo_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnAceptar_Click(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(txtnLinea.Text.Trim())) { MessageBox.Show("Debe Ingresar una Línea de Crédito", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txtnLinea.Focus(); return; } if (string.IsNullOrEmpty(cboIdNivelAutonomia_tt.SelectedValue.ToString())) { MessageBox.Show("Debe Seleccionar una Nivel de Autonomía", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); cboIdNivelAutonomia_tt.Focus(); return; } if (cboIdMoneda_tt.SelectedIndex == -1) { MessageBox.Show("Debe Seleccionar una Moneda", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); cboIdMoneda_tt.Focus(); return; } if (decimal.Parse(txtnLineaImporte.Text.Trim()) == 0) { MessageBox.Show("El Importe debe ser mayor a 0", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txtnLineaImporte.Focus(); return; } DataSet dsTableBase = new DataSet(); TableBaseBE TableBaseBE = new TableBaseBE() { OPCION = 1, USUARIO = General.General.GetCodigoUsuario, Table_Id = cboIdNivelAutonomia_tt.SelectedValue.ToString() }; dsTableBase = TableBaseBL.ProcesarTableBase(TableBaseBE); if (dsTableBase.Tables[0].Rows.Count > 0) { decimal Valor = Convert.ToDecimal(dsTableBase.Tables[0].Rows[0]["Table_Value"]); if (Valor > 0) { if (cboIdMoneda_tt.SelectedValue.ToString().Equals("1") || cboIdMoneda_tt.SelectedValue.ToString().Equals("00036")) { if (decimal.Parse(txtnNuevaLinea.Text.Trim()) > Valor) { MessageBox.Show("El Nivel de Autonomía debe ser de acuerdo a la Nueva Línea", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txtnLineaImporte.Focus(); return; } } else //Dolares { if ((decimal.Parse(txtnNuevaLinea.Text.Trim()) * decimal.Parse(txtTipoCambio.Text.Trim())) > Valor) { MessageBox.Show("El Nivel de Autonomía debe ser de acuerdo a la Nueva Línea", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txtnLineaImporte.Focus(); return; } } } } else { return; } if (TipoOperacion.ToString().Equals("R")) { if (decimal.Parse(txtnNuevaLinea.Text.Trim()) < 0) { MessageBox.Show("La nuva Línea no puede ser menor a 0", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txtnLineaImporte.Focus(); return; } } PagadoraLineaBE PagadoraLineaBE = new PagadoraLineaBE() { OPCION = 2, USUARIO = General.General.GetCodigoUsuario, IdPagadora = IdPagadora, IdMoneda_tt = cboIdMoneda_tt.SelectedValue.ToString(), nLinea = decimal.Parse(txtnNuevaLinea.Text), nUtilizado = 0, IdNivelAutonomia_tt = cboIdNivelAutonomia_tt.SelectedValue.ToString(), dtFechaAprobacion = dtFechaAprobacion.Value, IdMedio_tt = cboIdMedio_tt.SelectedValue.ToString(), IdAnalistaCredito_tt = cboIdAnalistaCredito_tt.SelectedValue.ToString(), iPlazo = !String.Empty.Equals(txtiPlazo.Text.Trim()) ? int.Parse(txtiPlazo.Text.Trim()) : 0, dtFechaVencimiento = dtFechaVencimiento.Value, vcObservaciones = txtvcObservaciones.Text.Trim(), dtTipoCambio = General.General.gFechaOp, nTipoCambio = Convert.ToDecimal(txtTipoCambio.Text), IdEstadoLinea_tt = "00031" }; PagadoraLineaBL.ProcesarPagadoraLinea(PagadoraLineaBE); MessageBox.Show("Se Proceso Correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Dispose(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void frmSocioLineaGarantia_Load(object sender, EventArgs e) { String Table_Id = "00067"; TableBaseBE TableBaseBE = new TableBaseBE { OPCION = 1, USUARIO = General.General.GetCodigoUsuario, Table_Parent_Id = Table_Id }; General.General.LlenarCombobox(cboIdTipo_Documento_tt, "Table_Name", "Table_Id", TableBaseBL.ProcesarTableBase(TableBaseBE).Tables[0]); }