Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            // Forces DateTime to create objects in yyyy/MM/dd format (our SQL db uses this format)
            CultureInfo ci = new CultureInfo(CultureInfo.CurrentCulture.Name);

            ci.DateTimeFormat.ShortDatePattern = "yyyy'/'MM'/'dd";

            Thread.CurrentThread.CurrentCulture   = ci;
            Thread.CurrentThread.CurrentUICulture = ci;

            CLI cli = new CLI();

            cli.RunCLI();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            // Get the connection string from the appsettings.json file
            IConfigurationBuilder builder = new ConfigurationBuilder()
                                            .SetBasePath(Directory.GetCurrentDirectory())
                                            .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
            IConfigurationRoot configuration = builder.Build();


            string   connectionString = configuration.GetConnectionString("Project");
            IDAO     DAO     = new DbDAO(connectionString);
            ParkIDAO parkDAO = new ParkDAO(connectionString);

            CLI cli = new CLI(DAO, parkDAO);

            cli.ShowMain();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            // Get the connection string from the appsettings.json file
            IConfigurationBuilder builder = new ConfigurationBuilder()
                                            .SetBasePath(Directory.GetCurrentDirectory())
                                            .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);

            IConfigurationRoot configuration = builder.Build();

            string connectionString = configuration.GetConnectionString("Project");

            IParkDAO        parkDAO        = new ParkSqlDAO(connectionString);
            ICampgroundDAO  campgroundDAO  = new CampgroundSqlDAO(connectionString);
            ISiteDAO        siteDAO        = new SiteSqlDAO(connectionString);
            IReservationDAO reservationDAO = new ReservationSqlDAO(connectionString);
            ISearchDAO      searchDAO      = new SearchSqlDAO(connectionString);

            CLI cLI = new CLI(parkDAO, campgroundDAO, siteDAO, reservationDAO, searchDAO);

            cLI.MainMenu();
        }
        static void Main(string[] args)
        {
            CLI cli = new CLI();

            cli.Run();
        }
Ejemplo n.º 5
0
 static void Main(string[] args)
 {
     CLI.MainMenu();
 }