private void FormAddStudent_Load(object sender, EventArgs e) { InitLookUpEdit(lookUpEditClub, ClubBusiness.GetAll(), "ClubId", "Name"); InitLookUpEdit(lookUpEditBuilding, BuildingBusiness.GetAll(), "BuildingId", "BuildingId"); InitLookUpEdit(lookUpEditFaculty, FacultyBusiness.GetAll(), "FacultyId", "Name"); cbbGender.Properties.Items.AddRange(new object[] { "Male", "Female" }); cbbGender.Properties.TextEditStyle = TextEditStyles.DisableTextEditor; cbbGender.SelectedIndex = 0; cbbCourse.Properties.Items.AddRange(new object[] { 2016, 2015, 2013, 2014 }); cbbCourse.Properties.TextEditStyle = TextEditStyles.DisableTextEditor; cbbCourse.SelectedIndex = 0; }
private void InitLookUpEditClub() { var clubList = ClubBusiness.GetAll(); var riLookUpClub = new RepositoryItemLookUpEdit { DataSource = clubList, ValueMember = "ClubId", DisplayMember = "Name", DropDownRows = clubList.Count, BestFitMode = BestFitMode.BestFit, SearchMode = SearchMode.AutoComplete, AutoSearchColumnIndex = 1 }; gridView2.Columns["ClubId"].ColumnEdit = riLookUpClub; }
public void GetAllTest() { var actual = ClubBusiness.GetAll().Count; Assert.AreEqual(20, actual); }