public ViewContatoJuridico()
        {
            InitializeComponent();

            Pages.Page_Contatos PaginaContatos = Pages.Page_Contatos.Instance();
            PaginaContatos.CarregarJuridico(false, null);
            AbrirDeUmaPagina(PaginaContatos);
        }
        public static Page_Contatos Instance(bool editar, Contato c)
        {
            lock (typeof(Page_Contatos))
                if (instance == null)
                {
                    instance = new Page_Contatos(editar, c);
                }

            return(instance);
        }
        public static Page_Contatos Instance()
        {
            lock (typeof(Page_Contatos))
                if (instance == null)
                {
                    instance = new Page_Contatos();
                }

            return(instance);
        }
Пример #4
0
        private void BtnEditarContatoPFiisica_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Contato c = new Contato();
                c = (Contato)DgContatoPFisica.SelectedItem;

                //ViewContatoFisico v = new ViewContatoFisico();
                ViewContatoJuridico v = ViewContatoJuridico.Instance();

                Page_Contatos p = Page_Contatos.Instance(true, c);

                v.AbrirDeUmaPagina(p);
                p.ControleAbaPFisica(true, c);
                v.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }