Пример #1
0
        public void DisplayAfterDeletion3(int num1, int num2)
        {
            try
            {
                ProductDetailsFill objProductDetailsFill = new ProductDetailsFill();

                List <ProductGroup> objListProductGroup = objProductDetailsFill.ProductGroupFill();
                List <ProductInfo>  objListproductInfo  = objProductDetailsFill.ProductFill();

                List <ProductInfo> objProductDelete3 = objProductDetailsFill.ProductDelete3(objListproductInfo, num1, num2);

                foreach (ProductGroup product1 in objListProductGroup)
                {
                    foreach (ProductInfo product2 in objProductDelete3)
                    {
                        if (product1.ProductGroupID == product2.GroupID)
                        {
                            Console.WriteLine("Product Group Name: " + product1.ProductGroupName + " || Product Name: " + product2.ProductName + " || Product Description: " + product2.ProductDescription + " || Product Rate: " + product2.ProductRate);
                        }
                    }
                }
            }

            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Пример #2
0
        public void DisplayAfterDeletion3(int st, int end)
        {
            try
            {
                FindIndex          objectFindIndex          = new FindIndex();
                ProductDetailsFill objectProductDetailsFill = new ProductDetailsFill();

                List <ProductGroup> productGroup = objectProductDetailsFill.ProductGroupFill();
                List <ProductInfo>  productInfo  = objectProductDetailsFill.ProductFill();

                List <ProductInfo> productNew = objectProductDetailsFill.ProductDelete3(productInfo, st, end);

                foreach (ProductGroup item1 in productGroup)
                {
                    foreach (ProductInfo item2 in productNew)
                    {
                        if (item1.ID == item2.GroupID)
                        {
                            Console.WriteLine("Index: " + (objectFindIndex.Find(item2.Name)) + " || Product Group Name: " + item1.Name + " || Product Name: " + item2.Name + " || Product Description: " + item2.Description + " || Product Rate: " + item2.rate);
                        }
                    }
                }
            }catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
        }