コード例 #1
0
 private void lvScenics_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (lvScenics.SelectedItems.Count > 0)
     {
         lvHotels_Load(KhachSan.FindMDiemDL(MyConvert.ToInt32(lvScenics.SelectedItems[0].SubItems[0].Text)));
         lvTours_Load(Tour.FindByCodeScenic(MyConvert.ToInt32(lvScenics.SelectedItems[0].SubItems[0].Text)));
     }
     else
     {
         lvHotels.Items.Clear();
         lvTours.Items.Clear();
     }
 }
コード例 #2
0
 private void cbbScenic_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cbbScenic.SelectedIndex >= 0)
     {
         DiemDL dl = cbbScenic.SelectedItem as DiemDL;
         cbbHotel_Load(KhachSan.FindMDiemDL(dl.ID));
         tvScenic_Load(dl);
     }
     else
     {
         cbbHotel.Items.Clear();
     }
     cbbHotel.Text = "";
     tvHotel.Nodes.Clear();
     btnAddDes.Enabled = false;
 }