Example #1
0
        private void toolStripMenuItem9_Click(object sender, EventArgs e)
        {
            travelGuidefrm frm = new travelGuidefrm();

            frm.Powers = this.Powers;
            frm.ShowDialog();
            if (lvTours.SelectedItems.Count > 0)
            {
                int _MaTour = MyConvert.ToInt32(lvTours.SelectedItems[0].SubItems[0].Text);
                lvGuide_Load(HuongDanVien.FindByMTour(_MaTour));
            }
        }
Example #2
0
 private void lvTours_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (lvTours.SelectedItems.Count > 0)
     {
         int _MaTour = MyConvert.ToInt32(lvTours.SelectedItems[0].SubItems[0].Text);
         lvScenics_Load(DiemDL.FindByMTour(_MaTour));
         lvHotels_Load(KhachSan.FindByMTour(_MaTour));
         lvVehicles_Load(PhuongTien.FindByMTour(_MaTour));
         lvGuide_Load(HuongDanVien.FindByMTour(_MaTour));
         btnUpdate.Enabled = true;
         btnDelete.Enabled = true;
     }
     else
     {
         lvGuide.Items.Clear();
         lvHotels.Items.Clear();
         lvScenics.Items.Clear();
         lvVehicles.Items.Clear();
         btnUpdate.Enabled = false;
         btnDelete.Enabled = false;
     }
 }