コード例 #1
0
        public void Update()
        {
            foreach (BulkInfo o in BulkInfoList)
            {
                if (o.isDelete)
                {
                    if (!o.isNew)
                    {
                        getGui.DeleteBulkInfo(StaticClass.storeId, ItemNum, o.bulkQuant);
                    }
                }
                else
                {
                    if (o.isNew)
                    {
                        getGui.InsertBulkInfo(ItemNum, StaticClass.storeId, o.bulkPrice.ToString(), o.bulkQuant.ToString());
                    }
                }
            }

            foreach (OnSalesInfo o in OnSaleInfoList)
            {
                if (o.isDelete)
                {
                    if (!o.isNew)
                    {
                        getGui.DeleteOnsaleInfo(StaticClass.storeId, ItemNum, o.saleStart, o.saleEnd);
                    }
                }
                else
                {
                    if (o.isNew)
                    {
                        getGui.InsertOnsaleInfo(ItemNum, StaticClass.storeId, o.saleStart, o.saleEnd, o.percent);
                    }
                }
            }

            foreach (Prices o in PricesList)
            {
                if (o.isDelete)
                {
                    if (!o.isNew)
                    {
                        getGui.DeletePrices(StaticClass.storeId, ItemNum, o.cr1.ToString(), o.cr2.ToString(), o.cr3, o.priceType);
                    }
                }
                else
                {
                    if (o.isNew)
                    {
                        getGui.InsertPrices(ItemNum, StaticClass.storeId, o.price, o.cr1.ToString(), o.cr2.ToString(), o.cr3, o.Enable, o.priceType);
                    }
                }
            }
        }