Goal: create webservice that will query database and return rows, then pass it to client application and insert into DataGridView.
what I have done:
[WebMethod]
public IEnumerable<DataRow> getTransactions(int client_id)
{
BankDataLINQDataContext DB = new BankDataLINQDataContext();
IEnumerable<DataRow> query = (from u in DB.Transactions.AsEnumerable() where u.ClientID == client_id select u) as IEnumerable<DataRow>;
return query;
}
Problem:
1. No error before compile – error occured while i try to compile code.
2. I don’t have any idea how to pick up data in Client Application. I tried pass it by List but it didn’t work (“No Valid Source).
Please help…
I found it!
Side of WebService:
side of client of WebService:
I hope that this solution will be useful for someone.
Thanks for all hints 🙂