public void GetAllTest() { var actual = FacultyBusiness.GetAll(); Assert.AreEqual("4", actual[0].FacultyId); Assert.AreEqual("5", actual[1].FacultyId); }
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 InitLookUpEditfaculty() { var clubList = FacultyBusiness.GetAll(); var riLookUpClub = new RepositoryItemLookUpEdit { DataSource = clubList, ValueMember = "FacultyId", DisplayMember = "Name", DropDownRows = clubList.Count, BestFitMode = BestFitMode.BestFit, SearchMode = SearchMode.AutoComplete, AutoSearchColumnIndex = 1 }; gridViewStudent.Columns["Class.FacultyId"].ColumnEdit = riLookUpClub; }