Exemple #1
0
        private void Window_ContentRendered(object sender, EventArgs e)
        {
            ClienteRepo repo = new ClienteRepo();

            cbCliente.ItemsSource = repo.Pesquisar("");



            if (AgendamentoAlteracao != null)
            {
                dtVisita.Text    = AgendamentoAlteracao.Visita.ToString("");
                txtMensagem.Text = AgendamentoAlteracao.DServiço;

                txtCodUsuario.Content = AgendamentoAlteracao.IdUsuario.ToString("");
                txtMarca.Text         = AgendamentoAlteracao.Mmaquina;
                dsMaquina.Text        = AgendamentoAlteracao.DsMaquina;
                txtValor.Text         = AgendamentoAlteracao.VlServiço.ToString("N2");
                dtServiço.Text        = AgendamentoAlteracao.DTServico.ToString("");
                cbCliente.Text        = AgendamentoAlteracao.Nome;
            }
            if (Aplicacao.UsuarioLogado != null)
            {
                txtCodUsuario.Content = Aplicacao.UsuarioLogado.Id.ToString();
            }
        }
Exemple #2
0
 // GET: api/Cliente
 public IHttpActionResult Get()
 {
     try
     {
         ClienteRepo clienteRepo = new ClienteRepo();
         var         cliente     = clienteRepo.Pesquisar();
         return(Ok(cliente));
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }
Exemple #3
0
        private void AtualizarDataGrid()
        {
            ClienteRepo repo = new ClienteRepo();

            list.ItemsSource            = repo.Pesquisar(txtPesquisar.Text);
            list.Columns[0].Visibility  = Visibility.Hidden;
            list.Columns[0].IsReadOnly  = true;
            list.Columns[1].IsReadOnly  = true;
            list.Columns[2].IsReadOnly  = true;
            list.Columns[3].IsReadOnly  = true;
            list.Columns[4].IsReadOnly  = true;
            list.Columns[5].IsReadOnly  = true;
            list.Columns[6].IsReadOnly  = true;
            list.Columns[7].IsReadOnly  = true;
            list.Columns[8].IsReadOnly  = true;
            list.Columns[9].IsReadOnly  = true;
            list.Columns[10].IsReadOnly = true;
            list.Columns[11].IsReadOnly = true;
            list.Columns[12].IsReadOnly = true;
        }