예제 #1
0
 private void cbbLocal_Load()
 {
     cbbLocal.DataSource    = DiaDiemDL.All();
     cbbLocal.DisplayMember = "TenDD";
     cbbLocal.ValueMember   = "ID";
     cbbLocal.SelectedIndex = 0;
 }
예제 #2
0
        private void btnNewLocal_Click(object sender, EventArgs e)
        {
            Localfrm frm = new Localfrm();

            frm.ShowDialog();
            if (frm.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                cbbLocal_Load(DiaDiemDL.All());
            }
        }
예제 #3
0
파일: Localsfrm.cs 프로젝트: thaimoc/ETour
        private void Localsfrm_Load(object sender, EventArgs e)
        {
            grbManager.Visible = false;
            if (Powers == PowersLog.Administrator || Powers == PowersLog.Designer)
            {
                grbManager.Visible = true;
            }

            cbbColumn_Load();
            lvLocals_Load(DiaDiemDL.All());
        }
예제 #4
0
파일: Localsfrm.cs 프로젝트: thaimoc/ETour
        private void itemAdd_ItemClick(object sender, DevExpress.XtraEditors.TileItemEventArgs e)
        {
            Localfrm frm = new Localfrm();

            frm.ShowDialog();
            if (frm.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                lvLocals_Load(DiaDiemDL.All());
                cbbCounty.DataSource = DiaDiemDL.AllCountries();
            }
        }
예제 #5
0
        private void bntNewScenic_Click(object sender, EventArgs e)
        {
            Scenicfrm frm = new Scenicfrm();

            frm.ShowDialog();
            if (frm.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                int i = cbbLocal.SelectedIndex;
                cbbLocal_Load(DiaDiemDL.All());
                cbbLocal.SelectedIndex = i;
            }
        }
예제 #6
0
파일: Localsfrm.cs 프로젝트: thaimoc/ETour
 private void itemUpdate_ItemClick(object sender, DevExpress.XtraEditors.TileItemEventArgs e)
 {
     if (lvLocals.SelectedItems.Count > 0)
     {
         Localfrm frm = new Localfrm();
         frm.Code = MyConvert.ToInt32(lvLocals.SelectedItems[0].SubItems[0].Text);
         frm.ShowDialog();
         if (frm.DialogResult == System.Windows.Forms.DialogResult.OK)
         {
             lvLocals_Load(DiaDiemDL.All());
             cbbCounty.DataSource = DiaDiemDL.AllCountries();
         }
     }
 }
예제 #7
0
 private void Tourfrm_Load(object sender, EventArgs e)
 {
     tvtours_Load(Tour.All());
     listDes    = new List <DiemDen>();
     listScenic = new List <DiemDL>();
     cbbLocal_Load(DiaDiemDL.All());
     cbbSupplier_Load(NCCPTien.All());
     cbbStatus.SelectedIndex = 0;
     if (_ID != 0)
     {
         btnUpdateTour.Enabled = true;
         Controls_LoadUp();
     }
 }
예제 #8
0
        private void Controls_LoadUp()
        {
            Tour t = Tour.Single(_ID);

            txtCode.Text       = t.ID.ToString();
            txtName.Text       = t.TenTour;
            txtStartPlace.Text = t.XuatPhat;
            int i = 0;

            foreach (var item in cbbStatus.Items)
            {
                if (item.ToString() == t.TrangThai)
                {
                    cbbStatus.SelectedIndex = i;
                    break;
                }
                i++;
            }
            btnAddTour.Enabled    = false;
            btnUpdateTour.Enabled = true;
            //btnDeleteTour.Enabled = true;

            //
            listScenic = new List <DiemDL>();
            listDes    = DiemDen.FindByMTour(ID);
            lvDestination.Items.Clear();
            foreach (DiemDen j in listDes)
            {
                ListViewItem item = lvDestination.Items.Add(j.TenDD);
                item.SubItems.Add(j.TenDiem);
                item.SubItems.Add(j.TenKS);
                item.SubItems.Add(j.TenPT);
                item.SubItems.Add(j.TenNCC);
                listScenic.Add(DiemDL.Single(j.MDiemDL));
            }
            cbbLocal_Load(DiaDiemDL.All());
            cbbLocal.SelectedIndex = 0;
            cbbHotel.Items.Clear();
            cbbHotel.Text = "";
            tvHotel.Nodes.Clear();
        }
예제 #9
0
파일: Localsfrm.cs 프로젝트: thaimoc/ETour
 private void btnAll_Click(object sender, EventArgs e)
 {
     lvLocals_Load(DiaDiemDL.All());
 }