Ejemplo n.º 1
0
        public static HtmlString CtrlImage(this HtmlHelper html, string viewName, string id, string idButton)
        {
            var ctrl = new CtrlImageModel
            {
                ViewName = viewName,
                Id       = id,
                IdButton = idButton
            };

            return(new HtmlString(ctrl.GetHtml()));
        }
Ejemplo n.º 2
0
        public Image GetImageLogoFromByteArray(CtrlImageModel imgLogo)
        {
            byte[] byteArrayImage = imgLogo.ByteImage;
            Image  image;

            if (byteArrayImage != null)
            {
                MemoryStream streamImage = new MemoryStream(byteArrayImage);
                image = Image.FromStream(streamImage);
            }
            else
            {
                image = null;
            }

            return(image);
        }
Ejemplo n.º 3
0
        public static HtmlString CtrlImage(this HtmlHelper html, string id, byte[] byteImage = default(byte[]), string height = "24", string width = "24", string imageType = "circle", string altText = "Logo del patrocinador ", bool disabled = false)
        {
            var ctrl = new CtrlImageModel(id, byteImage, imageType, altText, height, width, disabled);

            return(new HtmlString(ctrl.GetHtml()));
        }