コード例 #1
0
ファイル: ProduceSell.cs プロジェクト: miradel51/HownetServer
        /// <summary>
        /// 审核/弃审入库单
        /// </summary>
        /// <param name="ID">入库单ID</param>
        /// <param name="t">真为审核出库,假为弃审入库</param>
        public bool CheckIsOK(int ID, bool t, int Depot)
        {
            bool _isOK = true;

            Hownet.BLL.Repertory               bllRep = new Repertory();
            Hownet.Model.Repertory             modRep = new Hownet.Model.Repertory();
            Hownet.BLL.ProduceSellOne          blPSO  = new ProduceSellOne();
            Hownet.BLL.MaterielList            bllML  = new MaterielList();
            Hownet.Model.MaterielList          modML  = new Hownet.Model.MaterielList();
            List <Hownet.Model.ProduceSellOne> li     = blPSO.DataTableToList(blPSO.GetList("(MainID=" + ID + ")").Tables[0]);

            modRep.DepartmentID = Depot;
            for (int i = 0; i < li.Count; i++)
            {
                modRep.BrandID    = modML.BrandID = li[i].BrandID;
                modRep.ColorID    = modML.ColorID = 0;
                modRep.ColorOneID = modML.ColorOneID = 0;
                modRep.ColorTwoID = modML.ColorTwoID = 0;
                modRep.SizeID     = modML.SizeID = 0;
                modRep.MaterielID = modML.MaterielID = li[i].MaterielID;
                modRep.MeasureID  = modML.MeasureID = li[i].MeasureID;
                modRep.MListID    = bllML.GetID(modML);
                if (bllRep.GetAmountByModel(modRep) < li[i].Amount)
                {
                    _isOK = false;
                    break;
                }
            }
            return(_isOK);
        }
コード例 #2
0
ファイル: ProduceSell.cs プロジェクト: miradel51/HownetServer
        /// <summary>
        /// 审核/弃审入库单
        /// </summary>
        /// <param name="ID">入库单ID</param>
        /// <param name="t">真为审核出库,假为弃审入库</param>
        public void VerifyProcess(int ID, bool t, int Depot)
        {
            Hownet.BLL.Repertory               bllRep = new Repertory();
            Hownet.Model.Repertory             modRep = new Hownet.Model.Repertory();
            Hownet.BLL.ProduceSellOne          blPSO  = new ProduceSellOne();
            Hownet.BLL.MaterielList            bllML  = new MaterielList();
            Hownet.Model.MaterielList          modML  = new Hownet.Model.MaterielList();
            List <Hownet.Model.ProduceSellOne> li     = blPSO.DataTableToList(blPSO.GetList("(MainID=" + ID + ")").Tables[0]);

            modRep.DepartmentID = Depot;
            for (int i = 0; i < li.Count; i++)
            {
                modRep.BrandID    = modML.BrandID = li[i].BrandID;
                modRep.ColorID    = modML.ColorID = 0;
                modRep.ColorOneID = modML.ColorOneID = 0;
                modRep.ColorTwoID = modML.ColorTwoID = 0;
                modRep.SizeID     = modML.SizeID = 0;
                modRep.MaterielID = modML.MaterielID = li[i].MaterielID;
                modRep.Amount     = li[i].Amount;
                modRep.MeasureID  = modML.MeasureID = li[i].MeasureID;
                modRep.MListID    = bllML.GetID(modML);
                bllRep.InOrOut(modRep, !t);
            }
        }