private void BtnPesquisa_Click(object sender, RoutedEventArgs e)
        {
            var position = Mouse.GetPosition(this);

            using (var form = new ProcurarCliente(position))
            {
                form.Owner = Window.GetWindow(this);
                form.ShowDialog();
                if (form.DialogResult.Value && form.DialogResult.HasValue)
                {
                    txtRazao.Text           = form.new_Razao_Social;
                    txtFantasia.Text        = form.new_Nome_Fantasia;
                    txtEstabelecimento.Text = " ";
                    txtEndereco.Text        = "";
                    txtCidade.Text          = "";
                    txtUF.Text = "";
                    cmbVendedor.SelectedIndex   = -1;
                    cmbContato.SelectedIndex    = -1;
                    cmbPrioridade.SelectedIndex = -1;
                    txtAnotacoes.Text           = "";
                    txtNome.Text   = "";
                    dto.Cliente_Id = form.new_Cliente_Id;
                }
            }
        }
Exemple #2
0
        private void BtnPesquisa_Click(object sender, RoutedEventArgs e)
        {
            var position = Mouse.GetPosition(this);

            using (var form = new ProcurarCliente(position))
            {
                form.ShowDialog();
                if (form.DialogResult.Value && form.DialogResult.HasValue)
                {
                    txtRazao.Text    = form.new_Razao_Social;
                    txtFantasia.Text = form.new_Nome_Fantasia;
                    cliente_Id       = form.new_Cliente_Id;
                }
            }
        }