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); }
protected void Page_Load(object sender, EventArgs e) { string r = ""; B_ProductionItemBll bpib = new B_ProductionItemBll(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { HttpFileCollection files = Request.Files; ExcleHelper eh = new ExcleHelper(); string newname = DateTime.Now.ToString("yyyyMMddhhmmssfff"); UpFile uf = new UpFile(); ArrayList efile = new ArrayList(); string url = "/UpFile/ImageMeasure/"; string ur = uf.UpXls(files[0], newname, url, 10240000); if (ur.Length > 1) { string furl = url + ur; string msg = ""; DataTable dt = eh.GetExcelTableByOleDB(furl, "SAP生产统计", true, ref msg); if (msg == "") { if (bpib.UpdateWorkLine(dt) > 0) { r = "S"; } else { r = "F"; } } else { r = "F"; } } else { r = ur; } } else { r = iv.badstr; } Response.Write("{ msg:'" + r + "'}"); Response.End(); }