コード例 #1
0
 public void Login(bool isCustomer, string email, string psw, uxLoginScreen login)
 {
     _LogScreen = login;
     if (!isCustomer) // Admin
     {
         _commandText = "GetAdminLogins";
         int UserId = AccountLogin(email, psw);
         if (UserId != -1) // Valid
         {
             AdminGUI adminGui = new AdminGUI(login);
             adminGui.Show();
             _LogScreen.Hide();
         }
     }
     else if (isCustomer) // Customer
     {
         _commandText = "dbo.GetCustomerLogins";
         int UserId = AccountLogin(email, psw);
         if (UserId != -1)  // valid
         {
             Form1Controller controller = new Form1Controller(UserId);
             uxCustomerUI    customerUI = new uxCustomerUI(controller.Showtimes, controller.History, controller.GetMovieList, controller.GetTheaterList, login);
             controller.UpdateMovies(customerUI.UpdateMovie);
             controller.UpdateTheater(customerUI.UpdateTheater);
             customerUI.Show();
             _LogScreen.Hide();
         }
     }
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: Risingflare/560Theater
 public uxCustomerUI(ShowShowtimeDel showdel, ShowHistoryDel histdel, ShowMoviesDel moviesdel, ShowTheatersDel theatersDel, uxLoginScreen loginScreen)
 {
     showShowtimeHandler = showdel;
     showHistoryHandler  = histdel;
     showMoviesHandler   = moviesdel;
     showTheaterHandler  = theatersDel;
     this.loginScreen    = loginScreen;
     InitializeComponent();
 }
コード例 #3
0
 public AdminGUI(uxLoginScreen login)
 {
     loginScreen = login;
     InitializeComponent();
     movieL          = new List <string>();
     theaterL        = new List <string>();
     locationL       = new List <string>();
     movienames      = new List <string>();
     theaternames    = new List <string>();
     theaterLocation = new List <string>();
     updateMovieTable();
     updateTheaterTable();
     updateShowingTable();
 }
コード例 #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="logdel"></param>
 /// <param name="log"></param>
 public CreateAccount(LoginDel log, uxLoginScreen screen)
 {
     _logdel    = log;
     _logscreen = screen;
     InitializeComponent();
 }