コード例 #1
0
        private async void BtnOrcamentista_Click(object sender, RoutedEventArgs e)
        {
            BlackScreen bs       = new BlackScreen();
            var         position = Mouse.GetPosition(this);

            using (var form = new ProcurarOrcamentista(position, dto))
            {
                bs.Show();
                form.ShowDialog();
                if (form.DialogResult.Value && form.DialogResult.HasValue)
                {
                    WaitBox wb = new WaitBox
                    {
                        Owner = Window.GetWindow(this)
                    };
                    wb.Show();
                    orcamentistasDTO.Id           = form.Id;
                    orcamentistasDTO.Login        = form.Login;
                    orcamentistasDTO.Nome_Simples = form.Nome_Simples;
                    orcamentistasDTO.Negocio_Id   = dto.Id;
                    await Task.Run(() =>
                    {
                        bll.InserirOracamentista(orcamentistasDTO);
                    });

                    orcamentistas = bll.LoadOrcamentistaCadastrado(dto);
                    pnlOrcamentistas.ItemsSource = orcamentistas;
                    wb.Close();
                }
            }
            bs.Close();
        }
コード例 #2
0
        private void BtnPesquisa_Click(object sender, RoutedEventArgs e)
        {
            BlackScreen bs       = new BlackScreen();
            var         position = Mouse.GetPosition(this);

            using (var form = new ProcurarRequisicaoMaterialConsulta(position))
            {
                form.Owner = Window.GetWindow(this);
                form.ShowDialog();
                if (form.DialogResult.Value && form.DialogResult.HasValue)
                {
                    informacoesDTO.Id   = Convert.ToInt32(form.RM_Id);
                    informacoesDTO      = informacoesBLL.LoadInformacoes(informacoesDTO).First();
                    txtSolicitante.Text = informacoesDTO.Solicitante;
                    txtEndereco.Text    = informacoesDTO.Endereco;
                    txtNumero.Text      = "RM" + Convert.ToInt32(informacoesDTO.Id).ToString("00000");
                    txtDescricao.Text   = informacoesDTO.Descricao;
                    txtCidade.Text      = informacoesDTO.Cidade;
                    txtUF.Text          = informacoesDTO.Uf;
                    txtCliente.Text     = informacoesDTO.Razao_Social;
                    txtVersao.Text      = Convert.ToInt32(informacoesDTO.Versao).ToString("00");
                    Load();
                }
            }
        }
コード例 #3
0
        private void BtnPesquisa_Click(object sender, RoutedEventArgs e)
        {
            BlackScreen bs       = new BlackScreen();
            var         position = Mouse.GetPosition(this);

            using (var form = new ProcurarOrcamento(position))
            {
                form.Owner = Window.GetWindow(this);
                form.ShowDialog();
                if (form.DialogResult.Value && form.DialogResult.HasValue)
                {
                    informacoesDTO.Id = Convert.ToInt32(form.Negocio_Id);
                    var informacoes = informacoesBLL.LoadInformacoes(informacoesDTO);

                    if (informacoes.Count > 0)
                    {
                        informacoesDTO                  = informacoes.First();
                        txtNumero.Text                  = "P" + Convert.ToInt32(informacoesDTO.Id).ToString("0000");
                        txtDescricao.Text               = informacoesDTO.Descricao;
                        txtCidade.Text                  = informacoesDTO.Cidade;
                        txtUF.Text                      = informacoesDTO.Uf;
                        txtCliente.Text                 = informacoesDTO.Razao_Social;
                        txtVersao.Text                  = Convert.ToInt32(informacoesDTO.Versao).ToString("00");
                        cmbDisciplina.ItemsSource       = informacoesDTO.Disciplinas;
                        cmbDisciplina.SelectedValuePath = "Id";
                        cmbDisciplina.DisplayMemberPath = "Descricao";
                        cmbDisciplina.SelectedIndex     = 0;
                    }
                }
            }
        }
コード例 #4
0
        private void BtnPesquisa_Click(object sender, RoutedEventArgs e)
        {
            var         position = Mouse.GetPosition(this);
            BlackScreen bs       = new BlackScreen();

            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;
                    dto.Cliente_Id   = form.new_Cliente_Id;
                }
            }
        }
コード例 #5
0
        private void BtnPesquisa_Click(object sender, RoutedEventArgs e)
        {
            var         position = Mouse.GetPosition(this);
            BlackScreen bs       = new BlackScreen();

            using (var form = new ProcurarGrupoFornecedor(position))
            {
                form.Owner = Window.GetWindow(this);
                form.ShowDialog();
                if (form.DialogResult.Value && form.DialogResult.HasValue)
                {
                    dto.Grupo_Forn_id      = Convert.ToInt32(form.Grupo_Id);
                    txtGrupo.Text          = dto.Grupo_Forn_id.ToString();
                    txtDescricaoGrupo.Text = form.Grupo_Descricao;
                }
            }
        }
コード例 #6
0
        private void BtnPesquisa_Click(object sender, RoutedEventArgs e)
        {
            BlackScreen bs       = new BlackScreen();
            var         position = Mouse.GetPosition(this);

            using (var form = new ProcurarOrcamento(position))
            {
                form.Owner = Window.GetWindow(this);
                form.ShowDialog();
                if (form.DialogResult.Value && form.DialogResult.HasValue)
                {
                    dto.Id = form.Negocio_Id;
                    var loadtext = Orcamentosbll.LoadTextBoxes(dto);
                    if (loadtext.Count > 0)
                    {
                        foreach (OrcamentosDTO item in loadtext)
                        {
                            txtNumero.Text    = "P" + Convert.ToInt32(dto.Id).ToString("0000");
                            txtDescricao.Text = item.Descricao;
                            txtCidade.Text    = item.Cidade;
                            txtUF.Text        = item.UF;
                            txtCliente.Text   = item.Razao_Social;
                            //txtVersao.Text = Convert.ToInt32(item.Versao_Valida).ToString("00");
                            cmbVersao.ItemsSource       = versaoBLL.LoadVersao(dto);
                            cmbVersao.SelectedValuePath = "Num_Versao";
                            cmbVersao.DisplayMemberPath = "Num_Versao";
                            cmbVersao.SelectedIndex     = Convert.ToInt32(item.Versao_Valida) - 1;
                        }
                    }
                    else
                    {
                        bs.Close();
                        CustomOKMessageBox.Show("Não há atividades cadastradas para este negócio.", "Atenção!", Window.GetWindow(this));
                        InitializeComponents();
                    }
                }
            }
        }