Ejemplo n.º 1
0
		private void attach_BinhLuans(BinhLuan entity)
		{
			this.SendPropertyChanging();
			entity.Phim = this;
		}
Ejemplo n.º 2
0
		private void detach_BinhLuans(BinhLuan entity)
		{
			this.SendPropertyChanging();
			entity.Phim = null;
		}
Ejemplo n.º 3
0
 partial void DeleteBinhLuan(BinhLuan instance);
Ejemplo n.º 4
0
 partial void UpdateBinhLuan(BinhLuan instance);
Ejemplo n.º 5
0
 partial void InsertBinhLuan(BinhLuan instance);
Ejemplo n.º 6
0
		private void detach_BinhLuans(BinhLuan entity)
		{
			this.SendPropertyChanging();
			entity.DanhMucTinhTrangBinhLuan = null;
		}
Ejemplo n.º 7
0
        protected void Xl_ThemBinhLuan_Click(object sender, EventArgs e)
        {
            try
            {
                CinemaLINQDataContext dt = new CinemaLINQDataContext();

                BinhLuan bl = new BinhLuan();
                bl.MaPhim = ((Phim)Session["CurrentPhim"]).MaPhim;
                bl.NoiDungBinhLuan = Th_BinhLuanMoi.Text;
                bl.MaNguoiDung = ((NguoiDung)Session["NguoiDung"]).MaNguoiDung;
                bl.TinhTrang = dt.DanhMucTinhTrangBinhLuans.Where(ttbl => ttbl.TenTinhTrang.CompareTo("Bình thường")==0).Select(ttbl => ttbl.MaTinhTrang).Single();
                bl.ThoiGianBinhLuan = DateTime.Now;
                dt.BinhLuans.InsertOnSubmit(bl);

                dt.SubmitChanges();

                Th_BinhLuanMoi.Text = "";
                //Response.Redirect("/phim/chitietphim.aspx");
            }
            catch
            {
                //Response.Redirect("/phim/chitietphim.aspx");
            }
        }