private void verDetalle()
 {
     try
     {
         btnVerDetalle.IsEnabled = false;
         btnBack.IsEnabled       = true;
         _Prestamo detalle = prestamos.DataGridListadoPrestamos.SelectedItem as _Prestamo;
         CanvasDevTool.Children.Clear();
         CanvasDevTool.Children.Add(new UC_ShowDetalle(detalle.iDPrestamo, detalle.fechaPrestamo, detalle.nombreVoluntario));
     }
     catch
     {
         MessageBox.Show("Debe seleccionar un campo para seguir", "Cuidado", MessageBoxButton.OK, MessageBoxImage.Information);
     }
 }
示例#2
0
        public Boolean ingresarPrestamo()
        {
            Boolean   correcto  = true;
            _Prestamo nPrestamo = new _Prestamo(this.iDPrestamo, this.idUsuario, this.idVoluntario, this.fechaPrestamo, this.Observaciones, this.Activo);

            this.iDPrestamo       = nPrestamo.iDPrestamo;
            this.idUsuario        = nPrestamo.idUsuario;
            this.idVoluntario     = nPrestamo.idVoluntario;
            this.fechaPrestamo    = nPrestamo.fechaPrestamo;
            this.Observaciones    = nPrestamo.Observaciones;
            this.Activo           = nPrestamo.Activo;
            this.fechaFinPrestamo = nPrestamo.fechaFinPrestamo;

            if (_errores.Count > 0)
            {
                correcto = false;
            }
            return(correcto);
        }