public List <Rent> LoadRents(string fileName) { string[] lines = LoadFile.GetStrings(LoadFile.CreatePath(fileName), SEPARATOR); List <Rent> rents = new List <Rent>(); foreach (var line in lines) { rents.Add(CreateModels.CreateRent(line)); } return(rents); }
public static void Start() { Dictionary <string, int> orders = new Dictionary <string, int>(); string path = LoadFile.CreatePath(ORDERS_PATH); var details = LoadFile.GetStrings(path, SEPARATOR); FillDictionary(ref orders, details); Console.WriteLine("Detail orders: "); PrintOrders(orders); }
public List <Vehicle> LoadVehicles(string fileName) { string[] lines = LoadFile.GetStrings(LoadFile.CreatePath(fileName), SEPARATOR); List <Vehicle> vehicles = new List <Vehicle>(); foreach (var line in lines) { vehicles.Add(CreateModels.CreateVehicle(line, Types, Rents)); } return(vehicles); }