private void button2_Click(object sender, EventArgs e) { using (ServiceAContractClient proxy = new ServiceAContractClient()) { string message = proxy.Operation2(); MessageBox.Show(message); } }
static void Main(string[] args) { using (ServiceAContractClient proxy = new ServiceAContractClient()) { var sc = proxy.UpdateEmployeeData(new EmpInfo { EmpID = 1, EmpName = "Kausik" }); Console.WriteLine("Employee ID: " + sc.EmpID); Console.WriteLine("Employee Name: " + sc.EmpName); } Console.ReadLine(); }
static void Main(string[] args) { using (ServiceAContractClient proxy = new ServiceAContractClient()) { var sc = proxy.UpdateEmployeeData(new EmpInfo { EmpID = 1, EmpName = "Kausik" }); Console.WriteLine("Employee ID: " + sc.EmpID); Console.WriteLine("Employee Name: " + sc.EmpName); //Implementing new functionalities in the client application sc = proxy.GetEmployeeDatabyID(1); Console.WriteLine("Retrieving Employee Details:"); Console.WriteLine("-------------------------"); Console.WriteLine("Employee ID: " + sc.EmpID); } Console.ReadLine(); }
static void Main(string[] args) { using (ServiceAContractClient proxy = new ServiceAContractClient()) { var sc = proxy.UpdateEmployeeData(new EmpInfo { EmpID = 1, EmpName = "Kausik", EmpAddress="Salt Lake" }); Console.WriteLine("Employee ID: " + sc.EmpID); Console.WriteLine("Employee Name: " + sc.EmpName); Console.WriteLine("Employee Address: " + sc.EmpAddress); //Implementing new functionalities in the client application sc = proxy.GetEmployeeDatabyID(1); Console.WriteLine("Retrieving Employee Details:"); Console.WriteLine("-------------------------"); Console.WriteLine("Employee ID: " + sc.EmpID); } Console.ReadLine(); }