コード例 #1
0
        public string StockOutUpdate(StockOut stock)
        {
            Item model = new Item();

            model           = stockIOutGateway.GetItemInfo(stock.ItemName);
            stock.ItemId    = model.Sl;
            stock.CompanyId = model.CompanyName;

            int available = model.AvailableQuantity;

            available = available - stock.StockOutQuantity;
            model.AvailableQuantity = available;
            int rowAffect = stockIOutGateway.StockOutSave(stock);

            stockIOutGateway.StockUpdate(available, model.Sl);

            if (rowAffect > 0)
            {
                return("Stock Update");
            }
            else
            {
                return("! Faild");
            }
        }
コード例 #2
0
ファイル: StockOutManager.cs プロジェクト: me-raj/stockdb
        public string StockOutUpdate(StockOut stock)
        {
            Item item = new Item();

            item            = stockOutGateway.GetItemInfo(stock.ItemName);
            stock.ItemId    = item.Sl;
            stock.CompanyId = item.CompanyName;

            int available = item.AvailableQuantity;

            available = available - stock.StockOutQuantity;
            item.AvailableQuantity = available;
            int rowAffect = stockOutGateway.StockOutSave(stock);

            stockOutGateway.StockUpdate(available, item.Sl);

            if (available > 0)
            {
                return("Stock Update");
            }
            else
            {
                return("Stock Update Failed");
            }
        }