Exemplo n.º 1
0
        public string GetInventoryListGroup(string InputValue)
        {
            ServiceREF.InventoryService.InventoryService service = new ServiceREF.InventoryService.InventoryService();
            ServiceREF.InventoryService.CItemGroup       iItem   = service.GetInventoryItemGroup(InputValue);
            StringBuilder ret = new StringBuilder();

            ret.Append("{");
            ret.AppendFormat("ID:'{0}',\n", iItem.ID);
            ret.AppendFormat("Code:'{0}',\n", iItem.Code);
            ret.AppendFormat("Name:'{0}',\n", iItem.Name);
            ret.AppendFormat("Active:'{0}',\n", iItem.Active);
            ret.AppendFormat("Description:'{0}'\n", iItem.Description);
            ret.Append("}");
            return(ret.ToString());
        }
Exemplo n.º 2
0
        public string GetItem(string funcPara, string instant)
        {
            string InputValue = CXmlPara.CreatePara(funcPara);

            switch (instant)
            {
            case "Customer":
                ServiceREF.CustomerService.CCustomerGroup customer = customerService.GetCustomerGroup(InputValue);
                return(CJson.SerializeObject(customer));

            case "Product":
                ServiceREF.InventoryService.CItemGroup product = inventoryService.GetInventoryItemGroup(InputValue);
                return(CJson.SerializeObject(product));

            case "Vendor":
                ServiceREF.VendorService.CVendorGroup vendor = vendorService.GetVendorGroup(InputValue);
                return(CJson.SerializeObject(vendor));
            }
            return("[{}]");
        }