Exemplo n.º 1
0
 static void Main(string[] args)
 {
     using (CarRentalServiceClient client = new CarRentalServiceClient())
     {
         double price = client.CalculatePrice(DateTime.Now, DateTime.Now.AddDays(5), "Gazze", "pickup");
         Console.WriteLine("Prince {0}", price);
         Console.ReadKey();
     }
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            CarRentalServiceClient myClient = new CarRentalServiceClient();

            string message = myClient.GetData(13);
            Console.WriteLine("message  = "+ message);

            Car car = new Car();
            car.BoolValue = true;
            car.StringValue = "this is my car";

               Car mySecondCar= myClient.GetDataUsingDataContract(car);

               Console.WriteLine("Car String Value = "+ mySecondCar.StringValue);
               myClient.Close();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {

            CarRentalServiceClient myClient = new CarRentalServiceClient();

            string message = myClient.GetData(13);
            Console.WriteLine("message  = " + message);

            Car car = new Car();
            car.IsAvailable = true;
            car.Company = "this is my car";

            Car mySecondCar = myClient.GetDataUsingDataContract(car);

            Console.WriteLine("Car Company = " + mySecondCar.Company);
            myClient.Close();
            Console.ReadKey();
        }
Exemplo n.º 4
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            CarRentalServiceClient carRentalServiceClient = new CarRentalServiceClient("BasicHttpBinding_ICarRentalService");

            Label1.Text = carRentalServiceClient.Pickup(Int32.Parse(TextBox1.Text));
        }
 public Form1()
 {
     InitializeComponent();
     carRentalServiceClient = new CarRentalServiceClient("BasicHttpBinding_ICarRentalService");
     carRentalServiceClient.Open();
 }