public void agregarBoletaCajeroNiquel(ref BoletaCajeroNiquel c) { SqlCommand comando = _manejador.obtenerProcedimiento("InsertInfoFormularioBoletaNiquelEntregaCajeroNiquel"); _manejador.agregarParametro(comando, "@ID_ProcesamientoBajoVolumenDeposito", c.Procesobajovolumendeposito, SqlDbType.Int); _manejador.agregarParametro(comando, "@Cajero", c.Cajero, SqlDbType.Int); _manejador.agregarParametro(comando, "@Manifiesto", c.Manifiesto, SqlDbType.Int); _manejador.agregarParametro(comando, "@Tula", c.Tula, SqlDbType.Int); _manejador.agregarParametro(comando, "@Cliente", c.Cliente, SqlDbType.Int); _manejador.agregarParametro(comando, "@deposito", c.Numero_Deposito, SqlDbType.VarChar); _manejador.agregarParametro(comando, "@Cuenta", c.Cuenta, SqlDbType.VarChar); _manejador.agregarParametro(comando, "@Monto_Niquel", c.MontoNiquel, SqlDbType.Money); _manejador.agregarParametro(comando, "@Monto_Deposito", c.MontoDeposito, SqlDbType.Money); _manejador.agregarParametro(comando, "@Faltante", c.Faltante, SqlDbType.Money); _manejador.agregarParametro(comando, "@Sobrante", c.Sobrante, SqlDbType.Money); try { c.ID = Convert.ToInt32(_manejador.ejecutarEscalar(comando)); comando.Connection.Close(); } catch (Exception ex) { comando.Connection.Close(); throw new Excepcion("ErrorManifiestoRegistro"); } }
public BoletaCajeroNiquel ObtenerBoletaCajeroNiquel(ref Colaborador c, DateTime i, DateTime f) { BoletaCajeroNiquel boleta = new BoletaCajeroNiquel(); SqlCommand comando = _manejador.obtenerProcedimiento("SelectInfoFormularioBoletaNiquelEntregaCajeroNiquel"); SqlDataReader datareader = null; _manejador.agregarParametro(comando, "@cajero", c.ID, SqlDbType.Int); _manejador.agregarParametro(comando, "@fecha_inicio", i, SqlDbType.DateTime); _manejador.agregarParametro(comando, "@fecha_fin", f, SqlDbType.DateTime); try { datareader = _manejador.ejecutarConsultaDatos(comando); if (datareader.Read()) { int id = (int)datareader["pk_ID"]; string cajero = (string)datareader["Cajero"]; string tula = (string)datareader["Tula"]; string manifiesto = (string)datareader["Manifiesto"]; string cliente = (string)datareader["Cliente"]; string Numero_deposito = (string)datareader["Numero_deposito"]; string Cuenta = (string)datareader["Cuenta"]; decimal Monto_Niquel = (decimal)datareader["Monto_Niquel"]; decimal Monto_Deposito = (decimal)datareader["Monto_Deposito"]; DateTime Fecha_Generacion = (DateTime)datareader["Fecha_Generacion"]; decimal Faltante = (decimal)datareader["Faltante"]; decimal Sobrante = (decimal)datareader["Sobrante"]; //c.ColaboradorRecibidoBoveda = new Colaborador(id, nombre: nombre, primer_apellido: primer_apellido, // segundo_apellido: segundo_apellido, identificacion: identificacion); } comando.Connection.Close(); } catch (Exception) { comando.Connection.Close(); return(null); throw new Excepcion("ErrorDatosConexion"); } return(null); }