private void frmReports_Load(object sender, EventArgs e) { lstUsers.Items.Clear(); List <User> allUsers = new List <User>(); allUsers = _userBLL.GetAllUsers(); ListViewItem lviUsers; foreach (User item in allUsers) { if (item.RoleID != 1) { lviUsers = new ListViewItem(item.FirstName + " " + item.LastName); lviUsers.Tag = item.UserID; lstUsers.Items.Add(lviUsers); } } lviAllWords.Items.Clear(); List <MyDictionary> allWords = new List <MyDictionary>(); allWords = _dictionaryBLL.GetAllWords(); ListViewItem lviWords; foreach (MyDictionary item in allWords) { lviWords = new ListViewItem(item.EnglishWord + " - " + item.TurkishWord); lviWords.Tag = item.WordID; lviAllWords.Items.Add(lviWords); } }
private void FrmNewPool_Load(object sender, EventArgs e) { _allExercise = _exerciseBLL.GetAllExerciseByRole(_currentUser.RoleID); cmbExerciseType.SelectedIndexChanged -= CmbExerciseType_SelectedIndexChanged; cmbExerciseType.DataSource = _allExercise; cmbExerciseType.SelectedIndex = -1; cmbExerciseType.SelectedIndexChanged += CmbExerciseType_SelectedIndexChanged; _allwords = _dictBLL.GetAllWords(); }
public void FillList() { lstAllWords.Items.Clear(); List <MyDictionary> allWords = new List <MyDictionary>(); allWords = _dictionaryBLL.GetAllWords(); ListViewItem lvi; foreach (MyDictionary item in allWords) { lvi = new ListViewItem(item.EnglishWord); lvi.SubItems.Add(item.TurkishWord); lvi.Tag = item.WordID; lstAllWords.Items.Add(lvi); } //MessageBox.Show("Yenilendi"); }