Пример #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);
        }