public static ICabecalhoRodape Criar(int setor = 0, bool isBrasao = false, bool isLogo = false, bool isCredenciado = false) { CabecalhoRodapeDefault cab = new CabecalhoRodapeDefault(isBrasao, isLogo, isCredenciado); CabecalhoRodapeBus bus = new CabecalhoRodapeBus(); if (setor > 0) { return(bus.ObterEnderecoSetor(cab, setor)); } if (HttpContext.Current.User != null && HttpContext.Current.User.Identity.IsAuthenticated) { return(bus.ObterEnderecoFuncLogado(cab)); } return(bus.ObterEnderecoDefault(cab)); }
public CabecalhoRodapeDefault(bool isBrasao = false, bool isLogo = false, bool isCredenciado = false) { string pathImg = System.Web.HttpContext.Current.Request.MapPath("~/Content/_imgLogo/logobrasao.jpg"); if (isBrasao) { LogoBrasao = File.ReadAllBytes(pathImg); LogoBrasao = AsposeImage.RedimensionarImagem(LogoBrasao, 1.8f); } pathImg = System.Web.HttpContext.Current.Request.MapPath("~/Content/_imgLogo/logomarca.png"); if (isLogo || (!isLogo && !isBrasao)) { LogoOrgao = File.ReadAllBytes(pathImg); LogoOrgao = AsposeImage.RedimensionarImagem(LogoOrgao, 1.8f); } if (isCredenciado) { pathImg = HttpContext.Current.Request.MapPath("~/Content/_imgLogo/logomarca_simlam_credenciado_pb.png"); LogoSimlam = File.ReadAllBytes(pathImg); LogoSimlam = AsposeImage.RedimensionarImagem(LogoSimlam, 3.6f); } else { pathImg = HttpContext.Current.Request.MapPath("~/Content/_imgLogo/logomarca_simlam_pb.png"); LogoSimlam = File.ReadAllBytes(pathImg); LogoSimlam = AsposeImage.RedimensionarImagem(LogoSimlam, 1.8f); } pathImg = System.Web.HttpContext.Current.Request.MapPath("~/Content/_imgLogo/logoestado.png"); LogoEstado = File.ReadAllBytes(pathImg); pathImg = System.Web.HttpContext.Current.Request.MapPath("~/Content/_imgLogo/logo_novo.jpg"); LogoNovo = File.ReadAllBytes(pathImg); LogoNovo = AsposeImage.RedimensionarImagem(LogoNovo, 1.8f); CabecalhoRodapeBus bus = new CabecalhoRodapeBus(); bus.ObterNomes(this); SetorNome = AsposeData.Empty; }