예제 #1
0
 public ReshUnit Get(int id)
 {
     using (var reshServiceClient = new ReshServiceClient())
     {
         reshServiceClient.ClientCredentials.UserName.UserName = "******";
         var reshUnit = reshServiceClient.GetReshUnit(id, false, true, null);
         reshServiceClient.Close();
         return reshUnit;
     }
 }
예제 #2
0
        public ReshUnit getUnitById()
        {
            ReshServiceClient client = new ReshServiceClient();
            ReshUnit name = client.GetReshUnit(100320, true, false, DateTime.Today);

            // Use the 'client' variable to call operations on the service.

            // Always close the client.
            client.Close();
            return name;
        }
예제 #3
0
        public ReshUnit getUnitById(int id)
        {
            //Kan ikke tro at dette er riktig måte å gjøre det på, med passordet i klartekst og det
            //Usikker på om "WSHttpBinding_IReshService" er riktig
            ReshServiceClient client = new ReshServiceClient("WSHttpBinding_IReshService");
            client.ClientCredentials.UserName.UserName = "******";

            //Vet ikke helt hva DateTime gjør
            ReshUnit name = client.GetReshUnit(id, true, false, DateTime.Today);

            client.Close();
            return name;
        }