private void CkBzFlg(stkot p) { //盘点是否有为空的明细 var qrydtl = p.stkotdtl.Where(e => e.qty == 0 && e.bzflg == GetN()); foreach (stkotdtl d in qrydtl) { d.bzflg = GetY(); d.bzr = LoginInfo.Usrid; d.bzdat = GetCurrentDate(); } WmsDc.SubmitChanges(); //修改播种标记 p.bzflg = GetY(); //审核配送单 p.chkflg = GetY(); p.chkdat = GetCurrentDay(); p.ckr = LoginInfo.Usrid; WmsDc.SubmitChanges(); //写入dtrlog //查看是否dtrlog已经有单据,没有就插入 var qry = WmsDc.dtrlog .Where(e => e.rcvdptid == p.rcvdptid && e.bllno == p.stkouno && e.bllid == p.bllid) .Select(e => e.bllno); var arrqry = qry.ToArray(); if (arrqry.Length <= 0) { dtrlog dl = new dtrlog(); dl.bllid = p.bllid; dl.bllno = p.stkouno; dl.rcvdptid = p.rcvdptid; WmsDc.dtrlog.InsertOnSubmit(dl); } WmsDc.SubmitChanges(); if (!(WmsDc.stklst.Where(e => e.stkouno == p.stkouno)).Any()) { stklst astklst = new stklst(); astklst.stkouno = p.stkouno; WmsDc.stklst.InsertOnSubmit(astklst); //WmsDc.SubmitChanges(); } WmsDc.SubmitChanges(); }
private void CkBzFlg(stkot p) { i(p.wmsno, "", System.DateTime.Now.ToString("yyyyMMddHHmmss.fff"), Request["rnd"], "3", LoginInfo.DefSavdptid); //盘点是否有为空的明细 var qrydtl = p.stkotdtl.Where(e => e.qty == 0 && e.bzflg == GetN()); foreach (stkotdtl d in qrydtl) { d.bzflg = GetY(); d.bzr = LoginInfo.Usrid; d.bzdat = GetCurrentDate(); } WmsDc.SubmitChanges(); //修改播种标记 p.bzflg = GetY(); //审核配送单 p.chkflg = GetY(); p.chkdat = GetCurrentDay(); p.ckr = LoginInfo.Usrid; //写入dtrlog //查看是否dtrlog已经有单据,没有就插入 var qry = WmsDc.dtrlog .Where(e => e.rcvdptid == p.rcvdptid && e.bllno == p.stkouno && e.bllid == p.bllid) .Select(e => e.bllno); var arrqry = qry.ToArray(); if (arrqry.Length <= 0) { dtrlog dl = new dtrlog(); dl.bllid = p.bllid; dl.bllno = p.stkouno; dl.rcvdptid = p.rcvdptid; WmsDc.dtrlog.InsertOnSubmit(dl); } if (!(WmsDc.stklst.Where(e => e.stkouno == p.stkouno)).Any()) { stklst astklst = new stklst(); astklst.stkouno = p.stkouno; WmsDc.stklst.InsertOnSubmit(astklst); WmsDc.SubmitChanges(); } i(p.wmsno, "", System.DateTime.Now.ToString("yyyyMMddHHmmss.fff"), Request["rnd"], "4", LoginInfo.DefSavdptid); }