示例#1
0
        public void InsertarVoucher(Dto_Voucher objDtoVoucher)
        {
            SqlCommand cmd = new SqlCommand("SP_InsertarVoucher", conexion);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@IDPago", objDtoVoucher.FK_VP_Cod);
            cmd.Parameters.AddWithValue("@numvoucher", objDtoVoucher.PK_VV_NumVoucher);
            cmd.Parameters.AddWithValue("@imagen", objDtoVoucher.VBV_Foto);
            cmd.Parameters.AddWithValue("@importe", objDtoVoucher.DV_ImporteDepositado);
            cmd.Parameters.AddWithValue("@comentario", objDtoVoucher.VV_Comentario);
            conexion.Open();
            cmd.ExecuteNonQuery();
            conexion.Close();
        }
示例#2
0
        public bool SelectImgVoucherxCodPago(Dto_Voucher voucher)
        {
            string     Select    = "SELECT * from T_Voucher where FK_VP_Cod ='" + voucher.FK_VP_Cod + "'";
            SqlCommand unComando = new SqlCommand(Select, conexion);

            conexion.Open();
            SqlDataReader reader       = unComando.ExecuteReader();
            bool          hayRegistros = reader.Read();

            if (hayRegistros)
            {
                voucher.VBV_Foto             = (byte[])reader[1];
                voucher.DV_ImporteDepositado = Convert.ToDouble(reader[2].ToString());
                voucher.FK_VP_Cod            = (string)reader[4];
            }
            conexion.Close();
            return(hayRegistros);
        }
示例#3
0
 public bool hayVoucher(Dto_Voucher voucher)
 {
     return(objDaoVoucher.SelectPagoVoucher(voucher));
 }
示例#4
0
 public bool ExistenciaVoucherxCodPago(Dto_Voucher voucher)
 {
     return(objDaoVoucher.SelectImgVoucherxCodPago(voucher));
 }
示例#5
0
 public void RegistrarVoucher(Dto_Voucher objDtoVoucher)
 {
     objDaoVoucher.InsertarVoucher(objDtoVoucher);
 }