public void set(TOUR t) { tour = t; textBox1.Text = t.TENTOUR; richTextBox1.Text = t.DACDIEM; textBox4.Text = t.GIATOUR.ToString(); textBox3.Text = t.LOAIHINH; gia = QLTOUR_BUS.loadg(t.ID); idcu = gia.Where(s => s.current == true).FirstOrDefault().ID; gridControl2.DataSource = gia; }
public void set(TOUR t) { textBox1.Text = t.TENTOUR; richTextBox1.Text = t.DACDIEM; textBox4.Text = t.GIATOUR.ToString(); textBox3.Text = t.LOAIHINH; List <DIADIEM> dd = QLTOUR_BUS.load(t.ID); List <CTDD> ctdd = new List <CTDD>(); foreach (var x in dd) { CTDD ct = new CTDD(); ct = x.CTDD; ctdd.Add(ct); } List <GIATOUR> gia = QLTOUR_BUS.loadg(t.ID); gridControl1.DataSource = ctdd; gridControl2.DataSource = gia; }