Click here to Skip to main content
15,898,373 members
Home / Discussions / C#
   

C#

 
AnswerMessage Removed Pin
21-Aug-12 3:40
professionalN_tro_P21-Aug-12 3:40 
GeneralRe: Linq - Conditions for two categories in parallel Pin
Ronenb22-Aug-12 20:54
Ronenb22-Aug-12 20:54 
GeneralRe: Linq - Conditions for two categories in parallel Pin
Ronenb26-Aug-12 21:59
Ronenb26-Aug-12 21:59 
GeneralMessage Removed Pin
27-Aug-12 2:41
professionalN_tro_P27-Aug-12 2:41 
GeneralRe: Linq - Conditions for two categories in parallel Pin
Ronenb27-Aug-12 5:46
Ronenb27-Aug-12 5:46 
GeneralDynamic Keyword Pin
gopesh201020-Aug-12 23:12
gopesh201020-Aug-12 23:12 
GeneralRe: Dynamic Keyword Pin
Pete O'Hanlon20-Aug-12 23:35
mvePete O'Hanlon20-Aug-12 23:35 
QuestionSame entries in Listbox from WCF Pin
coem20-Aug-12 22:19
coem20-Aug-12 22:19 
Ive followed this guide: http://studentguru.gr/b/dt008/archive/2010/12/02/querying-a-database-on-windows-phone-7-using-wcf.aspx[^]

I have tree different entries in my SQL and then i launch my application I get tree entries but they are all a copy of the first one.

CODE:

NSSService which is on my ISS.
C#
using System;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.Collections.Generic;

namespace NSSWebServiceApplication
{
    [ServiceContract(Namespace = "")]
    [SilverlightFaultBehavior]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class NSSService
    {
        [OperationContract]
        public List<Server_Log> GetAllServer_Logs()
        {
            // Add your operation implementation here
            using (NSSEntities entities = new NSSEntities())
            {
                var allServer_Logs = from x in entities.Server_Log
                                     select x;
                return allServer_Logs.ToList();
            }
        }

        // Add more operations here and mark them with [OperationContract]
    }
}


MainPage on the app
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using NSSPhoneApp.NSSServiceReference;
using System.ServiceModel;

namespace NSSPhoneApp
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(MainPage_Loaded);
        }

        void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            NSSServiceClient client = new NSSServiceClient();
            client.GetAllServer_LogsCompleted +=
                new EventHandler<GetAllServer_LogsCompletedEventArgs>(client_GetAllServer_LogsCompleted);
            client.GetAllServer_LogsAsync();
        }

        void client_GetAllServer_LogsCompleted(object sender, GetAllServer_LogsCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                lst.ItemsSource = e.Result;
            }
        }
    }
}


Thanks.
AnswerRe: Same entries in Listbox from WCF Pin
coem21-Aug-12 0:14
coem21-Aug-12 0:14 
QuestionEPPLUS excel percent format Pin
Member 916988720-Aug-12 20:10
Member 916988720-Aug-12 20:10 
QuestionRe: EPPLUS excel percent format Pin
Richard MacCutchan20-Aug-12 21:29
mveRichard MacCutchan20-Aug-12 21:29 
AnswerRe: EPPLUS excel percent format Pin
Member 916988721-Aug-12 14:06
Member 916988721-Aug-12 14:06 
AnswerRe: EPPLUS excel percent format Pin
Jay Nardev21-Aug-12 20:44
Jay Nardev21-Aug-12 20:44 
QuestionWait until user finish typing Pin
biop.codeproject20-Aug-12 17:59
biop.codeproject20-Aug-12 17:59 
AnswerRe: Wait until user finish typing Pin
AmitGajjar20-Aug-12 18:39
professionalAmitGajjar20-Aug-12 18:39 
AnswerRe: Wait until user finish typing Pin
Paul Conrad20-Aug-12 19:32
professionalPaul Conrad20-Aug-12 19:32 
AnswerRe: Wait until user finish typing Pin
Shameel20-Aug-12 20:12
professionalShameel20-Aug-12 20:12 
AnswerRe: Wait until user finish typing Pin
jschell21-Aug-12 8:30
jschell21-Aug-12 8:30 
AnswerRe: Wait until user finish typing Pin
Pete O'Hanlon21-Aug-12 9:10
mvePete O'Hanlon21-Aug-12 9:10 
AnswerRe: Wait until user finish typing Pin
biop.codeproject22-Aug-12 23:27
biop.codeproject22-Aug-12 23:27 
QuestionC# accessing a web service Pin
classy_dog20-Aug-12 15:16
classy_dog20-Aug-12 15:16 
AnswerRe: C# accessing a web service Pin
AspDotNetDev20-Aug-12 16:03
protectorAspDotNetDev20-Aug-12 16:03 
GeneralRe: C# accessing a web service Pin
classy_dog21-Aug-12 17:44
classy_dog21-Aug-12 17:44 
GeneralRe: C# accessing a web service Pin
AspDotNetDev21-Aug-12 18:49
protectorAspDotNetDev21-Aug-12 18:49 
AnswerRe: C# accessing a web service Pin
Pete O'Hanlon20-Aug-12 22:28
mvePete O'Hanlon20-Aug-12 22:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.