コード例 #1
0
        public static string QueryMzOrderPrice(string sid)
        {
            string              r   = "";
            B_QbqqSaleOrder     bms = new B_QbqqSaleOrder();
            VMzOrderPrice       vmp = new VMzOrderPrice();
            StringBuilder       djh = new StringBuilder();
            StringBuilder       omh = new StringBuilder();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                bms        = bmsob.Query("and sid='" + sid + "'");
                vmp.omoney = bms.omoney.ToString("#0.00");
                vmp.dmoney = bms.dmoney.ToString("#0.00");
                B_MzPriceFile bmpf = bmpfb.Query(" and sid='" + sid + "'");
                if (bmpf != null)
                {
                    vmp.pfname = bmpf.fname;
                    vmp.bshow  = "1";
                    vmp.pfid   = bmpf.id.ToString();
                }
                List <B_PayImg> ldbpi = bpib.QueryList(" and sid='" + sid + "' and ptype='dj'");
                if (ldbpi != null)
                {
                    djh.Append("<table style='width:100%;border:none'>");
                    foreach (B_PayImg bpi in ldbpi)
                    {
                        djh.AppendFormat("<tr><td><img id='{0}' src='{1}' alt='' onclick='nck(this.id)'/></td></tr>", bpi.id, bpi.url);
                    }
                    djh.Append("<table>");
                }
                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>");
                }
                vmp.djhtm = djh.ToString();
                vmp.omhtm = omh.ToString();
                r         = js.Serialize(vmp);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string r = "", sid = "", fname = "", oprice = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();
            B_MzPriceFileBll    bmpfb = new B_MzPriceFileBll();
            B_QbqqSaleOrderBll  bmsob = new B_QbqqSaleOrderBll();

            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_MzPriceFile spi     = new B_MzPriceFile();

                string url = "/UpFile/PriceFIle/";
                string ur  = uf.UpXls(files[0], newname, url, 10240000);
                if (ur.Length > 1)
                {
                    string xname = new UpFile().GetFileExName(files[0]);
                    spi.sid    = sid;
                    spi.maker  = iv.u.ename;
                    spi.fname  = fname + xname;
                    spi.furl   = url + ur;
                    spi.fmoney = Convert.ToDecimal(oprice);
                    spi.cdate  = DateTime.Now.ToString();
                    bmpfb.Delete(" and sid='" + sid + "'");
                    if (bmpfb.Add(spi))
                    {
                        bmsob.SetOrderMoney(sid, oprice);
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    r = ur;
                }
            }
            else
            {
                r = iv.badstr;
            }
            Response.Write("{  msg:'" + r + "'}");
            Response.End();
        }
コード例 #3
0
 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);
         }
     }
 }