Пример #1
0
        private void btn_Add_Click(object sender, EventArgs e)
        {
            var client = new Client()
            {
                firstName = tb_FN.Text,
                lastName  = tb_LN.Text,
                DOB       = dtp_DOB.Value,
                address   = tb_Address.Text,
                email     = tb_Email.Text,
                phone     = tb_Phone.Text
            };

            var status = restService.CreateClientAsync(client).Result;

            if (status)
            {
                MessageBox.Show("Success!");
            }
            else
            {
                MessageBox.Show("Failure");
            }
        }