예제 #1
0
        /// <summary>
        /// 新增,更新宣传册模板
        /// </summary>
        /// <returns></returns>
        public async Task <ActionResult> AddTemplate(string id)
        {
            if (!string.IsNullOrEmpty(id))
            {
                Guid     gid = new Guid(id);
                Brochure bro = await BrochureRepository.FindAsync(b => b.BrochureID == gid);

                if (bro != null)
                {
                    return(View(bro));
                }
            }
            return(View(new Brochure()));
        }
예제 #2
0
        /// <summary>
        /// 显示盈亏结构图
        /// </summary>
        /// <returns></returns>
        public async Task <FileResult> ShowSFPic(string id)
        {
            try
            {
                if (!string.IsNullOrEmpty(id))
                {
                    Guid gid = new Guid(id);
                    Entities.Models.Brochure find = await BrochureRepository.FindAsync(b => b.BrochureID == gid);

                    byte[] image = find.SFPic;
                    return(new FileContentResult(image, "image/jpeg"));
                }
                return(null);
            }
            catch (Exception)
            {
                return(null);
            }
        }