Example #1
0
        private void bindAttachment(decimal applyformId)
        {
            var attachment = ApplyformQueryService.QueryApplyAttachmentView(applyformId);

            UserControl.OutPutImage outPutImage = LoadControl(ResolveUrl("~/UserControl/OutPutImage.ascx")) as UserControl.OutPutImage;
            outPutImage.ApplyAttachment  = attachment;
            outPutImage.IsPlatform       = true;
            outPutImage.ClientIDMode     = System.Web.UI.ClientIDMode.Static;
            outPutImage.EnableTheming    = false;
            outPutImage.ApplyformId      = applyformId;
            divApplyAttachment.InnerHtml = string.Format("<h3 class=\"titleBg\">附件</h3><div id=\"divOutPutImage\" class=\"clearfix\">{0}</div>", outPutImage.Binddata());
        }
        private void bindAttachment(RefundOrScrapApplyform applyform)
        {
            RefundApplyform refundApplyform = applyform as RefundApplyform;

            if (refundApplyform != null && (refundApplyform.RefundType == RefundType.Involuntary || refundApplyform.RefundType == RefundType.SpecialReason))
            {
                var attachment = ApplyformQueryService.QueryApplyAttachmentView(refundApplyform.Id);
                UserControl.OutPutImage outPutImage = LoadControl(ResolveUrl("~/UserControl/OutPutImage.ascx")) as UserControl.OutPutImage;
                outPutImage.ApplyAttachment = attachment;
                outPutImage.IsPlatform      = refundApplyform.Status != RefundApplyformStatus.Refunded && refundApplyform.Status != RefundApplyformStatus.DeniedByProviderTreasurer && refundApplyform.Status != RefundApplyformStatus.Denied;
                outPutImage.ClientIDMode    = System.Web.UI.ClientIDMode.Static;
                outPutImage.EnableTheming   = false;
                outPutImage.ApplyformId     = refundApplyform.Id;
                string content = outPutImage.Binddata();
                divApplyAttachment.InnerHtml = string.IsNullOrEmpty(content) ? string.Empty : string.Format("<h3 class=\"titleBg\">附件</h3><div id=\"divOutPutImage\" class=\"clearfix\">{0}</div>", outPutImage.Binddata());
            }
        }