protected void Page_Load(object sender, EventArgs e)
        {
            using (SalarySurveyServiceClient client = new SalarySurveyServiceClient())
            {
                grdGuide.DataSource = client.GetAllRoles();
                grdGuide.DataBind();

                client.Close();
            }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            SalarySurveyServiceClient client = new SalarySurveyServiceClient();

            foreach (SalarySurvey ss in client.GetAllRoles())
            {
                Console.WriteLine(ss.Role + "  " + ss.MinSalary + "  " + ss.MaxSalary + "  " + ss.AverageSalary);
            }

            Console.ReadLine();
            // Always close the client.
            client.Close();
        }