private void BindAward() { string award = (cbxAward.SelectedItem == null) ? String.Empty : cbxAward.SelectedItem.ToString(); cbxAward.DataSource = awardDal.GetAllAwards(); if (cbxAward.Items.Contains(award)) { cbxAward.SelectedItem = award; } awordRecords = awardDal.GetAllAwards(true); }
/// <summary> /// </summary> private void BindAward() { string award = (cbxAward.SelectedItem == null) ? "Tất cả" : cbxAward.SelectedItem.ToString(); cbxAward.Items.Clear(); cbxAward.Items.Add("Tất cả"); List <string> awards = awardDal.GetAllAwards(); foreach (string item in awards) { cbxAward.Items.Add(item); } if (cbxAward.Items.Contains(award)) { cbxAward.SelectedItem = award; } else { cbxAward.SelectedIndex = 0; } }
private void BindAward() { dgvDetail.DataSource = detailDal.GetAllDetail(); string award = (drbId_award.SelectedItem == null) ? "Tất cả" : drbId_award.SelectedItem.ToString(); drbId_award.Items.Clear(); drbId_award.Items.Add("Tất cả"); List <string> awards = awardDal.GetAllAwards(); foreach (string item in awards) { drbId_award.Items.Add(item); } if (drbId_award.Items.Contains(award)) { drbId_award.SelectedItem = award; } else { drbId_award.SelectedIndex = 0; } }
private void BindAward() { dgvAward.DataSource = awardDal.GetAllAwards(true); dgvAward_SelectionChanged(dgvAward, new EventArgs()); //lbAward.DataSource = awardDal.GetAllAwards(true); }