コード例 #1
0
        //This method is for calling from Search method
        public WCSA_Entity_Classes.Product ReturnSingleItemDetail(string searchCode)
        {
            ProductDataSource sds = new ProductDataSource();

            WCSA_Entity_Classes.Product currentProduct = sds.ReturnAnItem(searchCode);
            if (currentProduct == null)
            {
                return(null);
            }
            else
            {
                return(currentProduct);
            }
        }
コード例 #2
0
        /*
         * Item addition to static list starts here
         */
        public double addItemToInvoice(string productCode, double price, uint quantity, double vat)
        {
            ProductDataSource pds = new ProductDataSource();

            WCSA_Entity_Classes.Product tempP = pds.ReturnAnItem(productCode);
            /////////////////***************************pds.ModifyItemInAccordanceWithInvoice(productCode, quantity);
            purchaseList.Add(new Product(productCode, tempP.ProductName, price * quantity, quantity));

            //Console.WriteLine("price = {0}  ||  quantity = {1}", price, quantity);

            //Update total cost
            totalCost += (price * quantity);
            //Console.WriteLine("totalCost = " + totalCost);

            return(totalCost + ((totalCost * vat) / 100));
        }
コード例 #3
0
        public WCSA_Entity_Classes.Product checkProductDetails(string code)
        {
            ProductDataSource pds = new ProductDataSource();

            return(pds.ReturnAnItem(code));
        }