private void LoadNoiDungPhim() { if (!string.IsNullOrEmpty(Request.QueryString["MaPhim"])) { List <Phim> dsp = new List <Phim>(); Phim phim = new Phim(); phim.MaPhim = Int32.Parse(Request.QueryString["MaPhim"]); p = phimbll.HienThiTheoMaPhim(phim); dsp.Add(p); frmviwNoiDungPhim.Controls.Clear(); if (dsp.Count > 0) { frmviwNoiDungPhim.DataSource = dsp; frmviwNoiDungPhim.DataBind(); if (p.TheLoai.Contains(",")) { string[] tmp = p.TheLoai.Split(','); for (int i = 0; i < tmp.Length; i++) { LocTheLoai(tmp[i].Trim()); Label lbltmp = new Label(); if (i != tmp.Length - 1) { lbltmp.Text = " , "; lbltmp.ForeColor = Color.White; ((Table)frmviwNoiDungPhim.FindControl("tblPhim")).Rows[2].Cells[1].Controls.Add(lbltmp); } } } else { LocTheLoai(p.TheLoai.Trim()); } } } if (Session["KiemTra"] != null && !string.IsNullOrEmpty(Request.QueryString["MaPhim"])) { tv.UserName = Session["TenDangNhap"].ToString(); tv.Password = Session["MatKhau"].ToString(); if (phimtheodoibll.PhimTheoDoi_Search(tv, p.MaPhim)) { ((Button)frmviwNoiDungPhim.FindControl("btnTheoDoi")).Text = "Đang Theo Dõi"; ((Button)frmviwNoiDungPhim.FindControl("btnTheoDoi")).Enabled = false; } } }