private void CargarDatos() { try { PagadoraDocumentoBE IEnity = new PagadoraDocumentoBE(); IEnity.OPCION = 1; IEnity.USUARIO = General.General.GetUsuario.ToString(); IEnity.IdPagadora = IdPagadora; IEnity.IdItemDoc = IdItemDoc; DataSet ds = new PagadoraDocumentoBL().ProcesarPagadoraDocumento(IEnity); if (ds.Tables[0].Rows.Count > 0) { cboIdDocumento.SelectedValue = ds.Tables[0].Rows[0]["IdDocumento"].ToString(); cboIdTipoConfirmacion_tt.SelectedValue = ds.Tables[0].Rows[0]["IdTipoConfirmacion_tt"].ToString(); cboIdTipoTransferencia_tt.SelectedValue = ds.Tables[0].Rows[0]["IdTipoTransferencia_tt"].ToString(); cboIdTipoCartaP_tt.SelectedValue = ds.Tables[0].Rows[0]["IdTipoCartaP_tt"].ToString(); cboIdTipoCartaE_tt.SelectedValue = ds.Tables[0].Rows[0]["IdTipoCartaE_tt"].ToString(); txtiPlazo.Text = ds.Tables[0].Rows[0]["iPlazo"].ToString(); cboIdFrecuencia_tt.SelectedValue = ds.Tables[0].Rows[0]["IdFrecuencia_tt"].ToString(); cboIdDiasPagoFrecuencia_tt.SelectedValue = ds.Tables[0].Rows[0]["IdDiasPagoFrecuencia_tt"].ToString(); txtiDiaPago.Text = ds.Tables[0].Rows[0]["iDiaPago"].ToString(); cboIdFormaPago_tt.SelectedValue = ds.Tables[0].Rows[0]["IdFormaPago_tt"].ToString(); txtvcLugardePago.Text = ds.Tables[0].Rows[0]["vcLugardePago"].ToString(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public DataSet ProcesarPagadoraDocumento(PagadoraDocumentoBE BE) { DataSet dsResult; try { cmd = db.GetStoredProcCommand("PagadoraDocumento_Mnt"); db.AddInParameter(cmd, "OPCION", DbType.Int32, BE.OPCION); db.AddInParameter(cmd, "USUARIO", DbType.String, BE.USUARIO); db.AddInParameter(cmd, "IdPagadora", DbType.String, BE.IdPagadora); db.AddInParameter(cmd, "IdItemDoc", DbType.String, BE.IdItemDoc); db.AddInParameter(cmd, "IdDocumento", DbType.String, BE.IdDocumento); db.AddInParameter(cmd, "IdTipoConfirmacion_tt", DbType.String, BE.IdTipoConfirmacion_tt); db.AddInParameter(cmd, "IdTipoTransferencia_tt", DbType.String, BE.IdTipoTransferencia_tt); db.AddInParameter(cmd, "IdTipoCartaP_tt", DbType.String, BE.IdTipoCartaP_tt); db.AddInParameter(cmd, "IdTipoCartaE_tt", DbType.String, BE.IdTipoCartaE_tt); db.AddInParameter(cmd, "vFrecuencia", DbType.String, BE.vFrecuencia); db.AddInParameter(cmd, "IdFrecuencia_tt", DbType.String, BE.IdFrecuencia_tt); db.AddInParameter(cmd, "IdDiasPagoFrecuencia_tt", DbType.String, BE.IdDiasPagoFrecuencia_tt); db.AddInParameter(cmd, "vDia", DbType.String, BE.vDia); db.AddInParameter(cmd, "iPlazo", DbType.Int32, BE.iPlazo); db.AddInParameter(cmd, "iDiaPago", DbType.Int32, BE.iDiaPago); db.AddInParameter(cmd, "IdFormaPago_tt", DbType.String, BE.IdFormaPago_tt); db.AddInParameter(cmd, "vcLugardePago", DbType.String, BE.vcLugardePago); dsResult = db.ExecuteDataSet(cmd); } catch (Exception ex) { throw new Exception(ex.Message); } return(dsResult); }
private void btnAceptar_Click(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(cboIdDocumento.SelectedValue.ToString())) { MessageBox.Show("Se debe seleccionar un Documento", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); cboIdDocumento.Focus(); return; } PagadoraDocumentoBE PagadoraDocumentoBE = new PagadoraDocumentoBE() { OPCION = 2, USUARIO = General.General.GetCodigoUsuario, IdPagadora = txtIdPagadora.Text.Trim(), IdItemDoc = IdItemDoc, IdDocumento = cboIdDocumento.SelectedValue.ToString(), IdTipoConfirmacion_tt = cboIdTipoConfirmacion_tt.SelectedValue.ToString(), IdTipoTransferencia_tt = cboIdTipoTransferencia_tt.SelectedValue.ToString(), IdTipoCartaP_tt = cboIdTipoCartaP_tt.SelectedValue.ToString(), IdTipoCartaE_tt = cboIdTipoCartaE_tt.SelectedValue.ToString(), vFrecuencia = txtvFrecuencia.Text, IdFrecuencia_tt = cboIdFrecuencia_tt.SelectedValue.ToString(), IdDiasPagoFrecuencia_tt = cboIdDiasPagoFrecuencia_tt.SelectedValue.ToString(), vDia = txtvDia.Text, iPlazo = !String.IsNullOrEmpty(txtiPlazo.Text.Trim()) ? int.Parse(txtiPlazo.Text.Trim()) : 0, iDiaPago = !String.IsNullOrEmpty(txtiDiaPago.Text.Trim()) ? int.Parse(txtiDiaPago.Text.Trim()) : 0, IdFormaPago_tt = cboIdFormaPago_tt.SelectedValue.ToString(), vcLugardePago = txtvcLugardePago.Text.Trim() }; PagadoraDocumentoBL.ProcesarPagadoraDocumento(PagadoraDocumentoBE); MessageBox.Show("Se Proceso Correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Dispose(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public DataSet ProcesarPagadoraDocumento(PagadoraDocumentoBE BE) { return(PagadoraDocumentoDA.ProcesarPagadoraDocumento(BE)); }