Пример #1
0
        private void CheckVatApprox(string code, string nip, string reqCode, string reqNip)
        {
            vies = new ViesConntection();
            string command = vies.CheckVatApprox(code, nip, reqCode, reqNip);

            switch (command)
            {
            case "true":
                txtCodeOut.Text        = code;
                txtNIPOut.Text         = nip;
                txtNameCompany.Text    = vies.traderName;
                txtAddressCompany.Text = vies.traderAddress;
                txtTypeCompany.Text    = vies.traderCompanyType;
                txtvalid.Text          = vies.valid == true ? "Dane poprawne" : "Dane nieprawidłowe";
                txtidentified.Text     = vies.requestIdentifier;

                txtReqCodeOut.Text = reqCode;
                txtReqNIPOut.Text  = reqNip;
                break;

            case "false":
                MessageBox.Show("Dane nie istnieją");
                break;

            default:
                MessageBox.Show(command);
                break;
            }
        }
Пример #2
0
        private void CheckVat(string code, string nip)
        {
            vies = new ViesConntection();
            string command;

            switch ((command = vies.CheckVat(code, nip)))
            {
            case "true":
                MessageBox.Show("Dane są poprawne");
                break;

            case "false":
                MessageBox.Show("Dane nie istnieją");
                break;

            default:
                MessageBox.Show(command);
                break;
            }
        }