예제 #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();
        }
예제 #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();
        }
예제 #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();
        }
예제 #5
0
 static void Main(string[] args)
 {
     CLI.MainMenu();
 }