public static string QueryAfterMoney(string sid) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { VAOrderPrice vaop = new VAOrderPrice(); StringBuilder omh = new StringBuilder(); B_AfterSaleOrder bafo = abasob.Query("and sid='" + sid + "'"); if (bafo != null) { vaop.omoney = bafo.omoney.ToString("#0.00"); B_AfterPriceFile bapf = abpfb.Query("and sid='" + sid + "'"); if (bapf != null) { vaop.bshow = "1"; vaop.fname = bapf.fname; vaop.pfid = bapf.id.ToString(); } List <B_PayImg> lobpi = bpib.QueryList(" and sid='" + sid + "' and ptype='o'"); if (lobpi != null) { omh.Append("<table style='width:100%;border:none'>"); foreach (B_PayImg bpi in lobpi) { omh.AppendFormat("<tr><td><img id='{0}' src='{1}' alt='' onclick='nck(this.id)'/></td></tr>", bpi.id, bpi.url); } omh.Append("<table>"); } vaop.ohtm = omh.ToString(); r = js.Serialize(vaop); } } else { r = iv.badstr; } return(r); }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["sid"] != null) { string filePath = ""; string fileName = ""; string sid = Request.QueryString["sid"].ToString(); string otype = Request.QueryString["otype"].ToString(); string ftype = Request.QueryString["ftype"].ToString(); bool urlencode = true; string brower = Request.Browser.Browser; if (brower == "Firefox") { urlencode = false; } #region//附件 if (otype == "") { if (ftype == "a") { B_Attachment ba = bmib.Query(" and id=" + sid + ""); if (ba != null) { filePath = Server.MapPath(ba.furl); fileName = ba.fname; } } if (ftype == "d") { B_DesignPlan ba = bdpb.Query(" and id=" + sid + ""); if (ba != null) { filePath = Server.MapPath(ba.durl); fileName = ba.dname; } } } #endregion #region //木门单下载 #endregion #region //木作单下载 if (otype == "mz") { if (ftype == "rplan") { B_MzRequstDesign bp = bmrdpb.Query(" and id=" + sid + ""); if (bp != null) { filePath = Server.MapPath(bp.url); fileName = bp.pname; } } if (ftype == "plan") { B_MzDesignPlan bp = bmdpb.Query(" and id=" + sid + ""); if (bp != null) { filePath = Server.MapPath(bp.purl); fileName = bp.pname; } } if (ftype == "bj") { B_MzPriceFile bp = bmpfb.Query(" and id=" + sid + ""); if (bp != null) { filePath = Server.MapPath(bp.furl); fileName = bp.fname; } } } #endregion #region//反馈单下载 if (otype == "fk") { if (ftype == "bj") { B_AfterPriceFile bp = bapfb.Query(" and id=" + sid + ""); if (bp != null) { filePath = Server.MapPath(bp.furl); fileName = bp.fname; } } } #endregion if (filePath != "" && fileName != "") { Downfiles(filePath, fileName, urlencode); } } }