public DataSet ProcesarPagadoraContacto(PagadoraContactoBE BE) { DataSet dsResult; try { cmd = db.GetStoredProcCommand("PagadoraContacto_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, "IdItemCtc", DbType.String, BE.IdItemCtc); db.AddInParameter(cmd, "IdCargo_tt", DbType.String, BE.IdCargo_tt); db.AddInParameter(cmd, "vcContacto", DbType.String, BE.vcContacto); db.AddInParameter(cmd, "vcTelefono1", DbType.String, BE.vcTelefono1); db.AddInParameter(cmd, "vcTelefono2", DbType.String, BE.vcTelefono2); db.AddInParameter(cmd, "vcAnexo", DbType.String, BE.vcAnexo); db.AddInParameter(cmd, "vcCelular", DbType.String, BE.vcCelular); db.AddInParameter(cmd, "vcEmail", DbType.String, BE.vcEmail); if (BE.dtCumpleano != DateTime.MinValue) { db.AddInParameter(cmd, "dtCumpleano", DbType.DateTime, BE.dtCumpleano); } db.AddInParameter(cmd, "bEntregaLetra", DbType.Boolean, BE.bEntregaLetra); db.AddInParameter(cmd, "bEnvioDocumentacion", DbType.Boolean, BE.bEnvioDocumentacion); db.AddInParameter(cmd, "bEnvioCobranza", DbType.Boolean, BE.bEnvioCobranza); db.AddInParameter(cmd, "bFinanzas", DbType.Boolean, BE.bFinanzas); db.AddInParameter(cmd, "bRealizarLLamada", DbType.Boolean, BE.bRealizarLLamada); dsResult = db.ExecuteDataSet(cmd); } catch (Exception ex) { throw new Exception(ex.Message); } return(dsResult); }
private void CargaDatos() { try { DataSet ds = new DataSet(); PagadoraContactoBE oEntity = new PagadoraContactoBE() { OPCION = 1, USUARIO = General.General.GetUsuario, IdPagadora = txtIdPagadora.Text, IdItemCtc = Codigo }; ds = new PagadoraContactoBL().ProcesarPagadoraContacto(oEntity); if (ds.Tables[0].Rows.Count > 0) { cboIdCargo_tt.SelectedValue = ds.Tables[0].Rows[0]["IdCargo_tt"].ToString(); txtvcContacto.Text = ds.Tables[0].Rows[0]["vcContacto"].ToString(); MskvcTelefono1.Text = ds.Tables[0].Rows[0]["vcTelefono1"].ToString(); MskvcTelefono2.Text = ds.Tables[0].Rows[0]["vcTelefono2"].ToString(); txtvcAnexo.Text = ds.Tables[0].Rows[0]["vcAnexo"].ToString(); MskvcCelular.Text = ds.Tables[0].Rows[0]["vcCelular"].ToString(); txtvcEmail.Text = ds.Tables[0].Rows[0]["vcEmail"].ToString(); if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["dtCumpleano"].ToString().Trim())) { dtCumpleano.Value = Convert.ToDateTime(ds.Tables[0].Rows[0]["dtCumpleano"].ToString()); } chkbEntregaLetra.CheckValue = ds.Tables[0].Rows[0]["bEntregaLetra"]; chkbEnvioDocumentacion.CheckValue = ds.Tables[0].Rows[0]["bEnvioDocumentacion"]; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnAceptar_Click(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(cboIdCargo_tt.SelectedValue.ToString())) { MessageBox.Show("Se debe seleccionar un cargo", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); cboIdCargo_tt.Focus(); return; } if (string.IsNullOrEmpty(txtvcContacto.Text.Trim())) { MessageBox.Show("Se debe ingresar el contacto", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txtvcContacto.Focus(); return; } if (string.IsNullOrEmpty(MskvcTelefono1.Text.Trim().Replace("-", ""))) { MessageBox.Show("Se debe Ingresar un nro. de teléfono", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); MskvcTelefono1.Focus(); return; } if (string.IsNullOrEmpty(txtvcAnexo.Text.Trim())) { MessageBox.Show("Se debe Ingresar un anexo", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txtvcAnexo.Focus(); return; } if (string.IsNullOrEmpty(txtvcEmail.Text.Trim().Replace("-", ""))) { MessageBox.Show("Se debe Ingresar el correo", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txtvcEmail.Focus(); return; } PagadoraContactoBE PagadoraContactoBE = new PagadoraContactoBE() { OPCION = 2, USUARIO = General.General.GetCodigoUsuario, IdPagadora = txtIdPagadora.Text.Trim(), IdItemCtc = Codigo, IdCargo_tt = cboIdCargo_tt.SelectedValue.ToString(), vcContacto = txtvcContacto.Text.Trim(), vcTelefono1 = MskvcTelefono1.Text, vcTelefono2 = MskvcTelefono2.Text, vcAnexo = txtvcAnexo.Text.Trim(), vcCelular = MskvcCelular.Text, vcEmail = txtvcEmail.Text, dtCumpleano = dtCumpleano.Value, bEntregaLetra = chkbEntregaLetra.Checked == true ? true : false, bEnvioDocumentacion = chkbEnvioDocumentacion.Checked == true ? true : false, }; PagadoraContactoBL.ProcesarPagadoraContacto(PagadoraContactoBE); 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 ProcesarPagadoraContacto(PagadoraContactoBE BE) { return(PagadoraContactoDA.ProcesarPagadoraContacto(BE)); }