Exemple #1
0
 public Car(ProducerNames producer, TypeCar type, double days, double price)
 {
     this.Producer           = producer;
     this.Type               = type;
     this.DaysToWaitDelivery = days;
     this.Price              = price;
 }
Exemple #2
0
 public Order(Customer client, Car car, DateTime date, ProducerNames prod, double days)
 {
     this.Client       = client;
     this.Car          = car;
     this.Producer     = prod;
     this.CommandDate  = date;
     this.DeliveryDate = date.AddDays(days);
 }
Exemple #3
0
        public Producer SearchProducerType(ProducerNames _prod)
        {
            Producer prod = new Producer();

            foreach (var item in this.producersList)
            {
                if (item.Name == _prod)
                {
                    prod.ProducerId = item.ProducerId;

                    break;
                }
                else
                {
                    Console.WriteLine("Masina nu a fost gasita");
                }
            }
            return(prod);
        }
Exemple #4
0
        public Order MakeNewOrder(Person persoana, TypeCar _carType, ProducerNames producer)
        {
            Car      newCar    = this.SearchCarType(_carType);
            Customer newClient = new Customer(persoana, "0324123212");

            if (SearchCustomer(newClient) == false)
            {
                newClient.IdCustomer = this.GiveCustomerId();
                customersList.Add(newClient);
            }

            Order newOrder = new Order(newClient, newCar, DateTime.Now, producer, this.DaysToDelivery);

            newOrder.IdOrder = GiveOrderId();
            Console.WriteLine("Comanda a fost inregistrata");
            Console.WriteLine(newOrder.ToString());
            Console.WriteLine(newCar.ToString());
            this.AddOrder(newOrder);
            return(newOrder);
        }
 public Producer(ProducerNames name)
 {
     this.Name = name;
 }