public EmployeeDetails(EmployeeViewer pEmployeeViewer, int pID) { InitializeComponent(); ID = pID; employeeViewer = pEmployeeViewer; for (int i = 0; i < Database.EmployeeInfo.Count; i++) { if (Database.EmployeeInfo[i].ID == ID) { txtFirstName.Text = Database.EmployeeInfo[i].FirstName; txtLastName.Text = Database.EmployeeInfo[i].LastName; txtUserName.Text = Database.EmployeeInfo[i].UserName; chkIsAdmin.Checked = Database.EmployeeInfo[i].IsAdmin; chkIsCurrent.Checked = Database.EmployeeInfo[i].IsCurrent; rowIndexHolder = i; } } }
public AddNewEmployee(EmployeeViewer pEmployeeViewer) { InitializeComponent(); employeeViewer = pEmployeeViewer; }