/// <summary> /// 提交失败单据状况 /// </summary> /// <returns>是否提交成功</returns> private bool ErrSubmit() { string cCode = txtOrder.Text; DataSet ds; StockIn sk; sk = StockInBusiness.CreateSIOrderArrive(cCode, "", "", 1, out ds); if (sk == null) { return(true); } 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.fShallInQuan != opera.fShallInQuan) { return(true); } return(false); }
/// <summary> /// 获取到货单信息 /// </summary> /// <param name="ArriveCode">到货单号</param> /// <returns>是否存在</returns> private bool verifyArrive(string ArriveCode) { ArriveCode = ArriveCode.ToUpper(); try { VerifyLength(ArriveCode); DataSet ds; if (rbtArrival.Checked) { tempSIO = StockInBusiness.CreateSIOrderArrive(ArriveCode, "", "", 0, out ds); } else { if (ArriveCode.Length < 12) { tempSIO = StockInBusiness.CreateSIOrderByGSPVouch(ArriveCode, null, out ds);//质检单来源 } else { tempSIO = StockInBusiness.CreateSIOrderByGSPVouch(null, ArriveCode, 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; } //仓库名赋值 lblStore.Text = tempSIO.Whname; return(true); } catch (Exception er) { MessageBox.Show(er.Message); Init(); return(false); } }
private bool verifyArrive(string ArriveCode) { ArriveCode = ArriveCode.ToUpper(); try { DataSet ds; tempSIO = StockInBusiness.CreateSIOrderArrive(ArriveCode, "", "", 1, out ds); if (tempSIO.U8Details == null || tempSIO.U8Details.Count < 1) { return(false); } if (!ConvertValue()) { 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); } }