Hi,
I have a little project i am working on. This project is build by the 3 layer concept. But i have a small problem.
First let me tell you i have stored procedure: select movie_id from tbl_movie . Here i get all the id's from the movies.
Also i use a webservice to call all my methods. I have the following method:
Public Function updateMovie(ByVal Movie_id As Integer, ByVal Movie_naam As String, ByVal Movie_status As Integer, ByVal Movie_hoofdrol As String) As Boolean
In this method my movie_id is an integer.
Now when i want to use this method in my presentation layer, i first call the getMovieID function, where i get a dataset with all the id's. But then i want to convert the first datarow into an integer so that i can use it in my updatemovie funtion.
I tried this, dsMovie = (DataSet)wsMovie.getKlantId();
tabel = dsMovie.Tables["tbl_klanten"];
eersteRij = tabel.Rows[0];
Boolean bresult;
bresult = wsMovie.updateKlant((Int32.Parse(eersteRij.ToString()))
But it doesn't work...
Loading

Suthish NairRank #92 · 22.8K reputationPosted Mar 2, 2011, 9:11 AM EST
bresult = wsMovie.updateKlant(Convert.ToInt64(eersteRij[0].ToString()), txt_naam.Text, txt_voornaam.Text, txt_adres.Text, txt_postcode.Text, txt_telefoon.Text);
Suthish NairRank #92 · 22.8K reputationPosted Mar 2, 2011, 7:51 AM EST
Geelen Stef15 reputationPosted Mar 2, 2011, 7:53 AM EST
Suthish NairRank #92 · 22.8K reputationPosted Mar 2, 2011, 8:11 AM EST
{
if(dsMovie.Tables[0].Rows[0][0].ToString() != "") //put a breakpoint on this line and check the value you getting
{
bresult = wsMovie.updateKlant(Convert.ToInt64(dsMovie.Tables[0].Rows[0][0]));
}
}
Geelen Stef15 reputationPosted Mar 2, 2011, 8:18 AM EST
Suthish NairRank #92 · 22.8K reputationPosted Mar 2, 2011, 8:37 AM EST
Geelen Stef15 reputationPosted Mar 2, 2011, 8:46 AM EST
VulpesRank #55 · 29.2K reputationPosted Mar 2, 2011, 9:03 AM EST
If it did, then that would explain the error you're seeing.
Geelen Stef15 reputationPosted Mar 2, 2011, 9:09 AM EST
Geelen Stef15 reputationPosted Mar 2, 2011, 9:13 AM EST
Geelen Stef15 reputationPosted Mar 2, 2011, 9:13 AM EST
VulpesRank #55 · 29.2K reputationPosted Mar 2, 2011, 9:25 AM EST
Geelen Stef15 reputationPosted Mar 2, 2011, 9:29 AM EST
Suthish NairRank #92 · 22.8K reputationPosted Mar 2, 2011, 9:43 AM EST
Like txt_naam.Text create another control make it visible false and bind eersteRij[0] the value to it.
Then point this textbox value to your method.
private void btn_first_Click(object sender, RoutedEventArgs e)