Ejemplo n.º 1
0
 private void gridViewFiliais_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
     if (e.Column == colCnpj)
     {
         e.DisplayText = StringUtilIts.ToCpfCnpj(e.Value);
     }
 }
Ejemplo n.º 2
0
 private void gridViewCliente_CustomColumnDisplayText(object sender,
                                                      DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
     if (e.Column == colCpfCnpj)
     {
         string cpfCnpj = StringUtilIts.ToCpfCnpj(StringUtilIts.FixString("" + e.Value));
         e.DisplayText = cpfCnpj;
     }
 }
Ejemplo n.º 3
0
        private EmpresaFilial indexarFormulario(EmpresaFilial f)
        {
            //this.btnCopyData.Visibility = BarItemVisibility.Never;
            if (f != null)
            {
                lkpMatriz.EditValue = f.Matriz;
                if (f.Matriz != null)
                {
                    lkpMatriz.Text = f.Matriz.ToString();
                }
                txtCodFilial.Text    = f.CodigoFilial;
                txtRazSocial.Text    = f.RazaoSocial;
                txtNomeFantasia.Text = f.NomeFantasia;
                txtCnpj.Text         = StringUtilIts.ToCpfCnpj(f.Cnpj);
                if (f.DtRegtroJuntaCom.HasValue)
                {
                    dtRegistroJunta.DateTime = f.DtRegtroJuntaCom.Value.Date;
                }

                cepControl1.TextCep.Text = f.Cep;

                lookUpMunicipio1.SetMunicipioUF(f.Cidade, f.Uf);

                lookUpMunicipio1.Refresh();
                lookUpMunicipio1.Update();


                txtEndereco.Text         = f.NomeEndereco;
                txtNumEndereco.Text      = f.NumeroEndereco;
                txtComplemento.Text      = f.Complemento;
                txtBairro.Text           = f.Bairro;
                cepControl1.TextCep.Text = f.Cep;

                if (!string.IsNullOrEmpty(f.Telefone))
                {
                    var tel = f.Telefone.Split('/');
                    if (tel.Length > 0)
                    {
                        this.txtTelefone.Text = tel[0];

                        if (tel.Length > 1)
                        {
                            this.txtTelefone.Text = tel[1];
                        }
                    }
                }


                txtFax.Text     = f.Fax;
                txtInsEst.Text  = f.InscricaoEstadual;
                txtSuframa.Text = f.InscricaoSuframa;
                txtEmail.Text   = f.Email;
            }
            return(f);
        }