feras80
November 4th, 2007, 02:11 PM
i need to write a function that returns a list of record( datatable or dataset in C# )
this function is for show perpuse, it doesnt have to write in the database.
i have the following code:
def get_current_salary
@emp_salary=EmployeeSalary.find(:all)
for es in @emp_salary
if es.effective_date=nil
## Code that add this record to a datatable
else
## Write the record with Effective Date value="pending Review"
end
# Return the datatable
end
the problem is , what i have to write under the commented lines in order to get a list of record( datatable ) ??
Thnak you
Feras,
this function is for show perpuse, it doesnt have to write in the database.
i have the following code:
def get_current_salary
@emp_salary=EmployeeSalary.find(:all)
for es in @emp_salary
if es.effective_date=nil
## Code that add this record to a datatable
else
## Write the record with Effective Date value="pending Review"
end
# Return the datatable
end
the problem is , what i have to write under the commented lines in order to get a list of record( datatable ) ??
Thnak you
Feras,