public static ArrayList InQueryProductionInHouse(string sid) { ArrayList r = new ArrayList(); SessionUserValidate iv = SysValidateBll.ValidateSession(); B_AfterPartInHouseOrder bio = new B_AfterPartInHouseOrder(); if (iv.f) { r.Add(iv.badstr); List <B_AfterGroupProduction> lbp = bagpb.QueryList(" and psid in (select psid from dbo.B_AfterPartInHouseProduction where sid='" + sid + "') order by gnum asc"); if (lbp != null) { int xh = 1; foreach (B_AfterGroupProduction bp in lbp) { ArrayList al = new ArrayList(); al.Add(bp.psid); al.Add(xh); al.Add(bp.place); al.Add(bp.pname); al.Add(bp.mname); al.Add(bp.height.ToString() + "*" + bp.width.ToString() + "*" + bp.deep.ToString()); al.Add(bp.pnum); r.Add(al); xh++; } } } else { r.Add(iv.badstr); } return(r); }
public static string ProductionInHouse(string bcode, string sid, string psids, string remark) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); B_AfterPartInHouseOrder bio = new B_AfterPartInHouseOrder(); if (iv.f) { string eco = ""; int pc = bapihob.CreateNum(sid, psids); if (pc != 0) { eco = "-" + pc.ToString().PadLeft(2, '0'); } B_AfterReModifyOrder bro = barmob.Query(" and sid='" + sid + "'"); bio.sid = CommonBll.GetSid(); bio.osid = sid; bio.pscode = bro.scode + eco; bio.scode = bro.scode; bio.remark = remark; bio.maker = iv.u.ename; bio.cdate = DateTime.Now.ToString(); bio.plist = psids; if (bapihob.Add(bio) > 0) { if (!bagpb.Exists(" and sid='" + sid + "' and psid not in (select psid from dbo.B_AfterPartInHouseProduction where osid='" + sid + "')")) { cosb.UpState(sid, "istoreget", 2); cosb.UpState(sid, "iproduce", 2); EventBtnDo.FireEventBtn(sid, bcode, "1", "产品全部入库"); } else { EventBtnDo.FireEventBtn(sid, bcode, "1", "产品部分入库"); } r = "S"; } else { r = "F"; } } else { r = iv.badstr; } return(r); }