Пример #1
0
 public Prestamo ModificarPrestamo(int codigo, string cliente, string equipo, int usuario, DateTime fePrestamo, DateTime feDevolucion, string motivo, string estado)
 {
     Prestamo prestamoAModificar = new Prestamo()
     {
         Codigo = codigo,
         Cliente = cliente,
         Equipo = equipo,
         Usuario = usuario,
         FePrestamo = fePrestamo,
         FeDevolucion = feDevolucion,
         Motivo = motivo,
         Estado = estado
     };
     return PrestamoDAO.Modificar(prestamoAModificar);
 }
Пример #2
0
        public Prestamo CrearPrestamo(Prestamo prestamoACrear)
        {
            string rutaCola = @".\private$\prestamospendientes";
            if (!MessageQueue.Exists(rutaCola))
                MessageQueue.Create(rutaCola);
            MessageQueue cola = new MessageQueue(rutaCola);
            cola.Formatter = new XmlMessageFormatter(new Type[] { typeof(Prestamo) });
            int cuenta = cola.GetAllMessages().Count();
            if (cuenta != 0)
            {
                for (int i = 1; i <= cuenta; i++)
                {
                    Message mensaje = cola.Receive();
                    Prestamo nota = (Prestamo)mensaje.Body;

                }

            }
            return PrestamoDAO.Crear(prestamoACrear);
        }
Пример #3
0
 public Prestamo ModificarPrestamo(Prestamo prestamoAModificar)
 {
     return PrestamoDAO.Modificar(prestamoAModificar);
 }