private void cbbMaDoan_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                int maDoan = int.Parse(cbbMaDoan.Text);
                int maTour = int.Parse(cbbMaTour.Text);
                if (maDoan != -1)
                {
                    DataTable infoDoan = doan.getInfoDoan(maDoan);
                    tbTenDoan.Text = infoDoan.Rows[0]["TenDoan"].ToString();

                    DataTable infoTour = tour.getInfoLoaiTour(maTour);
                    tbLoaiTour.Text = infoTour.Rows[0]["LoaiTour"].ToString();
                }
                else
                {
                    tbTenDoan.Text = "";
                }
            } catch (Exception) { }
        }
Esempio n. 2
0
        private void cbbMaDoan_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                int       maDoan = int.Parse(cbbMaDoan.Text);
                DataTable tbDoan = doan.getInfoDoan(maDoan);
                cbbMaTour.Text = tbDoan.Rows[0]["MaTour"].ToString();
                tbTenDoan.Text = tbDoan.Rows[0]["TenDoan"].ToString();
                dtGioDi.Text   = tbDoan.Rows[0]["GioDi"].ToString();
                dtGioVe.Text   = tbDoan.Rows[0]["GioVe"].ToString();

                tbKh             = doan.getKhachHang(maDoan);
                dgvKH.DataSource = tbKh;

                tbNV             = doan.getNVTD(maDoan);
                dgvNV.DataSource = tbNV;

                tbCp = doan.getChiPhi(maDoan);
                dgvChiPhi.DataSource = tbCp;
            }
            catch (Exception) { }
        }