using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Web.Services.Protocols;
using System.Windows.Forms;

namespace BusinessWindows
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnCallWithoutAuthentication_Click(object sender, EventArgs e)
        {
            new ServiceReference.Service().MethodWithoutAuthentication();
            MessageBox.Show("処理が正常終了しました");
        }

        private void btnCallWithAuthentication_Click(object sender, EventArgs e)
        {
            try
            {
                new ServiceReference.Service().MethodWithAuthentication();
                MessageBox.Show("処理が正常終了しました");
            }
            catch (SoapException ex)
            {
                MessageBox.Show("認証がされていません " + ex.ToString());
            }
        }

        private void btnOpenLogin_Click(object sender, EventArgs e)
        {
            new Login().Show();
        }
    }
}