Ejemplo n.º 1
0
        public ActionResult LibrosAdministrativos(bool inactivos = false)
        {
            if (!this.currentUser()) { return RedirectToAction("Ingresar"); }
            ViewBag.Title = "Administrativos";
            MenuNavBarSelected(2, 1);

            UsuarioDTO user = getCurrentUser();
            CuentaBancariaBL objBL = new CuentaBancariaBL();
            List<CuentaBancariaDTO> lista = new List<CuentaBancariaDTO>();
            ViewBag.vbInactivos = inactivos;

            if (user.IdEmpresa != 0)
            {
                if (!inactivos)
                { lista = objBL.getCuentasBancariasActivasPorTipoEnEmpresa(user.IdEmpresa, 2); }
                else
                { lista = objBL.getCuentasBancariasPorTipoEnEmpresa(user.IdEmpresa, 2); }
            }
            return View(lista);
        }
Ejemplo n.º 2
0
        public ActionResult Proforma(int? id)
        {
            if (!this.currentUser()) { return RedirectToAction("Ingresar", "Admin", new { Area = string.Empty }); }
            ViewBag.Title += "Proforma";
            MenuNavBarSelected(12);

            UsuarioDTO user = getCurrentUser();


            EntidadResponsableBL entBL = new EntidadResponsableBL();
            ViewBag.lstClientes = entBL.getEntidadesResponsablesActivasPorTipoEnEmpresa(user.IdEmpresa, 1);
            EmpresaBL empBL = new EmpresaBL();
            ViewBag.lstMonedas = empBL.getListaMonedasAll();
            MovimientoInvBL movItmBL = new MovimientoInvBL();
            ViewBag.lstItems = movItmBL.getItemsEnEmpresa_PorTipoMov(user.IdEmpresa, 1);
            CuentaBancariaBL cbBL = new CuentaBancariaBL();
            ViewBag.lstCuentasBancarias = cbBL.getCuentasBancariasActivasPorTipoEnEmpresa(user.IdEmpresa, 1);
            ViewBag.lstContactos = new List<ContactoDTO>();

            var objSent = TempData["Proforma"];
            if (objSent != null) { TempData["Proforma"] = null; return View(objSent); }

            ProformaDTO obj;
            if(id != null && id > 0)
            {
                obj = new ProformaBL().getProformaId((int)id);
                return View(obj);
            }
            obj = new ProformaDTO();
            obj.IdEmpresa = user.IdEmpresa;
            obj.FechaProforma = DateTime.Now;
            obj.DetalleProforma = new List<DetalleProformaDTO>();

            return View(obj);
        }