private void Fill() { ContractorsLogic contractors = new ContractorsLogic(manager); DataGV.AutoGenerateColumns = false; List <Contractor> resultA = contractors.GetAll(); List <ContractorView> contractorsView = new List <ContractorView>(); foreach (Contractor a in resultA) { ContractorView c = new ContractorView(a, manager); contractorsView.Add(c); } view = new SortableBindingList <ContractorView>(contractorsView); DataGV.DataSource = view; DataGV.AutoResizeRows(); DataGV.Update(); PersonCB.SelectedIndex = 0; ContractorTypesDDL.Items.Clear(); ContractorTypesLogic types = new ContractorTypesLogic(manager); ContractorTypesDDL.DisplayMember = "Name"; ContractorTypesDDL.ValueMember = "ID"; ContractorType all = new ContractorType(); all.ID = -1; all.Name = " - всі - "; ContractorTypesDDL.Items.Add(all); foreach (var a in types.GetAll()) { ContractorTypesDDL.Items.Add(a); } ContractorTypesDDL.SelectedIndex = 0; }