Ejemplo n.º 1
0
        public static string LabelStrA(string sid, string gnum)
        {
            string              r = "";
            string              city = "", code = "";
            B_SaleOrderBll      bsob  = new B_SaleOrderBll();
            B_AfterSaleOrderBll basob = new B_AfterSaleOrderBll();
            B_ProductionItemBll bpit  = new B_ProductionItemBll();
            SessionUserValidate iv    = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                var o = bsob.Query(" and sid='" + sid + "'");
                if (o != null)
                {
                    city = o.city;
                    code = o.scode;
                }
                var ao = basob.Query(" and sid='" + sid + "'");
                if (ao != null)
                {
                    city = ao.city;
                    code = ao.scode;
                }
                B_GroupProduction bp = bgpb.Query(" and sid='" + sid + "' and gnum=" + gnum + " and icode like '01%'");
                B_GroupProduction bl = bgpb.Query(" and sid='" + sid + "' and gnum=" + gnum + " and icode like '05%'");
                if (bp != null)
                {
                    string c1 = "", c2 = "", blname = "";
                    if (bl != null)
                    {
                        blname = bl.iname;
                    }
                    B_ProductionItem ms1 = bpit.Query(" and psid='" + bp.psid + "' and ptype='m' and e_ptype='f' ");
                    if (ms1 != null)
                    {
                        c1 = ms1.height + "*" + ms1.width;
                    }
                    B_ProductionItem ms2 = bpit.Query(" and psid='" + bp.psid + "' and ptype='m' and e_ptype='s' ");
                    if (ms2 != null)
                    {
                        c2 = ms2.height + "*" + ms2.width;
                    }
                    r = "BqPrint://?BH=" + code + "&CP=" + bp.iname + "&WZ=" + bp.place + "&CC1=" + c1 + "&CC2=" + c2 + "&CZ=" + bp.mname + "&XH=" + bp.gnum + "&SJ=" + bp.locks + "&BL=" + blname + "&KX=" + bp.direction + "&CS=" + city + "&DT=" + DateTime.Now.ToString() + "&HY=" + bp.locktype + "&LX=PAdoor&ZX=" + gnum + "&IID=" + bp.id + "";
                }
            }
            else
            {
                r = "";
            }
            return(r);
        }
Ejemplo n.º 2
0
        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();
        }