Exemplo n.º 1
0
        private void infomationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DataAccess.dt = new DataSetFILM.TbPhimDataTable();
            DataTable dtInfo = DataAccess.dataGetAll(
                string.Format("SELECT * from TbPhim where MaPhim= {0}", metroGrid_MM.SelectedRows[0].Cells[0].Value));

            byte[] InfoTb = (byte[])dtInfo.Rows[0][7];

            MemoryStream ms        = new MemoryStream(InfoTb);
            Image        ImageInfo = Image.FromStream(ms);

            pnlAddMovie MovieInfo = new pnlAddMovie(
                Convert.ToInt32(dtInfo.Rows[0][0]),
                dtInfo.Rows[0][1].ToString(),
                dtInfo.Rows[0][2].ToString(),
                dtInfo.Rows[0][3].ToString(),
                dtInfo.Rows[0][4].ToString(),
                (DateTime)dtInfo.Rows[0][5],
                dtInfo.Rows[0][6].ToString(),
                ImageInfo,
                main);

            main.Controls.Add(MovieInfo);
            MovieInfo.BringToFront();
        }
Exemplo n.º 2
0
        private void button_Addmovie_Click(object sender, EventArgs e)
        {
            pnlAddMovie pnlAM = new pnlAddMovie(main);

            main.Controls.Add(pnlAM);
            pnlAM.BringToFront();
        }