} //Lägger till ny CubeBox på vald plats

        public bool AddNewCubeoidBox(int iD, uint weight, bool isFragile, int insurance, decimal xSide, decimal ySide, decimal zSide, int floor, int row, out string result)
        {
            bool valid = false;

            if (!iDDic.ContainsKey(iD)) //kollar så att det id man skickar in inte redans finns i lagret
            {
                bool wareHouseWeight = false;
                bool floorWeight     = false;


                BoxCreator       boxCreator = new CubeoidBoxCreator(iD, weight, isFragile, insurance, xSide, ySide, zSide); //skapar en ny låda med in parametrarna
                I3DStorageObject boxes      = boxCreator.CreateBox();


                Weight();                                      //kallar på weight metoden för att få viktinformation
                if (CurrentWeight + boxes.Weight <= MaxWeight) //kollar så att lådan inte får totalviken på warehouse att överskridas
                {
                    wareHouseWeight = true;
                    if (stackWeight[row] + boxes.Weight <= 2000) //kollar så att lådan inte får vånings "stacken" att överskridas
                    {
                        floorWeight = true;
                    }
                }

                if (wareHouseWeight == true & floorWeight == true)          //om lådan inte överskrider nån vikt
                {
                    valid = wareHouseLocation[floor, row].AddNewBox(boxes); //lådan läggs till i arrayens lista och får tillbaka en bool om det gick eller inte

                    if (valid == true)                                      //om det gick sparas lådans ID i dictionaryn
                    {
                        iDDic.Add(boxes.ID, 1);
                    }
                    result = wareHouseLocation[floor, row].ToString(); //en string retuneras med information om lådan
                }
                else //om lådan överskrider nån vikt, skickas ett felmeddelande
                {
                    throw new ArgumentException("The floor or the warehouse is full");
                }
            }
            else //om IDt redan används skickas ett felmeddelande
            {
                throw new ArgumentException("The Product ID is allready in use");
            }

            Weight();
            return(valid);
        } //Lägger till ny CubeoidBox på vald plats
        } //Lägger till en ny CubeBox på första lediga plats enligt satta regler

        public bool AutoAddNewCubeoidBox(int iD, uint weight, bool isFragile, int insurance, decimal xSide, decimal ySide, decimal zSide, out string result)
        {
            bool valid = false;

            BoxCreator boxCreator = null; //skapar en ny låda med in parametrarna

            boxCreator = new CubeoidBoxCreator(iD, weight, isFragile, insurance, xSide, ySide, zSide);
            I3DStorageObject boxes = boxCreator.CreateBox();

            Weight();
            for (int i = 0; i < wareHouseLocation.GetLength(0); i++)
            {
                for (int j = 0; j < wareHouseLocation.GetLength(1); j++)
                {
                    if (!iDDic.ContainsKey(iD))                                                                                                                                                       //kollar så att det id man skickar in inte redans finns i lagret
                    {
                        if ((wareHouseLocation[i, j].CurrentWeigth + weight <= wareHouseLocation[i, j].MaxWeight) & (stackWeight[j] + boxes.Weight <= 2000))                                          //Kollar så att lådan int får totalvikten eller vånings "stacken" att överskridas"
                        {
                            if (wareHouseLocation[i, j].CurrentVolume + boxes.Volume <= wareHouseLocation[i, j].MaxVolume)                                                                            //kollar så att lådans volym får plats på hyllan
                            {
                                if (boxes.MaxDimension <= wareHouseLocation[i, j].Width ^ boxes.MaxDimension <= wareHouseLocation[i, j].Depth ^ boxes.MaxDimension <= wareHouseLocation[i, j].Height) //kollar så att lådans största sida får plats på hyllan
                                {
                                    if (boxes.IsFragile == false & wareHouseLocation[i, j].ContainsFragile == false)                                                                                  //om lådan inte är fragile och det inte redan finns en fragile låda på hyllan
                                    {
                                        wareHouseLocation[i, j].AddNewBox(boxes);                                                                                                                     //lådan läggs till i hyllan (listan)
                                        iDDic.Add(iD, 1);                                                                                                                                             //lådans ID sparas i dictionaryn
                                        result = $"{boxes.ID} was added on floor {+1}, shelf {j + 1}";                                                                                                //en string skickas tillbaka med information om vart den lagrades
                                        return(valid);                                                                                                                                                //retunerar true om det gick
                                    }
                                    if (boxes.IsFragile == true & wareHouseLocation[i, j].Lshelf.Count < 1 & wareHouseLocation[i, j].ContainsFragile == false)                                        //om lådan är fragile och hyllan är tom och hyllan inte redan har en fragile
                                    {
                                        wareHouseLocation[i, j].AddNewBox(boxes);                                                                                                                     //lådan läggs till i hyllan (listan)
                                        iDDic.Add(iD, 1);                                                                                                                                             //lådans ID sparas i dictionaryn
                                        result = $"{boxes.ID} was added on floor {+1}, shelf {j + 1}";                                                                                                //en string skickas tillbaka med information om vart den lagrades
                                        return(valid);                                                                                                                                                //retunerar true om det gick
                                    }
                                }
                            }
                        }
                    }
                }
            }
            result = "The box could not be added to Santa's WorkShop"; //om det inte gick att lägga till lådan retuneras denna string
            return(valid);                                             //retunerar false om det inte gick
        } //Lägger till en ny Cubeoid på första lediga plats enligt satta regler