Esempio n. 1
0
        public Form1(int islog1, string ID)
        {
            movie      = new MovieList();
            ticketlist = new TicketList();
            member     = new MemberVo();

            islogin1 = islog1;
            InitializeComponent();
            Initialization();
            connectionForm1 = new MySqlConnection("Server=localhost;Port=3306;Database=movie;Uid=root;Pwd=1111");
            connectionForm1.Open();
            id           = ID;
            member.Id    = id;
            ID_text.Text = id + "님";

            if (islogin1 == 1)
            {
                login_btn.Visible = false;
                out_btn.Visible   = true;
            }
            else
            {
                login_btn.Visible = true;
                out_btn.Visible   = false;
            }
        }
Esempio n. 2
0
        public Seat(Ticket ticket, String ID)
        {
            this.ticket = ticket;
            ticketlist  = this.ticket.ticketlist;
            member      = this.ticket.member;

            id = ID;

            InitializeComponent();

            seat_panel.Enabled = false;

            connectionSeat = this.ticket.connectionTicket;
            string query = "SELECT seat FROM movie.ticket WHERE title = '" + ticketlist.Title + "' AND date = '" + ticketlist.Date + "' AND time = '" + ticketlist.Time + "'";

            cmd      = new MySqlCommand(query, connectionSeat);
            rdr      = cmd.ExecuteReader();
            seatList = new ArrayList();
            while (rdr.Read())
            {
                string temp = rdr[0].ToString();
                piece = temp.Split(new char[] { ',' });
                for (int i = 0; i < piece.Length; i++)
                {
                    MessageBox.Show(piece[i]);
                }
            }
            rdr.Close();

            /*      for (int i = 0; i < piece.Length; i++)
             *  {
             *      var checkBox = this.Controls.Find(piece[i].ToString(), true).FirstOrDefault() as CheckBox;
             *      if (checkBox != null)
             *      {
             *          checkBox.Checked = true;
             *          checkBox.Enabled = false;
             *      }
             *
             *     // CheckBox boxes = Controls.Find(piece[i], true).ElementAtOrDefault<Controls>;
             *  }
             */
        }
Esempio n. 3
0
        public Ticket(Form1 form1, String ID)
        {
            InitializeComponent();

            this.form1 = form1;
            movie      = this.form1.movie;
            ticketlist = this.form1.ticketlist;
            member     = this.form1.member;

            connectionTicket = this.form1.connectionForm1;

            title = movie.Title;
            id    = ID;

            // movie_image.Image = new Bitmap("Movie.Properties." + title + ".jpg");
            movie_image.Load(@"C:\Users\KB\Documents\Git\KB_codings\Inho\C#\Movie\Movie\Properties\" + title + ".jpg");
            movie_image.SizeMode = PictureBoxSizeMode.StretchImage;
            movie_title.Text     = title;
            movie_date.Value     = DateTime.Today;
        }