Esempio n. 1
0
        public RequestItem DeepCopy(RequestItem current)
        {
            RequestItem copied = new RequestItem();

            copied.RequestArticle = current.RequestArticle.DeepCopy(current.RequestArticle);
            copied.Quantity       = current.Quantity;

            return(copied);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("\n\n\nARTICLE");
            Structs.Article commodity1 = new Structs.Article("ak1598", "Red Apples", 4.20F, Structs.Article.ArticleType.Foods);
            Structs.Article commodity2 = new Structs.Article("lu385", "Marine Hat", 14.62F, Structs.Article.ArticleType.Clothes);
            Structs.Article commodity3 = new Structs.Article("g654", "Tea Table", 330F, Structs.Article.ArticleType.Furniture);
            Console.WriteLine(commodity1);
            Console.WriteLine(commodity2);
            Console.WriteLine(commodity3);


            Console.WriteLine("\n\n\nCLIENT");
            Structs.Client client1 = new Structs.Client("214", "Vasya Pupkin", "Forbes ave.,37,7,Sacramento,CA", "(661) 664-2011", 10, 1340);
            Console.WriteLine(client1);


            Console.WriteLine("\n\n\nREQUEST ITEM");
            Structs.RequestItem item1 = new Structs.RequestItem(commodity1, 3);
            Console.WriteLine(item1);



            Console.WriteLine("\n\n\nREQUEST-------------------------------------");

            List <Structs.RequestItem> ItemList1 = new List <Structs.RequestItem>();

            ItemList1.Add(item1);
            ItemList1.Add(new Structs.RequestItem()
            {
                RequestArticle = commodity2, Quantity = 1
            });
            ItemList1.Add(new Structs.RequestItem()
            {
                RequestArticle = commodity3, Quantity = 2
            });

            Structs.Request request1 = new Structs.Request("6534", client1, Structs.Request.PayType.Cash, ItemList1);
            request1.PrintRequest();

            Console.ReadKey();
        }