Пример #1
0
        public async Task LoadForm(int id)
        {
            var cliente = await _repoCliente.Get(id);

            txtClaveRegistro.Text     = cliente == null ? "" : cliente.ClaveRegistro;
            txtBanco.Text             = cliente == null ? "" : cliente.Banco;
            txtCel.Text               = cliente == null ? "" : cliente.Celular;
            txtCiudad.Text            = cliente == null ? "" : cliente.Ciudad;
            txtClaveInter.Text        = cliente == null ? "" : cliente.ClaveBancaria;
            txtCp.Text                = cliente == null ? "" : cliente.Cp;
            txtCuentaBancaria.Text    = cliente == null ? "" : cliente.CuentaBancaria;
            txtDomicilio.Text         = cliente == null ? "" : cliente.Domicilio;
            txtEmail.Text             = cliente == null ? "" : cliente.Email;
            txtEstado.Text            = cliente == null ? "" : cliente.Estado;
            txtNotas.Text             = cliente == null ? "" : cliente.Comentario;
            txtPais.Text              = cliente == null ? "" : cliente.Pais;
            txtPaqueteria.Text        = cliente == null ? "" : cliente.Paqueteria;
            txtRazoSocial.Text        = cliente == null ? "" : cliente.RazonSocial;
            txtECel.Text              = cliente == null ? "" : cliente.EmpresaCelular;
            txtECiudad.Text           = cliente == null ? "" : cliente.EmpresaCiudad;
            txtECp.Text               = cliente == null ? "" : cliente.EmpresaCp;
            txtEDomicilio.Text        = cliente == null ? "" : cliente.EmpresaDomicilio;
            txtEEmail.Text            = cliente == null ? "" : cliente.EmpresaEmail;
            txtEEstado.Text           = cliente == null ? "" : cliente.EmpresaEstado;
            txtEPais.Text             = cliente == null ? "" : cliente.EmpresaPais;
            txtRepresentante.Text     = cliente == null ? "" : cliente.Representante;
            txtETel.Text              = cliente == null ? "" : cliente.EmpresaTelefeono;
            txtRfc.Text               = cliente == null ? "" : cliente.Rfc;
            txtTelefono.Text          = cliente == null ? "" : cliente.Telefono;
            txtId.Value               = cliente == null ? 0:cliente.Id;
            txtLimiteCredito.Text     = cliente == null ? 0.ToString() : cliente.LimiteCredito.ToString();
            txtDiasCredito.Value      = cliente == null ? 0 : cliente.DiasCredito;
            cbCategoria.SelectedValue = cliente == null ? 0 : cliente.IdCategoria;
            cbPrecio.SelectedValue    = cliente == null ? 0 : cliente.IdNumeroPrecio;
        }
Пример #2
0
 public async Task <List <Cliente> > Get()
 {
     return(await _repo.Get());
 }