/// <summary> /// 提交失败单据状况 /// </summary> /// <returns>是否提交成功</returns> private bool ErrSubmit() { string cCode = txtOrder.Text; DataSet ds; StockIn sk; sk = StockInBusiness.CreateSIOrderOSArrive(cCode, "", "", 0, out ds); if (sk.U8Details == null || sk.U8Details.Count < 1) { return(true); } if (sk.U8Details.Count != tempSIO.U8Details.Count) { return(true); } StockInDetail opera = tempSIO.OperateDetails[0]; StockInDetail sd = null; sd = sk.U8Details.Find(delegate(StockInDetail sdd) { return(sdd.cInvCode.ToUpper() == opera.cInvCode.ToUpper() && sdd.Batch.ToUpper() == opera.Batch.ToUpper()); }); if (sd == null || sd.Nquantity != opera.Nquantity) { return(true); } return(false); }
private bool verifyArrive(string ArriveCode) { try { DataSet ds; tempSIO = StockInBusiness.CreateSIOrderOSArrive(ArriveCode, "", "", 0, out ds); if (tempSIO.U8Details == null || tempSIO.U8Details.Count < 1) { return(false); } if (string.IsNullOrEmpty(tempSIO.Whcode)) { MessageBox.Show("对不起,该单据尚未指明入库仓库!"); return(false); } Warehouse stock = null; stock = Common.s_Warehouse.Find(delegate(Warehouse wh) { return(wh.cwhcode.Trim() == tempSIO.Whcode.Trim()); }); if (stock == null) { MessageBox.Show("对不起,您没有该单据仓库的操作权限!"); return(false); } if (string.IsNullOrEmpty(tempSIO.Whname)) { tempSIO.Whname = stock.cwhname; tempSIO.WhPos = stock.bwhpos == 1 ? true : false; } //Clear(); lblStore.Text = tempSIO.Whname; return(true); } catch (Exception er) { MessageBox.Show(er.Message); Init(); return(false); } }