public void Test_ReadingFromFile()
        {
            ClientsDB clientsInfo = new ClientsDB("../../Clients.txt");

            clientsInfo.ReadFromFile();
            DriversDB driversInfo = new DriversDB("../../Drivers.txt");

            driversInfo.ReadFromFile();
            OrdersDB ordersInfo = new OrdersDB("../../Orders.txt", clientsInfo, driversInfo);

            ordersInfo.ReadFromFile();
            Assert.AreEqual(ordersInfo.AllOrders.Count, 8);
        }
Example #2
0
        private void startWork_Click(object sender, RoutedEventArgs e)
        {
            currentDriver = driversInfo.FindDriver(driverSurName.Text, driverUserName.Text);
            driverInfoSurnameNameDetails.Content = currentDriver.Surname + " " + currentDriver.Name;
            driverInfoAgeDetails.Content         = currentDriver.Age;
            driverInfoCarDetails.Content         = currentDriver.CarNumber;
            driverInfoExpDetails.Content         = currentDriver.Experience;
            driverInfoCostDetails.Content        = currentDriver.PayCheck + " грн";
            driverInfoCostPerMinDetails.Content  = currentDriver.CostPerMinute;

            ordersInfo = new OrdersDB("../../InputData/OrdersData.txt", clientsInfo, driversInfo);
            ordersInfo.ReadFromFile();
            ShowOrdersInListView();
        }