I was created this return from WCF and may i know how could i read the data specifically ??
[DataContract]
public class UserData
{
[DataMember]
public int userID { get; set; }
[DataMember]
public string name { get; set; }
[DataMember]
public string email { get; set; }
[DataMember]
public string contact { get; set; }
[DataMember]
public string status { get; set; }
}
This is WCF side and returning from WCF, i want to read this from Window phone. may i know is there some example ? Thank you for reply
Update
The code in phone part where i want to use the data
private Service1Client _serviceClient;
public Login()
{
InitializeComponent();
_serviceClient = new Service1Client();
_serviceClient.LoginUserCompleted += new EventHandler<LoginUserCompletedEventArgs>(_serviceClient_LoginUserCompleted);
}
private void loginBtn_Click(object sender, RoutedEventArgs e)
{
_serviceClient.LoginUserAsync(txtEmail.Text, txtPassword.Password);
}
private void _serviceClient_LoginUserCompleted(object sender, LoginUserCompletedEventArgs e)
{
if (e.Error == null && e.Result != null)
{
(App.Current as App).MyUserID = 16; MessageBox.Show("Welcome " + e.Result + "!"); //ContentPanel.Visibility = Visibility.Collapsed; //Data.Visibility = Visibility.Visible; //Testing.ItemsSource = e.Result;
Wondering how could i make this few line of code to read the data accordingly, make it into list or can be extract specific data and currently this few lines of codes giving me this answer ::
WCFReference.UserData
}
else
{
MessageBox.Show(e.Error.InnerException.Message + " Couldn't Login, Please try again =D");
}
}