public Employees getItem(Region region, string EmployeesName, bool allowNull = false) { int idEmployeesName = 0; EmployeesNames employeesNames = EmployeesNames.getInstance(); idEmployeesName = employeesNames.getItem(EmployeesName); return(getItem(region, idEmployeesName, allowNull)); }
private ToolStripMenuItem CreateProfession() { ToolStripMenuItem item = CreateItem("Должности пользователей"); item.Click += delegate { loadDictionary("EmployeesName", "Справочник \"Профессий\""); EmployeesNames employeesNames = EmployeesNames.getInstance(); employeesNames.ReLoad(); }; return(item); }
private void loadDictionaries() { Regions regions = Regions.getInstance(); cbRegion.DataSource = regions.ToDataTable(); cbRegion.ValueMember = "id"; cbRegion.DisplayMember = "Название"; EmployeesNames employeesNames = EmployeesNames.getInstance(); cbEmployeesName.DataSource = employeesNames.ToDataTable(); cbEmployeesName.ValueMember = "id"; cbEmployeesName.DisplayMember = "Название"; DriverList driverList = DriverList.getInstance(); cbDriver.DataSource = driverList.ToDataTable(); cbDriver.ValueMember = "id"; cbDriver.DisplayMember = "ФИО"; }