Exemplo n.º 1
0
        public BusinessEntity.ContactoBE getContacto(string idInversion)
        {
            BusinessEntity.ContactoBE oContactoBE = new BusinessEntity.ContactoBE();
            IDataReader dr = null;

            try
            {
                using (DbCommand cmd = dbAdeudosInversiones.GetStoredProcCommand(GetNameStoreProcedure.uspGetContacto))
                {
                    cmd.CommandTimeout = 0;
                    dbAdeudosInversiones.AddInParameter(cmd, "idInversion", DbType.String, idInversion);
                    dr = dbAdeudosInversiones.ExecuteReader(cmd);

                    while (dr.Read())
                    {
                        oContactoBE = ContactoP.getContacto(dr);
                    }
                }
            }
            catch (Exception)
            {
                if (dr != null && !dr.IsClosed)
                {
                    dr.Close();
                }
                throw;
            }

            return(oContactoBE);
        }
Exemplo n.º 2
0
 public void updateContato(BusinessEntity.ContactoBE pContactoBE)
 {
     using (DbCommand cmd = dbAdeudosInversiones.GetStoredProcCommand(GetNameStoreProcedure.uspUpdateContacto))
     {
         //cmd.CommandTimeout = 0;
         dbAdeudosInversiones.AddInParameter(cmd, "idInversion", DbType.String, pContactoBE.idInversion);
         dbAdeudosInversiones.AddInParameter(cmd, "funcionario", DbType.String, pContactoBE.funcionario);
         dbAdeudosInversiones.AddInParameter(cmd, "telefono", DbType.String, pContactoBE.telefono);
         dbAdeudosInversiones.AddInParameter(cmd, "anexo", DbType.String, pContactoBE.anexo);
         dbAdeudosInversiones.AddInParameter(cmd, "correo", DbType.String, pContactoBE.correo);
         dbAdeudosInversiones.AddInParameter(cmd, "celular", DbType.String, pContactoBE.celular);
         if (pContactoBE.cumpleanos == DateTime.MinValue)
         {
             dbAdeudosInversiones.AddInParameter(cmd, "cumpleanos", DbType.DateTime, DBNull.Value);
         }
         else
         {
             dbAdeudosInversiones.AddInParameter(cmd, "cumpleanos", DbType.DateTime, pContactoBE.cumpleanos);
         }
         dbAdeudosInversiones.AddInParameter(cmd, "cuentaBancoID", DbType.Int32, pContactoBE.cuentaBancoID);
         dbAdeudosInversiones.ExecuteNonQuery(cmd);
     }
 }
Exemplo n.º 3
0
 public void updateContato(BusinessEntity.ContactoBE pContactoBE)
 {
     oContactoDA.updateContato(pContactoBE);
 }
Exemplo n.º 4
0
 public void insertContato(BusinessEntity.ContactoBE pContactoBE)
 {
     oContactoDA.insertContato(pContactoBE);
 }