Пример #1
0
        public WCFItem getItemByID(string id)
        {
            WCFItem wcfItem = new WCFItem();
            Item    i       = itemDAO.getItemByID(id);

            wcfItem = WCFItem.Make(i.itemID, i.categoryID, i.description, i.location, i.unitOfMeasure, i.reorderLevel, i.reorderQty, i.qtyOnHand);
            return(wcfItem);
        }
Пример #2
0
        public List <WCFItem> findItemBySearch(string keyword)
        {
            List <WCFItem> targetItemList = new List <WCFItem>();
            List <Item>    ilist          = itemDAO.getItemBySearch(keyword);

            foreach (Item i in ilist)
            {
                WCFItem wcfItem = WCFItem.Make(i.itemID, i.categoryID, i.description, i.location, i.unitOfMeasure, i.reorderLevel, i.reorderQty, i.qtyOnHand);
                targetItemList.Add(wcfItem);
            }
            return(targetItemList);
        }
Пример #3
0
        public static WCFItem Make(string itemID, string categoryID, string description, string location, string unitOfMeasure, int reorderLevel, int reorderQty, int qtyOnHand)
        {
            WCFItem i = new WCFItem();

            i.itemID        = itemID;
            i.categoryID    = categoryID;
            i.description   = description;
            i.location      = location;
            i.unitOfMeasure = unitOfMeasure;
            i.reorderLevel  = reorderLevel;
            i.reorderQty    = reorderQty;
            i.qtyOnHand     = qtyOnHand;
            return(i);
        }