Ejemplo n.º 1
0
        /// <summary>
        /// 获取图片
        /// </summary>
        /// <param name="keyValue">主键</param>
        public void GetImg(string keyValue)
        {
            ArticleEntity entity = GetEntity(keyValue);
            string        img    = "";

            if (entity != null && !string.IsNullOrEmpty(entity.F_Img))
            {
                ImgEntity imgEntity = imgIBLL.GetEntity(entity.F_Img);

                if (imgEntity != null && !string.IsNullOrEmpty(imgEntity.F_Content))
                {
                    FileDownHelper.DownLoadBase64(imgEntity.F_Content, imgEntity.F_Name);
                    return;
                }
            }
            else
            {
                img = "/Content/images/plhome/banner_df.jpg";
            }

            if (string.IsNullOrEmpty(img))
            {
                img = "/Content/images/plhome/banner_df.jpg";
            }
            FileDownHelper.DownLoad(img);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取图片
        /// </summary>
        /// <param name="type">类型</param>
        public void GetImg(string type)
        {
            HomeConfigEntity entity = GetEntityByType(type);
            string           img    = "";

            if (entity != null && !string.IsNullOrEmpty(entity.F_Img))
            {
                ImgEntity imgEntity = imgIBLL.GetEntity(entity.F_Img);

                if (imgEntity != null && !string.IsNullOrEmpty(imgEntity.F_Content))
                {
                    FileDownHelper.DownLoadBase64(imgEntity.F_Content, imgEntity.F_Name);
                    return;
                }
            }
            else
            {
                img = "/Content/images/plhome/addImg.png";
            }

            if (string.IsNullOrEmpty(img))
            {
                img = "/Content/images/plhome/addImg.png";
            }
            FileDownHelper.DownLoad(img);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 获取图片
        /// </summary>
        /// <param name="keyValue">主键</param>
        public void GetImg(string keyValue)
        {
            //首先获取实体
            LR_StampManageEntity entity = GetEntity(keyValue);
            string img = "";

            //实体是否存在
            if (entity != null && !string.IsNullOrEmpty(entity.F_ImgFile))
            {
                ImgEntity imgEntity = imgIBLL.GetEntity(entity.F_ImgFile);

                if (imgEntity != null && !string.IsNullOrEmpty(imgEntity.F_Content))
                {
                    FileDownHelper.DownLoadBase64(imgEntity.F_Content, imgEntity.F_Name);
                    return;
                }
            }
            else
            {
                img = "/Content/images/add.jpg";
            }
            if (string.IsNullOrEmpty(img))
            {
                img = "/Content/images/add.jpg";
            }
            FileDownHelper.DownLoad(img);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 获取图片
        /// </summary>
        /// <param name="keyValue">主键</param>
        public void GetImg(string keyValue)
        {
            ImgEntity imgEntity = GetEntity(keyValue);

            if (imgEntity != null && !string.IsNullOrEmpty(imgEntity.F_Content))
            {
                FileDownHelper.DownLoadBase64(imgEntity.F_Content.Replace("data:image/png;base64,", ""), imgEntity.F_Name);
            }
        }