private void cbbLocal_Load() { cbbLocal.DataSource = DiaDiemDL.All(); cbbLocal.DisplayMember = "TenDD"; cbbLocal.ValueMember = "ID"; cbbLocal.SelectedIndex = 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()); } }
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()); }
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(); } }
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; } }
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(); } } }
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(); } }
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(); }
private void btnAll_Click(object sender, EventArgs e) { lvLocals_Load(DiaDiemDL.All()); }