Пример #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());
        }
Пример #2
0
        public void OutPutApplyAttachment()
        {
            string applyAttachmentId = HttpContext.Current.Request.QueryString["ApplyAttachmentId"];

            if (!string.IsNullOrEmpty(applyAttachmentId))
            {
                Guid id = Guid.Parse(applyAttachmentId);
                ApplyAttachmentView apply = ApplyformQueryService.QueryApplyAttachmentView(id);
                if (apply != null)
                {
                    HttpContext.Current.Response.BinaryWrite(apply.Thumbnail);
                }
            }
        }
Пример #3
0
        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());
            }
        }
Пример #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     RegisterOEMSkins("form.css");
     if (!IsPostBack)
     {
         lblRefunPhone.Text = CurrenContract.RefundPhone;
         setBackButton();
         decimal applyformId;
         if (decimal.TryParse(Request.QueryString["id"], out applyformId))
         {
             RefundOrScrapApplyform applyform = ApplyformQueryService.QueryRefundOrScrapApplyform(applyformId);
             string lockErrorMsg;
             if (Lock(applyformId, LockRole.Provider, "退票处理", out lockErrorMsg))
             {
                 if (applyform == null)
                 {
                     showErrorMessage("退/废票申请单不存在");
                 }
                 else
                 {
                     var attachment = ApplyformQueryService.QueryApplyAttachmentView(applyform.Id);
                     if (attachment.Any())
                     {
                         ucOutPutImage.IsPlatform      = false;
                         ucOutPutImage.ApplyAttachment = attachment;
                     }
                     else
                     {
                         divApplyAttachment.Visible = false;
                     }
                     IsSpeical          = !applyform.Order.IsThirdRelation && applyform.IsSpecial;
                     RequireSeparatePNR = applyform.RequireSeparatePNR;
                     bindData(applyform);
                 }
             }
             else
             {
                 showErrorMessage("锁定申请单失败。原因:" + lockErrorMsg);
             }
         }
         else
         {
             showErrorMessage("参数错误");
         }
     }
 }
Пример #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     RegisterOEMSkins("form.css");
     if (!IsPostBack)
     {
         setBackButton();
         if (decimal.TryParse(Request.QueryString["id"], out applyformId))
         {
             RefundOrScrapApplyform applyform = ApplyformQueryService.QueryRefundOrScrapApplyform(applyformId);
             if (applyform == null)
             {
                 showErrorMessage("退/废票申请单不存在");
             }
             else
             {
                 if (applyform.RefundBill != null)
                 {
                     var fare = applyform.RefundBill.Purchaser.Amount;
                     BalanceRefundError.Attributes.Add("add", applyformId + "|" + fare);
                 }
                 var applyerAccount = CurrentUser.Name;
                 var attachment     = ApplyformQueryService.QueryApplyAttachmentView(applyform.Id);
                 if (attachment.Any())
                 {
                     ucOutPutImage.IsPlatform      = false;
                     ucOutPutImage.ApplyAttachment = attachment;
                 }
                 else
                 {
                     divApplyAttachment.Visible = false;
                 }
                 setButton(applyform);
                 bindData(applyform);
             }
         }
         else
         {
             showErrorMessage("参数错误");
         }
     }
 }