private void controls_LoadUp() { KhachSan ks = KhachSan.Single(Code); txtCode.Text = ks.ID.ToString(); txtName.Text = ks.TenKS; txtStartNumber.Text = ks.SoSao.ToString(); txtPhone.Text = ks.SoDienThoai; txtAddress.Text = ks.DiaChi; clbclbright_Load(DiemDL.FindByMaKS(Code)); clbleft_Load(DiemDL.FindByNotMaKS(Code)); }
private void lvHotels_SelectedIndexChanged(object sender, EventArgs e) { if (lvHotels.SelectedItems.Count > 0) { lvScenics_Load(DiemDL.FindByMaKS(MyConvert.ToInt32(lvHotels.SelectedItems[0].SubItems[0].Text))); lvTours_Load(Tour.FindByMKSan(MyConvert.ToInt32(lvHotels.SelectedItems[0].SubItems[0].Text))); } else { lvTours.Items.Clear(); lvScenics.Items.Clear(); } }