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); } } }
protected void Page_Load(object sender, EventArgs e) { string r = "", sid = "", fname = "", oprice = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); B_AfterPriceFileBll bmpfb = new B_AfterPriceFileBll(); B_AfterSaleOrderBll bmsob = new B_AfterSaleOrderBll(); if (iv.f) { HttpFileCollection files = Request.Files; if (Request.QueryString["sid"] != null) { sid = Request.QueryString["sid"]; } if (Request.QueryString["fname"] != null) { fname = Request.QueryString["fname"]; } if (Request.QueryString["oprice"] != null) { oprice = Request.QueryString["oprice"]; } string newname = DateTime.Now.ToString("yyyyMMddhhmmssfff"); UpFile uf = new UpFile(); ArrayList efile = new ArrayList(); B_AfterPriceFile spi = new B_AfterPriceFile(); HttpPostedFile hpf = files[0]; string url = "/UpFile/PriceFIle/"; string ur = uf.UpXls(hpf, newname, url, 10240000); if (ur.Length > 1) { spi.sid = sid; spi.maker = iv.u.ename; spi.fname = fname + uf.GetFileExName(hpf); spi.furl = url + ur; spi.fmoney = Convert.ToDecimal(oprice); spi.cdate = DateTime.Now.ToString(); bmpfb.Delete(" and sid='" + sid + "'"); if (bmpfb.Add(spi) > 0) { // bmsob.SetOrderMoney(sid, oprice); r = "S"; } else { r = "F"; } } else { r = ur; } } else { r = iv.badstr; } Response.Write("{ msg:'" + r + "'}"); Response.End(); }