Пример #1
0
 public InformeInventario(tallerEntities ent)
 {
     InitializeComponent();
     tallerEnt = ent;
     prodServ  = new ProductoServicio(tallerEnt);
     cargaInforme();
 }
Пример #2
0
 public UCListaProductos(tallerEntities ent)
 {
     InitializeComponent();
     tallerEnt   = ent;
     mvProductos = new MVProductos(tallerEnt);
     DataContext = mvProductos;
 }
Пример #3
0
 public Factura(tallerEntities ent)
 {
     InitializeComponent();
     tallerEnt  = ent;
     averiaServ = new AveriaServicio(tallerEnt);
     cargaInforme();
 }
Пример #4
0
 public UCListaEmpleados(tallerEntities ent)
 {
     InitializeComponent();
     tallerEnt   = ent;
     mvEmpl      = new MVEmpleado(tallerEnt);
     DataContext = mvEmpl;
 }
 public DCambioContraseña(tallerEntities ent)
 {
     InitializeComponent();
     tallerEnt   = ent;
     mVEmpleado  = new MVEmpleado(tallerEnt);
     DataContext = mVEmpleado;
 }
 public UCListaClientes(tallerEntities ent)
 {
     InitializeComponent();
     tallerEnt   = ent;
     mVCliente   = new MVCliente(tallerEnt);
     DataContext = mVCliente;
 }
Пример #7
0
 public UCArbolAverias(tallerEntities ent)
 {
     InitializeComponent();
     tallerEnt   = ent;
     mvAveria    = new MVAveria(tallerEnt);
     DataContext = mvAveria;
 }
Пример #8
0
 public UCListaVehiculos(tallerEntities ent)
 {
     InitializeComponent();
     tallerEnt   = ent;
     mvVehiculo  = new MVVehiculos(tallerEnt);
     DataContext = mvVehiculo;
 }
Пример #9
0
 public UCListaPedidos(tallerEntities ent)
 {
     InitializeComponent();
     tallerEnt   = ent;
     mvAlbaran   = new MVAlbaran(tallerEnt);
     DataContext = mvAlbaran;
 }
Пример #10
0
 public MVVehiculos(tallerEntities ent)
 {
     tallerEnt = ent;
     vehServ   = new VehiculoServicio(tallerEnt);
     listaVehi = new ListCollectionView(vehServ.getAll().ToList());
     clieServ  = new ServicioGenerico <cliente>(tallerEnt);
     vehNuevo  = new vehiculo();
 }
 public GraficosReparaciones(tallerEntities ent)
 {
     InitializeComponent();
     tallerEnt = ent;
     serChart  = new ServicioCharts();
     loadChart();
     DataContext = this;
 }
Пример #12
0
 public UCListaAverias(tallerEntities ent)
 {
     InitializeComponent();
     tallerEnt   = ent;
     mvAveria    = new MVAveria(tallerEnt);
     DataContext = mvAveria;
     Filtro      = new Predicate <object>(FiltroFechas);
 }
Пример #13
0
 public MVCliente(tallerEntities ent)
 {
     tallerEnt   = ent;
     clnServ     = new ClienteServicio(tallerEnt);
     listaClient = new ListCollectionView(clnServ.getAll().ToList());
     vehServ     = new ServicioGenerico <vehiculo>(tallerEnt);
     clNuevo     = new cliente();
 }
Пример #14
0
        public GraficosStock(tallerEntities ent)
        {
            InitializeComponent();
            tallerEnt   = ent;
            MVProductos = new MVProductos(tallerEnt);

            loadChart();
        }
Пример #15
0
 public MVProductos(tallerEntities ent)
 {
     tallerEnt   = ent;
     prodServ    = new ProductoServicio(tallerEnt);
     listaProduc = new ListCollectionView(prodServ.getAll().ToList());
     tipoProServ = new ServicioGenerico <tipoproducto>(tallerEnt);
     provoServ   = new ServicioGenerico <proveedor>(tallerEnt);
     prdNuevo    = new productos();
 }
Пример #16
0
 public MVAlbaran(tallerEntities ent)
 {
     tallerEnt   = ent;
     albServ     = new AlbaranServicio(tallerEnt);
     pedidosServ = new PedidosServicio(tallerEnt);
     listaAlba   = new ListCollectionView(albServ.getAll().ToList());
     pediServ    = new ServicioGenerico <pedidos>(tallerEnt);
     prodServ    = new ServicioGenerico <productos>(tallerEnt);
     prdNuevo    = new productos();
 }
Пример #17
0
        public UCAveriaNueva(tallerEntities ent)
        {
            InitializeComponent();
            tallerEnt        = ent;
            mvAveria         = new MVAveria(tallerEnt);
            this.DataContext = mvAveria;

            this.AddHandler(Validation.ErrorEvent, new RoutedEventHandler(mvAveria.OnErrorEvent));
            mvAveria.btnGuardar = btnGuardarAveria;
        }
        public DAnyadirEmpleado(tallerEntities ent)
        {
            InitializeComponent();
            tallerEnt   = ent;
            mvEmpl      = new MVEmpleado(tallerEnt);
            DataContext = mvEmpl;

            this.AddHandler(Validation.ErrorEvent, new RoutedEventHandler(mvEmpl.OnErrorEvent));
            mvEmpl.btnGuardar = btnGuardarEmpleado;
        }
Пример #19
0
 public MVEmpleado(tallerEntities ent)
 {
     tallerEnt  = ent;
     empServ    = new EmpleadoServicio(tallerEnt);
     listaEmpl  = new ListCollectionView(empServ.getAll().ToList());
     rolServ    = new ServicioGenerico <rol>(tallerEnt);
     emplNuevo  = new empleado();
     emplSelec  = new empleado();
     emplContra = new empleado();
 }
Пример #20
0
        public DAnyadirProducto(tallerEntities ent)
        {
            InitializeComponent();
            tallerEnt   = ent;
            mvProductos = new MVProductos(tallerEnt);
            DataContext = mvProductos;

            this.AddHandler(Validation.ErrorEvent, new RoutedEventHandler(mvProductos.OnErrorEvent));
            mvProductos.btnGuardar = btnGuardarProducto;
        }
        public UCVehiculoNuevo(tallerEntities ent)
        {
            InitializeComponent();
            tallerEnt        = ent;
            mvVehiculo       = new MVVehiculos(tallerEnt);
            this.DataContext = mvVehiculo;

            this.AddHandler(Validation.ErrorEvent, new RoutedEventHandler(mvVehiculo.OnErrorEvent));
            mvVehiculo.btnGuardar = btnGuardarVehiculo;
        }
Пример #22
0
        public UCClienteNuevo(tallerEntities ent)
        {
            InitializeComponent();
            tallerEnt        = ent;
            mvCliente        = new MVCliente(tallerEnt);
            this.DataContext = mvCliente;

            this.AddHandler(Validation.ErrorEvent, new RoutedEventHandler(mvCliente.OnErrorEvent));
            mvCliente.btnGuardar = btnGuardarCliente;
        }
Пример #23
0
 public Login()
 {
     InitializeComponent();
     tallerEnt = new tallerEntities();
     empServ   = new EmpleadoServicio(tallerEnt);
 }
Пример #24
0
 public MVAveria(tallerEntities ent)
 {
     tallerEnt = ent;
     inicializa();
 }
Пример #25
0
        public MainWindow(tallerEntities ent)
        {
            InitializeComponent();
            tallerEnt = ent;

            int rol = UserLoginCache.Rol;

            var menuVehiculos = new List <SubItem>();
            var item1         = new ItemMenu("Vehículos", menuVehiculos, PackIconKind.Car);

            menuVehiculos.Add(new SubItem("Nuevo", new UCVehiculoNuevo(ent)));
            menuVehiculos.Add(new SubItem("Lista", new UCListaVehiculos(ent)));

            var menuCliente = new List <SubItem>();
            var item2       = new ItemMenu("Cliente", menuCliente, PackIconKind.Account);

            menuCliente.Add(new SubItem("Nuevo", new UCClienteNuevo(ent)));
            menuCliente.Add(new SubItem("Lista", new UCListaClientes(ent)));

            var menuAverias = new List <SubItem>();
            var item3       = new ItemMenu("Averías", menuAverias, PackIconKind.Cog);

            menuAverias.Add(new SubItem("Nueva", new UCAveriaNueva(ent)));
            menuAverias.Add(new SubItem("Gestión", new UCArbolAverias(ent)));
            menuAverias.Add(new SubItem("Lista", new UCListaAverias(ent)));
            menuAverias.Add(new SubItem("Gráficos", new GraficosReparaciones(ent)));

            var menuGestion = new List <SubItem>();
            var item4       = new ItemMenu("Gestión de Stock", menuGestion, PackIconKind.FileReport);

            menuGestion.Add(new SubItem("Nuevo Pedido", new UCListaPedidos(ent)));
            //menuGestion.Add(new SubItem("Inventario",new UCListaProductos(ent)));
            menuGestion.Add(new SubItem("Informe", new InformeInventario(ent)));



            var menuEmpleados = new List <SubItem>();
            var item5         = new ItemMenu("Empleados", menuEmpleados, PackIconKind.AccountMultiple);

            //menuEmpleados.Add(new SubItem("Gestion",new UCListaEmpleados(ent)));



            Menu.Children.Add(new UserControlMenuItem(item1, this));
            Menu.Children.Add(new UserControlMenuItem(item2, this));
            Menu.Children.Add(new UserControlMenuItem(item3, this));
            Menu.Children.Add(new UserControlMenuItem(item4, this));
            Menu.Children.Add(new UserControlMenuItem(item5, this));

            switch (rol)
            {
            //1 Empleado
            case 1:
                menuGestion.Add(new SubItem("Inventario", new UCListaProductos(ent)));

                break;

            //2 Encargado
            case 2:
                menuGestion.Add(new SubItem("Inventario", new UCListaProductos(ent)));

                break;

            //3 gerente
            case 3:
                menuGestion.Add(new SubItem("Inventario", new UCListaProductos(ent)));
                menuEmpleados.Add(new SubItem("Gestion", new UCListaEmpleados(ent)));
                break;
            }
        }