private void GetListOfEmployees() { InitializeCombo(); lblPnlOutInfo.Text = string.Empty; try { CompanyDAO.GetData <List <Employee> >(DAOAcsessModifier.GetAllEmployees).ForEach(x => lblPnlOutInfo.Text += x); } catch (Exception ex) { FlexibleMessageBox.MAX_WIDTH_FACTOR = Screen.PrimaryScreen.WorkingArea.Width; FlexibleMessageBox.Show($"{ex.GetType().Name}\n\n{ex.Message}\n\n{ex.StackTrace}"); } }
private void InitializeCombo() { lblPnlOutInfo.Text = string.Empty; cmbEmployees.Items.Clear(); try { CompanyDAO.GetData <List <Employee> >(DAOAcsessModifier.GetAllEmployees).ForEach(x => cmbEmployees.Items.Add(new ComboItem <Employee>(x))); } catch (Exception ex) { FlexibleMessageBox.MAX_WIDTH_FACTOR = Screen.PrimaryScreen.WorkingArea.Width; FlexibleMessageBox.Show($"{ex.GetType().Name}\n\n{ex.Message}\n\n{ex.StackTrace}"); } }