Example #1
0
        /// <summary>
        /// 获取所有可以出库的货位,自动出库时调用
        /// </summary>
        /// <param name="houseName">库房名称</param>
        /// <param name="gsList">货位列表</param>
        /// <param name="reStr">执行状态描述</param>
        /// <returns>执行状态结果</returns>
        public bool GetAllowLeftHouseGs(string houseName, ref List <CellCoordModel> gsList, ref string reStr)
        {
            gsList = new List <CellCoordModel>();
            StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName);

            if (houseModel == null)
            {
                reStr = "不存在此库房!";
                return(false);
            }
            DataTable allowOutDt = bllGoodsSite.GetModelListByTaskSta(houseModel.StoreHouseID, EnumGSTaskStatus.出库允许.ToString());

            if (allowOutDt == null)
            {
                reStr = "没有允许出库的库存!";
                return(false);
            }

            for (int i = 0; i < allowOutDt.Rows.Count; i++)
            {
                int            rowth   = int.Parse(allowOutDt.Rows[i]["GoodsSiteRow"].ToString());
                int            colth   = int.Parse(allowOutDt.Rows[i]["GoodsSiteColumn"].ToString());
                int            layerth = int.Parse(allowOutDt.Rows[i]["GoodsSiteLayer"].ToString());
                CellCoordModel ccm     = new CellCoordModel(rowth, colth, layerth);
                gsList.Add(ccm);
            }
            return(true);
        }