public usercAdministrarCategoria()
 {
     InitializeComponent();
     cservice = new CategoriaService();
     pservice = new ProductoService();
     dgCategoria.AutoGenerateColumns = false;
 }
 public HomeController(ISeguridadService pSeguridadService,
                       IProductoService pProductoService
                       )
 {
     seguridadService = pSeguridadService;
     productoService  = pProductoService;
 }
        // GET: ProductoController
        public async Task <ActionResult> Index()
        {
            IProductoService      servicioProductos = ObtenerServicio();
            List <ProductoEntity> productosAsync    = await servicioProductos.GetProductosAsync();

            return(View(productosAsync));
        }
Example #4
0
 public ProductoController()
 {
     productoService     = new ProductoService();
     categoriaService    = new CategoriaService();
     marcaService        = new MarcaService();
     unidadMedidaService = new UnidadMedidaService();
 }
Example #5
0
 public FormInventario()
 {
     InitializeComponent();
     dataGridView1.AutoGenerateColumns = true;
     productoService = new ProductoService();
     CargarDG();
 }
        public async Task <ActionResult> Create(IFormCollection collection)
        {
            try
            {
                IProductoService servicioProductos = ObtenerServicio();
                string           strAux            = DateTime.Now.ToString();
                ProductoEntity   pe = new ProductoEntity()
                {
                    Id             = int.Parse(collection["Id"].ToString()),
                    Nombre         = collection["Nombre"].ToString(),
                    FechaCaducidad = DateTime.Parse(collection["FechaCaducidad"].ToString()),
                    Tipo           = collection["Tipo"].ToString(),
                    Expirado       = collection["Expirado"].ToString(),
                };


                ProductoEntity pc = await servicioProductos.CreateProductoAsync(pe);

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }
 public usercAdministrarMarca()
 {
     InitializeComponent();
     mservice = new MarcaService();
     pservice = new ProductoService();
     dgMarca.AutoGenerateColumns = false;
 }
Example #8
0
 public SessionController(IFormsAuthentication formsAuthentication, 
     IAuthenticationService authenticationService, IProductoService productoService)
 {
     this.formsAuthentication = formsAuthentication;
     this.authenticationService = authenticationService;
     this.productoService = productoService;
 }
Example #9
0
 public OrdenesController(IordenService ordenService, IProductoService productoService, IOrdenProductoService ordenProductoService, IMapper mapper)
 {
     _ordenService         = ordenService;
     _productoService      = productoService;
     _ordenProductoService = ordenProductoService;
     _mapper = mapper;
 }
Example #10
0
 public MarcaController(IMapper mapper, IMarcaService marcaService, IProductoService productoService)
 {
     _marcaService    = marcaService;
     _productoService = productoService;
     _mapper          = mapper;
     _cantXPage       = 10;
 }
        // GET: ProductoController/Edit/5
        public async Task <ActionResult> Edit(int id)
        {
            IProductoService servicioProductos = ObtenerServicio();
            ProductoEntity   productoAsync     = await servicioProductos.GetProductoAsync(id);

            return(View(productoAsync));
        }
Example #12
0
 public usercPresentacion()
 {
     InitializeComponent();
     preservice = new PresentacionService();
     proservice = new ProductoService();
     dgPresentacion.AutoGenerateColumns = false;
     dgProductos.AutoGenerateColumns    = false;
 }
Example #13
0
 public usercAdministrarLaboratorios()
 {
     InitializeComponent();
     dgProductos.AutoGenerateColumns    = false;
     dgLaboratorios.AutoGenerateColumns = false;
     lservice = new LaboratorioService();
     pservice = new ProductoService();
 }
Example #14
0
 public UnidadMedidaController(IUnidadMedidaService unidadMedidaService,
                               IUnidadMedidaRepository unidadMedidaRepository,
                               IProductoService productoService)
 {
     this.unidadMedidaService    = unidadMedidaService;
     this.unidadMedidaRepository = unidadMedidaRepository;
     this.productoService        = productoService;
 }
Example #15
0
 public ListaPrecioController(IListaPrecioService listaPrecioService,
                              IProductoService productoService,
                              IPrecioService precioService)
 {
     this.listaPrecioService = listaPrecioService;
     this.productoService    = productoService;
     this.precioService      = precioService;
 }
Example #16
0
 public ProductoController(ILogger <ProductoController> _logger,
                           IProductoService _productoService,
                           IMapper _mapper)
 {
     logger          = _logger;
     mapper          = _mapper;
     productoService = _productoService;
 }
Example #17
0
 public TipoProductoController(ITipoProductoService tipoProductoService,
                               ITipoProductoRepository tipoProductoRepository,
                               IProductoService productoService)
 {
     this.tipoProductoService    = tipoProductoService;
     this.tipoProductoRepository = tipoProductoRepository;
     this.productoService        = productoService;
 }
Example #18
0
 public ProductoController(IProductoService pProductoService,
                           ICategoriaService pCategoriaService,
                           IMarcaService pMarcaService)
 {
     productoService  = pProductoService;
     categoriaService = pCategoriaService;
     marcaService     = pMarcaService;
 }
Example #19
0
 public ProductoController(ILoggerManager logger, IProductoService _productoService,
                           IMapper mapper, IOptions <AppSettings> appSettings)
 {
     _logger          = logger;
     _ProductoService = _productoService;
     _mapper          = mapper;
     _appSettings     = appSettings.Value;
 }
 public FormInventarioStock()
 {
     productoService  = new ProductoService();
     actividadService = new ActividadService();
     InitializeComponent();
     this.Text        = SessionHelper.accion + " Stock";
     this.label1.Text = SessionHelper.accion + " Stock";
     CargarDG();
 }
Example #21
0
 public RubroMaestroController(IRubroMaestroService rubroMaestroService,
                               IRubroService rubroService,
                               IRubroMaestroRepository rubroMaestroRepository,
                               IProductoService productoService)
 {
     this.rubroMaestroService    = rubroMaestroService;
     this.rubroService           = rubroService;
     this.rubroMaestroRepository = rubroMaestroRepository;
     this.productoService        = productoService;
 }
 public usercProducto()
 {
     InitializeComponent();
     dgProductos.AutoGenerateColumns = false;
     pservice  = new ProductoService();
     mservice  = new MarcaService();
     prservice = new PresentacionService();
     cservice  = new CategoriaService();
     lservice  = new LaboratorioService();
 }
        private IProductoService ObtenerServicio()
        {
            var services = new ServiceCollection();

            services.UseServices();
            var serviceProvider = services.BuildServiceProvider();
            IProductoService servicioProductos = serviceProvider.GetRequiredService <IProductoService>();

            return(servicioProductos);
        }
 public EditarOrden(int codigo, DataGridView dgvIngreso)
 {
     InitializeComponent();
     iservice        = new IngresoService();
     pservice        = new ProductoService();
     Codigo_ingreso  = codigo;
     this.dgvIngreso = dgvIngreso;
     FormatDateTime();
     Cargar();
 }
Example #25
0
        public ProductoService(IDiscoveryClient discoveryClient, IConfiguration configuration)
        {
            var handler    = new DiscoveryHttpClientHandler(discoveryClient);
            var httpClient = new HttpClient(handler, false)
            {
                BaseAddress = new Uri(configuration["urlProductosServicios"])
            };

            this._productoService = RestClient.For <IProductoService>(httpClient);
        }
Example #26
0
 public usercRegistrarOrden()
 {
     InitializeComponent();
     dgProductos.AutoGenerateColumns = false;
     dgIngresos.AutoGenerateColumns  = false;
     pservice  = new ProductoService();
     mservice  = new MarcaService();
     prservice = new PresentacionService();
     cservice  = new CategoriaService();
     iservice  = new IngresoService();
 }
        public async Task <ActionResult> Delete(int id, IFormCollection collection)
        {
            try
            {
                IProductoService servicioProductos = ObtenerServicio();
                await servicioProductos.DeleteProductoAsync(id);

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }
Example #28
0
        public ProductosController(IProductoService productoService, IProgramaEstrategicoService programaEstrategicoService)
        {
            if (productoService == null)
            {
                throw new ArgumentNullException("productoService");
            }
            if (programaEstrategicoService == null)
            {
                throw new ArgumentNullException("programaEstrategicoService");
            }

            _productoService            = productoService;
            _programaEstrategicoService = programaEstrategicoService;
        }
Example #29
0
 public ProductoController(IProductoService productoService,
                           IProductoRepository productoRepository,
                           ITipoProductoService tipoProductoService,
                           IUnidadMedidaService unidadMedidadService,
                           IRubroService rubroService,
                           IRubroMaestroService rubroMaestroService,
                           ISubrubroService subrubroService)
 {
     this.productoService      = productoService;
     this.productoRepository   = productoRepository;
     this.tipoProductoService  = tipoProductoService;
     this.unidadMedidadService = unidadMedidadService;
     this.rubroService         = rubroService;
     this.rubroMaestroService  = rubroMaestroService;
     this.subrubroService      = subrubroService;
 }
Example #30
0
 public OrdenesController(IordenService ordenService, IProductoService productoService)
 {
     _ordenService    = ordenService;
     _productoService = productoService;
 }
Example #31
0
 public IndexModel(IPedidoService pedidoservice, IProductoService productoService, IClienteService clienteService)
 {
     this._PedidoService   = pedidoservice;
     this._ProductoService = productoService;
     this._clienteService  = clienteService;
 }
Example #32
0
 public HomeController(IUsuarioService usuarioService, IProductoService productoService)
 {
     this.usuarioService = usuarioService;
     this.productoService = productoService;
 }
Example #33
0
 public FrmProductos()
 {
     InitializeComponent();
     productoService = new ProductoService(new AlmacenORMDataContext());
 }