private void SetListEmployees(List <CEmployee> Employees) { foreach (CEmployee E in Employees) { List <string> values = CBranch.GetEmployeeValues(E); ListViewItem listitem = new ListViewItem(values.ToArray()); listViewEmployee.Items.Add(listitem); } }
private void SetEmployeesColums(CEmployee employee) { listViewEmployee.Clear(); listViewEmployee.View = View.Details; //List<string> values = CBranch.GetEmployeeClassPropertes(employee); List <string> values = CBranch.GetEmployeeValues(employee); for (int i = 0; i < values.Count; i++) { listViewEmployee.Columns.Add(values[i], 150); } listViewEmployee.FullRowSelect = true; listViewEmployee.GridLines = true; listViewEmployee.MultiSelect = false; }
private void SetTextBoxes(CEmployee employee, int x, int y) { List <string> values = CBranch.GetEmployeeClassPropertes(employee); List <string> valuesInRus = CBranch.GetEmployeeValues(EMPLOEEYEEINRUS); int position = 0; int moveX, moveY; moveX = x; moveY = y; for (int i = 0; i < values.Count; i++) { TextBox textBoxSection = new TextBox(); textBoxSection.Location = new System.Drawing.Point(moveX, moveY); textBoxSection.Name = values[i]; textBoxSection.Size = new System.Drawing.Size(170, 23); textBoxSection.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left); splitContainer1.Panel2.Controls.Add(textBoxSection); Label Label = new Label(); Label.Location = new System.Drawing.Point(moveX, moveY - 30); Label.Name = values[i]; //Label.Text = values[i]; Label.Text = valuesInRus[i]; Label.Size = new System.Drawing.Size(105, 23); Label.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left); splitContainer1.Panel2.Controls.Add(Label); if (position != 2) { moveX = moveX + 200; position++; } else { position = 0; moveX = x; moveY = moveY + 60;; } } }