예제 #1
0
        public HttpResponseMessage ListShows()
        {
            var repo   = new ShowRepo();
            var result = repo.GetShows();

            return(Request.CreateListRecordResponse(result));
        }
예제 #2
0
 public Controller(ShowRepo sr, TicketRepo tr, UserRepo ur)
 {
     cstring       = "Data Source=(localdb)\\Projects;Initial Catalog=ShowManagement;Integrated Security=SSPI;";
     sqlConnection = new SqlConnection(cstring);
     sRepo         = sr;
     tRepo         = tr;
     uRepo         = ur;
     this.readShows();
     this.readTickets();
     this.readUsers();
 }
예제 #3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ShowRepo   sr = new ShowRepo();
            UserRepo   ur = new UserRepo();
            TicketRepo tr = new TicketRepo();

            Controller cont = new Controller(sr, tr, ur);

            Application.Run(new Form1(cont));
        }