コード例 #1
0
ファイル: NewAdmin.cs プロジェクト: zsolt5553/Public-hospital
        private void button1_Click(object sender, EventArgs e)
        {
            admin = new AdminServiceRef.Admin();
            string message = "";
            int zip;
            Int32.TryParse(zipTxt.Text, out zip);
            int streetNr;
            Int32.TryParse(streetNrTxt.Text,out streetNr);
            admin.firstName = firstNameTxt.Text;
            admin.lastName = lastNameTxt.Text;
            admin.city = cityTxt.Text;
            admin.zip = zip;
            admin.street = streetTxt.Text;
            admin.streetNr = streetNr;
            admin.phoneNr = phoneTxt.Text;
            admin.login = usernameTxt.Text;
            admin.pass = passwordTxt.Text;

            var client = new AdminServiceRef.AdminServiceClient();

            if (client.SaveAdmin(ref admin, ref message))
            {
                Dispose();
            }
            else
            {
                new Thread(() => new ErrorWindow(message).ShowDialog()).Start();
            }
        }
コード例 #2
0
ファイル: NewAdmin.cs プロジェクト: handup/Public-hospital
        private void button1_Click(object sender, EventArgs e)
        {
            admin = new AdminServiceRef.Admin();
            string message = "";
            int zip;
            Int32.TryParse(zipTxt.Text, out zip);
            int streetNr;
            Int32.TryParse(streetNrTxt.Text,out streetNr);
            admin.firstName = firstNameTxt.Text;
            admin.lastName = lastNameTxt.Text;
            admin.city = cityTxt.Text;
            admin.zip = zip;
            admin.street = streetTxt.Text;
            admin.streetNr = streetNr;
            admin.phoneNr = phoneTxt.Text;
            admin.login = usernameTxt.Text;
            admin.pass = passwordTxt.Text;

            var client = new AdminServiceRef.AdminServiceClient();
            client.SaveAdmin(ref admin,ref message);
        }