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(); }
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); }
public bool hayVoucher(Dto_Voucher voucher) { return(objDaoVoucher.SelectPagoVoucher(voucher)); }
public bool ExistenciaVoucherxCodPago(Dto_Voucher voucher) { return(objDaoVoucher.SelectImgVoucherxCodPago(voucher)); }
public void RegistrarVoucher(Dto_Voucher objDtoVoucher) { objDaoVoucher.InsertarVoucher(objDtoVoucher); }