private void InitBindGrid()
        {
            List <ReorderItem> list = new List <ReorderItem>();

            list = itemDAO.findItemList();

            ReorderItem item = new ReorderItem();

            for (int i = list.Count - 1; i >= 0; i--)
            {
                item = list[i];
                if (item.ReorderLevel <= item.QtyOnHand)
                {
                    list.RemoveAt(i);
                }
            }

            Session["reorderList"] = list;

            GridView_reorderList.DataSource = list;
            GridView_reorderList.DataBind();
        }
示例#2
0
    public ReorderItem AddPurchaseItem(String itemCode)
    {
        Item        item         = EFBroker_Item.GetActiveItembyItemCode(itemCode);
        ReorderItem purchaseItem = new ReorderItem
        {
            ItemCode      = item.ItemCode,
            Description   = item.Description,
            ReorderQty    = item.ReorderQty,
            ReorderLevel  = item.ReorderLevel,
            UnitOfMeasure = item.UnitOfMeasure,
        };

        if (item.BalanceQty == null || item.BalanceQty == 0)
        {
            purchaseItem.Balance = 0;
        }
        else
        {
            purchaseItem.Balance = item.BalanceQty;
        }
        return(purchaseItem);
    }