Exemple #1
0
        /// <summary>
        /// 提交失败单据状况
        /// </summary>
        /// <returns>是否提交成功</returns>
        private bool ErrSubmit()
        {
            string  cCode = txtOrder.Text;
            DataSet ds;
            StockIn sk;

            sk = StockInBusiness.GetOMMOHead(cCode, out MODetails, 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);
        }
Exemple #2
0
        private bool verifyArrive(string cCode)
        {
            cCode = cCode.ToUpper();
            try
            {
                DataSet ds;
                tempSIO = StockInBusiness.GetOMMOHead(cCode, out MODetails, out ds);
                if (MODetails == null || MODetails.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;
                }

                tempSIO.U8Details = StockInBusiness.GetOMMOBody(MODetails[0].MoDetailsID);
                //Clear();
                return(true);
            }
            catch (Exception er)
            {
                MessageBox.Show(er.Message);
                Init();
                return(false);
            }
        }