示例#1
0
        public void nuevoRegistro(User usuario)
        {
            IHCEntities context = new IHCEntities();

            context.User.Add(usuario);
            context.SaveChanges();
        }
示例#2
0
        public List<User> consultarUserPorUsername(string username)
        {

            IHCEntities context = new IHCEntities();

            var user = from tUser in context.User
                       where tUser.UserName == username
                       select tUser;

            List<User> lstUsuario = new List<User>();

            lstUsuario = user.ToList();

            if (lstUsuario.Count > 0)
            {

                return user.ToList();
            }

            else
            {
                throw new Exception("El usuario no es correcto");
            }

        }
示例#3
0
        public void AgregarAuctionRecord(AuctionRecord record) {

            IHCEntities context = new IHCEntities();

            context.AuctionRecord.Add(record);
            context.SaveChanges();
        }
示例#4
0
        public void AgregarAuctionRecord(AuctionRecord record)
        {
            IHCEntities context = new IHCEntities();

            context.AuctionRecord.Add(record);
            context.SaveChanges();
        }
示例#5
0
        public void nuevoRegistro(User usuario){

            IHCEntities context = new IHCEntities();
            
            context.User.Add(usuario);
            context.SaveChanges();
        }
示例#6
0
        public void AgregarNuevaSubasta(Auction auction)
        {
            IHCEntities context = new IHCEntities();

            context.Auction.Add(auction);
            context.SaveChanges();
        }
示例#7
0
        public List <Auction> cargarSubastas()
        {
            IHCEntities context = new IHCEntities();

            var subasta = from tSubasta in context.Auction
                          select tSubasta;

            return(subasta.ToList());
        }
示例#8
0
        public List<Auction> cargarSubastas() {

            IHCEntities context = new IHCEntities();

            var subasta =   from tSubasta in context.Auction
                            select tSubasta;
            
            return subasta.ToList();
        }
示例#9
0
        public User cargarNombreUsuario(int?idUsuario)
        {
            IHCEntities context = new IHCEntities();

            var usuario = from tUsuario in context.User
                          where tUsuario.UserId == idUsuario
                          select tUsuario;

            return(usuario.First());
        }
示例#10
0
        public List <AuctionRecord> cargarAuctionrecord(int AuctionId)
        {
            IHCEntities context = new IHCEntities();

            var record = from tRecord in context.AuctionRecord
                         where tRecord.AuctionId == AuctionId
                         select tRecord;

            return(record.ToList());
        }
示例#11
0
        public Auction cargarSubastaEspecifico(int idSubasta)
        {
            IHCEntities context = new IHCEntities();

            var subasta = from tSubasta in context.Auction
                          where tSubasta.AuctionId == idSubasta
                          select tSubasta;

            return(subasta.First());
        }
示例#12
0
        public List <AuctionRecord> CargarDDLGRID(int AuctionId, int usuarioId)
        {
            IHCEntities context = new IHCEntities();

            var record = from tRecord in context.AuctionRecord
                         where tRecord.AuctionId == AuctionId && tRecord.UserId == usuarioId
                         select tRecord;

            return(record.ToList());
        }
示例#13
0
        public Auction cargarSubastaHistorialOpcion(int UserId)
        {
            IHCEntities context = new IHCEntities();

            var subasta = from tSubasta in context.Auction
                          where tSubasta.UserId == UserId
                          select tSubasta;

            return(subasta.First());
        }
示例#14
0
        public List <Auction> ConteoDeSubastas(int UserId)
        {
            IHCEntities context = new IHCEntities();

            var subasta = from tSubasta in context.Auction
                          where tSubasta.UserId == UserId
                          select tSubasta;

            return(subasta.ToList());
        }
示例#15
0
        public List<AuctionRecord> cargarAuctionrecord(int AuctionId)
        {

            IHCEntities context = new IHCEntities();

            var record = from tRecord in context.AuctionRecord
                         where tRecord.AuctionId == AuctionId
                         select tRecord;

            return record.ToList();
        }
示例#16
0
        public User cargarNombreUsuario(int? idUsuario)
        {

            IHCEntities context = new IHCEntities();

            var usuario = from tUsuario in context.User
                          where tUsuario.UserId == idUsuario
                          select tUsuario;

            return usuario.First();
        }
示例#17
0
        public Auction cargarSubastaEspecifico(int idSubasta)
        {

            IHCEntities context = new IHCEntities();

            var subasta = from tSubasta in context.Auction
                          where tSubasta.AuctionId == idSubasta
                          select tSubasta;

            return subasta.First();
        }
示例#18
0
        public Auction cargarSubastaHistorial(int AuctionId)
        {

            IHCEntities context = new IHCEntities();

            var subasta = from tSubasta in context.Auction
                          where tSubasta.AuctionId == AuctionId
                          select tSubasta;

            return subasta.First();
        }
示例#19
0
        public void UpdateSubasta(Auction subasta ) {
            IHCEntities context = new IHCEntities(); //USANDO LINQ

            var query = (from tAcution in context.Auction
                         where tAcution.AuctionId == subasta.AuctionId
                         select tAcution).First();

            query.AuctionId = subasta.AuctionId;
            query.Description = subasta.Description;
            query.ProductName = subasta.ProductName;
            query.StartDate = subasta.StartDate;
            query.EndDate = subasta.EndDate;
            query.HighestBid = subasta.HighestBid;
            query.Winner = subasta.Winner;
            context.SaveChanges();
        }
示例#20
0
        public void UpdateSubasta(Auction subasta)
        {
            IHCEntities context = new IHCEntities(); //USANDO LINQ

            var query = (from tAcution in context.Auction
                         where tAcution.AuctionId == subasta.AuctionId
                         select tAcution).First();

            query.AuctionId   = subasta.AuctionId;
            query.Description = subasta.Description;
            query.ProductName = subasta.ProductName;
            query.StartDate   = subasta.StartDate;
            query.EndDate     = subasta.EndDate;
            query.HighestBid  = subasta.HighestBid;
            query.Winner      = subasta.Winner;
            context.SaveChanges();
        }
示例#21
0
        public List <User> consultarUserPorUsername(string username)
        {
            IHCEntities context = new IHCEntities();

            var user = from tUser in context.User
                       where tUser.UserName == username
                       select tUser;

            List <User> lstUsuario = new List <User>();

            lstUsuario = user.ToList();

            if (lstUsuario.Count > 0)
            {
                return(user.ToList());
            }

            else
            {
                throw new Exception("El usuario no es correcto");
            }
        }
示例#22
0
        public bool validarUsuarioUnico(string username)
        {
            IHCEntities context = new IHCEntities();

            var user = from tUser in context.User
                       where tUser.UserName == username
                       select tUser;

            List <User> lstUsuario = new List <User>();

            lstUsuario = user.ToList();

            if (lstUsuario.Count > 0)
            {
                return(false);
            }

            else
            {
                return(true);
            }
        }
示例#23
0
        public bool validarCorreoUnico(string email)
        {
            IHCEntities context = new IHCEntities();

            var user = from tUser in context.User
                       where tUser.Email == email
                       select tUser;

            List <User> lstUsuario = new List <User>();

            lstUsuario = user.ToList();

            if (lstUsuario.Count > 0)
            {
                return(false);
            }

            else
            {
                return(true);
            }
        }
示例#24
0
        public bool validarCorreoUnico(string email) {

            IHCEntities context = new IHCEntities();

            var user = from tUser in context.User
                       where tUser.Email == email
                       select tUser;

            List<User> lstUsuario = new List<User>();

            lstUsuario = user.ToList();

            if (lstUsuario.Count > 0)
            {

                return false;
            }

            else
            {
                return true;
            }
        }
示例#25
0
        public bool validarUsuarioUnico(string username) {

            IHCEntities context = new IHCEntities();

            var user = from tUser in context.User
                       where tUser.UserName == username
                       select tUser;

            List<User> lstUsuario = new List<User>();

            lstUsuario = user.ToList();

            if (lstUsuario.Count > 0)
            {

                return false;
            }

            else
            {
                return true;
            }
        }
示例#26
0
        public void AgregarNuevaSubasta(Auction auction) {

            IHCEntities context = new IHCEntities();

            context.Auction.Add(auction);
            context.SaveChanges();
        }
示例#27
0
        public List<Auction> ConteoDeSubastas(int UserId) {
            
            IHCEntities context = new IHCEntities();

            var subasta = from tSubasta in context.Auction
                          where tSubasta.UserId == UserId
                          select tSubasta;

            return subasta.ToList();
        }
示例#28
0
        public List<AuctionRecord> CargarDDLGRID(int AuctionId, int usuarioId)
        {

            IHCEntities context = new IHCEntities();

            var record = from tRecord in context.AuctionRecord
                         where tRecord.AuctionId == AuctionId && tRecord.UserId == usuarioId
                         select tRecord;

            return record.ToList();
        }