/// <summary>
        /// Recommends the pallet movments.
        /// </summary>
        /// <returns></returns>
        public DataView RecommendPalletMovments()
        {
            // check for each pallet in bulk store
            this.LoadFromRawSql(HCMIS.Repository.Queries.PalletLocation.SelectRecommendPalletMovments(StorageType.BulkStore));
            DataTable dtbl = new DataTable();
            dtbl.Columns.Add("ItemID");
            dtbl.Columns.Add("FullItemName");
            dtbl.Columns.Add("PalletNo");
            dtbl.Columns.Add("FromID");
            dtbl.Columns.Add("ToID");
            dtbl.Columns.Add("From");
            dtbl.Columns.Add("To");
            int itemID = 0;
            int freePreferedLocationCount = 0;
            Item itms = new Item();
            bool checkable = false;
            PalletLocation pl = new PalletLocation();

            while (!this.EOF)
            {
                if (Convert.ToInt32(this.DataRow["ItemID"]) != itemID)
                {
                    itemID = Convert.ToInt32(this.DataRow["ItemID"]);
                    // do this if this item is a bulk storage
                    itms.GetItemByPrimaryKey(itemID);
                    if (itms.StorageTypeID.ToString() == StorageType.BulkStore)
                    {
                        checkable = true;

                        pl.LoadFreePrefferedLocationFor(itemID);
                        freePreferedLocationCount = pl.RowCount;
                    }
                    else
                    {
                        checkable = false;
                    }
                }

                if (checkable && freePreferedLocationCount > 0)
                {
                    //add it to the table
                    DataRowView drv = dtbl.DefaultView.AddNew();
                    drv["ItemID"] = itemID;
                    drv["FullItemName"] = itms.FullItemName;
                    drv["FromID"] = this.ID;
                    drv["ToID"] = pl.ID;
                    Pallet pallet = new Pallet();
                    pallet.LoadByPrimaryKey(this.PalletID);
                    drv["PalletNo"] = pallet.PalletNo;
                    pl.MoveNext();
                    freePreferedLocationCount--;
                    drv["From"] = this.FullName;
                    drv["To"] = pl.FullName;
                }

                this.MoveNext();
            }

            return dtbl.DefaultView;
        }