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

            using (var form = new ProcurarNegocio(position))
            {
                form.Owner = Window.GetWindow(this);
                form.ShowDialog();
                if (form.DialogResult.Value && form.DialogResult.HasValue)
                {
                    dto.Id = Convert.ToInt32(form.Negocio_Id);

                    dto = bll.LoadOrcamento(dto).First();

                    txtNumero.Text       = dto.Numero.ToUpper();
                    txtCliente.Text      = dto.Razao_Social;
                    txtNumero.Text       = dto.Numero.ToUpper();
                    txtCliente.Text      = dto.Razao_Social;
                    txtCNPJ.Text         = dto.Cnpj;
                    txtStatus.Text       = dto.Status_Descricao;
                    txtVersao.Text       = Convert.ToInt32(dto.Versao_Id).ToString("00");
                    txtEndereco.Text     = dto.Endereco;
                    txtCidadeEstado.Text = dto.CidadeEstado;
                    txtDescricao.Text    = dto.Descricao;
                    txtVendedor.Text     = dto.Vendedor;
                    txtResponsavel.Text  = dto.Contato_Nome;
                    descricaoAtividadesDTO.Disciplina_Id = 100;
                    InitializeComponents();
                }
            }
        }
Exemple #2
0
        private async void BtnPesquisa_Click(object sender, RoutedEventArgs e)
        {
            var position = Mouse.GetPosition(this);

            using (var form = new ProcurarNegocio(position))
            {
                form.Owner = Window.GetWindow(this);
                form.ShowDialog();
                if (form.DialogResult.Value && form.DialogResult.HasValue)
                {
                    dto.Id = form.Negocio_Id;
                    WaitBox wb = new WaitBox
                    {
                        Owner = Window.GetWindow(this)
                    };
                    wb.Show();
                    await Task.Run(() =>
                    {
                        dto = bll.LoadGerenciarOrcamento(dto).First();
                    });


                    txtNumero.Text       = dto.Numero.ToUpper();
                    txtCliente.Text      = dto.Razao_Social;
                    txtNumero.Text       = dto.Numero.ToUpper();
                    txtCliente.Text      = dto.Razao_Social;
                    txtCNPJ.Text         = dto.Cnpj;
                    txtStatus.Text       = dto.Status_Descricao;
                    txtVersao.Text       = Convert.ToInt32(dto.Versao_Id).ToString("00");
                    txtEndereco.Text     = dto.Endereco;
                    txtCidadeEstado.Text = dto.CidadeEstado;
                    txtDescricao.Text    = dto.Descricao;
                    txtVendedor.Text     = dto.Vendedor;

                    txtResponsavel.Text = dto.Contato_Nome;
                    if (dto.Anotacoes != "")
                    {
                        txtAnotacoes.Text = dto.Anotacoes;
                    }
                    else
                    {
                        txtAnotacoes.Text = "Não existe informações adicionais para este negócio.";
                    }
                    txtPrazo.Text = Convert.ToDateTime(dto.Prazo).ToString("dd/MM/yyyy");
                    InitializeComponents();
                    orcamentistas = bll.LoadOrcamentistaCadastrado(dto);
                    pnlOrcamentistas.ItemsSource = orcamentistas;
                    wb.Close();
                }
            }
        }