Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Client first_client = new Client("Самцевич Алексей");

            Waybill first_waybill = new Waybill("Накладная 1", new DateTime(2020, 11, 05), first_client, new Organization("111"), 7800);
            Receipt first_receipt = new Receipt("Квитанция 1", new DateTime(2020, 11, 05), first_client, new Organization("222"), 650);
            Check   first_check   = new Check("Чек 1", new DateTime(2019, 11, 05), first_client, new Organization("333"), 150);
            Check   second_check  = new Check("Чек 2", new DateTime(2019, 11, 05), first_client, new Organization("444"), 10);

            Waybill second_waybill = new Waybill("Накладная 2", new DateTime(2016, 06, 12), first_client, new Organization("555"), 1200);
            Waybill third_waybill  = new Waybill("Накладная 3", new DateTime(2015, 04, 01), first_client, new Organization("666"), 800);
            Waybill fours_waybill  = new Waybill("Накладная 4", new DateTime(2020, 07, 12), first_client, new Organization("777"), 1200);

            Summa summa = new Summa();

            summa.AddWaybill(first_waybill);
            summa.AddReceipt(first_receipt);
            summa.AddCheck(first_check);
            summa.AddCheck(second_check);

            summa.AddWaybill(second_waybill);
            summa.AddWaybill(third_waybill);
            summa.AddWaybill(fours_waybill);

            summa.ShowList();

            Console.WriteLine("\n" + "Суммарную стоимость продукции заданного наименования по всем накладным = {0}", summa.GetWaybillPrice("Накладная 1"));
            Console.WriteLine(summa.GetCheckCount());
            summa.GetTime(new DateTime(2019, 01, 01), new DateTime(2021, 01, 01));


            //Console.WriteLine(first_waybill);
        }
Ejemplo n.º 2
0
 public void Get(Summa lis, DateTime firstDate, DateTime lastDate)
 {
     lis.GetTime(firstDate, lastDate);
 }
Ejemplo n.º 3
0
 public int Price(Summa lis, string name)
 {
     int a = lis.GetWaybillPrice(name); return(a);
 }
Ejemplo n.º 4
0
 public int Count(Summa lis)
 {
     int a = lis.GetCheckCount(); return(a);
 }
Ejemplo n.º 5
0
 public void Show(Summa lis)
 {
     lis.ShowList();
 }