Ejemplo n.º 1
0
        public DataSet ProcesarPagadoraObservacion(PagadoraObservacionBE BE)
        {
            DataSet dsResult;

            try
            {
                cmd = db.GetStoredProcCommand("PagadoraObservacion_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, "IdObservacion", DbType.String, BE.IdObservacion);
                db.AddInParameter(cmd, "vcComentario", DbType.String, BE.vcComentario);
                db.AddInParameter(cmd, "vcUsuario", DbType.String, BE.vcUsuario);
                if (BE.dtFecha != DateTime.MinValue)
                {
                    db.AddInParameter(cmd, "dtFecha", DbType.DateTime, BE.dtFecha);
                }
                dsResult = db.ExecuteDataSet(cmd);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(dsResult);
        }
        private void CargarDatos()
        {
            try
            {
                DataSet ds = new DataSet();
                PagadoraObservacionBE PagadoraObservacionBE = new PagadoraObservacionBE()
                {
                    OPCION        = 1,
                    USUARIO       = General.General.GetCodigoUsuario,
                    IdPagadora    = Codigo,
                    IdObservacion = txtIdObservacion.Text
                };

                ds = PagadoraObservacionBL.ProcesarPagadoraObservacion(PagadoraObservacionBE);

                if (ds.Tables[0].Rows.Count > 0)
                {
                    txtComentario.Text = ds.Tables[0].Rows[0]["vcComentario"].ToString();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(txtComentario.Text.Trim()))
                {
                    MessageBox.Show("Se debe ingresar una observación", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    txtComentario.Focus();
                    return;
                }

                PagadoraObservacionBE PagadoraObservacionBE = new PagadoraObservacionBE()
                {
                    OPCION        = 2,
                    USUARIO       = General.General.GetCodigoUsuario,
                    IdPagadora    = Codigo,
                    IdObservacion = txtIdObservacion.Text.Trim(),
                    dtFecha       = DateTime.Parse(txtdtFecha.Text),
                    vcComentario  = txtComentario.Text.Trim(),
                    vcUsuario     = General.General.GetUsuario,
                };

                PagadoraObservacionBL.ProcesarPagadoraObservacion(PagadoraObservacionBE);
                MessageBox.Show("Se Proceso Correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Dispose();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 4
0
 public DataSet ProcesarPagadoraObservacion(PagadoraObservacionBE BE)
 {
     return(PagadoraObservacionDAL.ProcesarPagadoraObservacion(BE));
 }