コード例 #1
0
        public void createSupplyForTest1()
        {
            supply.WarehouseId     = 2;
            supply.StatusId        = 1;
            supply.ApplicationDate = DateTime.Now;
            supply.ApplicantId     = 3;
            supply.DeliveryDate    = DateTime.Now;
            supply.ProviderId      = 2;

            BLL.BusinessModels.SupplyLine firstLine = new BLL.BusinessModels.SupplyLine();
            firstLine.CommodityName = "Chabacco";
            firstLine.CommodityId   = 7;
            firstLine.CommodityType = "Табак";
            firstLine.Quantity      = 5;
            firstLine.Cost          = 320;
            firstLine.SupplyId      = 1;
            lines.Add(firstLine);

            BLL.BusinessModels.SupplyLine secondLine = new BLL.BusinessModels.SupplyLine();
            secondLine.CommodityName = "BlackBurn";
            secondLine.CommodityId   = 8;
            secondLine.CommodityType = "Табак";
            secondLine.Quantity      = 4;
            secondLine.Cost          = 270;
            secondLine.SupplyId      = 1;
            lines.Add(secondLine);

            BLL.BusinessModels.SupplyLine thirdLine = new BLL.BusinessModels.SupplyLine();
            thirdLine.CommodityName = "Duft";
            thirdLine.CommodityId   = 10;
            thirdLine.CommodityType = "Табак";
            thirdLine.Quantity      = 1;
            thirdLine.Cost          = 380;
            thirdLine.SupplyId      = 1;
            lines.Add(thirdLine);

            supply.Lines = lines;
            foreach (BLL.BusinessModels.SupplyLine innerLine in lines)
            {
                supply.Cost += innerLine.Cost * innerLine.Quantity;
            }
        }
コード例 #2
0
        public void createSupplyForTests234()
        {
            supply.WarehouseId     = 2;
            supply.StatusId        = 1;
            supply.ApplicationDate = DateTime.Now;
            supply.ApplicantId     = 3;
            supply.DeliveryDate    = DateTime.Now;
            supply.ProviderId      = 2;

            BLL.BusinessModels.SupplyLine firstLine = new BLL.BusinessModels.SupplyLine();
            firstLine.CommodityName = "SarkoZy";
            firstLine.CommodityId   = 25;
            firstLine.CommodityType = "Табак";
            firstLine.Quantity      = 5;
            firstLine.Cost          = 500;
            firstLine.SupplyId      = 1;
            lines.Add(firstLine);

            supply.Lines = lines;
            foreach (BLL.BusinessModels.SupplyLine innerLine in lines)
            {
                supply.Cost += innerLine.Cost * innerLine.Quantity;
            }
        }