Z
zleug
Guest
Hi All.
In Data layer I have EmployeeFactory class with method
public static int SaveEmployee(EmployeeDt emp)
{
...
}
And I'm using this method in the Business layer in EmployeeAdapter class
public int SaveData(EmployeeDt emp)
{
return EmployeeFactory.SaveEmployee(emp);
}
In the UI layer in the click Save button event I specify EmployeeAdapter
private void SaveButton_Click(object sender, EventArgs e)
{
...
EmployeeAdapter.SaveData(emp);
...
}
and line code EmployeeAdapter.SaveData(emp) indicate error:
An object reference is required for the non-static field, method, or property 'EmployeeAdapter.SaveData(EmployeeDt)'.
How to fix this problem?
Thanks.
Continue reading...
In Data layer I have EmployeeFactory class with method
public static int SaveEmployee(EmployeeDt emp)
{
...
}
And I'm using this method in the Business layer in EmployeeAdapter class
public int SaveData(EmployeeDt emp)
{
return EmployeeFactory.SaveEmployee(emp);
}
In the UI layer in the click Save button event I specify EmployeeAdapter
private void SaveButton_Click(object sender, EventArgs e)
{
...
EmployeeAdapter.SaveData(emp);
...
}
and line code EmployeeAdapter.SaveData(emp) indicate error:
An object reference is required for the non-static field, method, or property 'EmployeeAdapter.SaveData(EmployeeDt)'.
How to fix this problem?
Thanks.
Continue reading...