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 NairPosted Mar 2, 2011, 2:11 PM
bresult = wsMovie.updateKlant(Convert.ToInt64(eersteRij[0].ToString()), txt_naam.Text, txt_voornaam.Text, txt_adres.Text, txt_postcode.Text, txt_telefoon.Text);
Suthish NairPosted Mar 2, 2011, 2:43 PM
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)
Geelen StefPosted Mar 2, 2011, 2:29 PM
VulpesPosted Mar 2, 2011, 2:25 PM
Geelen StefPosted Mar 2, 2011, 2:13 PM
Geelen StefPosted Mar 2, 2011, 2:13 PM
Geelen StefPosted Mar 2, 2011, 2:09 PM
VulpesPosted Mar 2, 2011, 2:03 PM
If it did, then that would explain the error you're seeing.
Geelen StefPosted Mar 2, 2011, 1:46 PM
Suthish NairPosted Mar 2, 2011, 1:37 PM
Geelen StefPosted Mar 2, 2011, 1:18 PM
Suthish NairPosted Mar 2, 2011, 1:11 PM
{
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 StefPosted Mar 2, 2011, 12:53 PM
Suthish NairPosted Mar 2, 2011, 12:51 PM