Ernie_1963
Это то, что у меня есть для списка, и у меня также есть словарь, как вы можете видеть.
public static List<employee> GetEmployeesList()
{
List<employee> employees = new List<employee>();
employees.Add(new Employee("Duane", "Wales", "Taber", "ewales@shaw.ca", "869-9681", "$55,000", "Administration"));
employees.Add(new Employee("Lori", "Wales", "Taber", "llwales@shaw.ca", "869-9682", "$75,000", "Administration"));
employees.Add(new Employee("Bianca", "Wales", "Calgary", "bianca@shaw.ca", "968-9677", "$95,400", "Finances"));
employees.Add(new Employee("Smokey", "Wales", "Barnwell", "smoke@telus.net", "555-9651", "$105,000", "Engineering"));
employees.Add(new Employee("Mike", "Wales", "Medford", "mikew@global.net", "541-9681", "$63,000", "Sales"));
employees.Add(new Employee("Steven", "Wales", "Portland", "wales_89@global.us", "552-8569", "$75,000", "Sales"));
return employees;
}
public static Dictionary<int, Employee> GetEmployeeDictionary()
{
Dictionary<int, Employee> employees = new Dictionary<int, Employee>();
employees.Add(1, new Employee("Duane", "Wales", "Taber", "ewales@shaw.ca", "869-9681", "$55,000", "Administration"));
employees.Add(2, new Employee("Lori", "Wales", "Taber", "llwales@shaw.ca", "869-9682", "$75,000", "Administration"));
employees.Add(3, new Employee("Bianca", "Wales", "Calgary", "bianca@shaw.ca", "968-9677", "$95,400", "Finances"));
employees.Add(4, new Employee("Smokey", "Wales", "Barnwell", "smoke@telus.net", "555-9651", "$105,000", "Engineering"));
employees.Add(5, new Employee("Mike", "Wales", "Medford", "mikew@global.net", "541-9681", "$63,000", "Sales"));
employees.Add(6, new Employee("Steven", "Wales", "Portland", "wales_89@global.us", "552-8569", "$75,000", "Sales"));
return employees;
И это текстовые поля, которые я пытаюсь заполнить, а затем после этого у меня есть кнопки для перехода к следующей записи, предыдущей, следующей и последней
private void uxfirstName_TextChanged(object sender, EventArgs e)
{
}
private void uxlastName_TextChanged(object sender, EventArgs e)
{
}
private void uxCity_TextChanged(object sender, EventArgs e)
{
}
private void uxEmail_TextChanged(object sender, EventArgs e)
{
}
private void uxPhone_TextChanged(object sender, EventArgs e)
{
}
private void uxSalary_TextChanged(object sender, EventArgs e)
{
}
private void uxDepartment_TextChanged(object sender, EventArgs e)
{
}
У меня есть Visual C# 2012 от Wrox, но либо я еще не совсем понимаю, либо не вижу подходящего примера.