예제 #1
0
    public override void Abas_AntesDeTrocarAba(AbaBeforeChangedCancelEventArgs e)
    {
        base.Abas_AntesDeTrocarAba(e);

        if (e.IndiceDaAba == 3)
        {
            TelerikReport.Report1 dd = new TelerikReport.Report1();
            using (ContatoEstadoBLL bll = new ContatoEstadoBLL())
            {
                bll.Filters          = GetFilters();
                dd.DataSource        = bll.listaRelatorio();
                ReportViewer1.Report = dd;
                ReportViewer1.DataBind();
            }
        }

        if (e.IndiceDaAba == 4)
        {
            TelerikReport.Report3 dd = new TelerikReport.Report3();
            using (ContatoEstadoBLL bll = new ContatoEstadoBLL())
            {
                bll.Filters          = GetFilters();
                dd.DataSource        = bll.listaRelatorio();
                ReportViewer2.Report = dd;
                ReportViewer2.DataBind();
            }
        }
    }
예제 #2
0
    public override void ListarRegistros()
    {
        ContatoEstadoBLL bll = new ContatoEstadoBLL();

        bll.Filters                  = GetFilters();
        rptLista.DataSource          = bll.listaContatoEstado();
        bll.Filters                  = GetFilters();
        tgFooterLista.TotalRegistros = bll.GetTotalRegistros();
        rptLista.DataBind();
    }
예제 #3
0
        public bool ValidaCpf(String cpf)
        {
            using (ContatoEstadoBLL contEstBll = new ContatoEstadoBLL())
            {
                //contEstBll.Filters = new Smart.Model.QueryOptions();
                //contEstBll.Filters.FilterFields.Add(new Smart.Model.DbFilterLike(ContatoInfo.GetDsCpf(cpf)));

                Smart.Model.QueryOptions filt = new Smart.Model.QueryOptions();
                filt.FilterFields.Add(new Smart.Model.DbFilterLike(ContatoInfo.GetDsCpf(cpf)));
                contEstBll.Filters = filt;

                if (contEstBll.listaRelatorio() != null)
                {
                    return(true);
                }
            }

            return(false);
        }
예제 #4
0
        protected void recriartb()
        {
            int teste = tabelaid.Rows.Count;

            for (int i = 1; i < teste; i++)
            {
                tabelaid.Rows.RemoveAt(1);
            }

            using (ContatoEstadoBLL contEstBll = new ContatoEstadoBLL())
            {
                List <ContatoEstadoView> listaContEst = contEstBll.listaContatoEstado();

                foreach (ContatoEstadoView info in listaContEst)
                {
                    int       codigo   = info.Contato.CdContato.Value;
                    String    nome     = info.Contato.DsNome.Value;
                    String    email    = info.Contato.DsEmail.Value;
                    String    nasci    = info.Contato.DtNasci.Value.ToString();
                    String    cpf      = info.Contato.DsCpf.Value;
                    String    sexo     = info.Contato.DsSexo.Value;
                    String    estado   = info.Estado.UfEstado.Value;
                    String    cidade   = info.Contato.DsCidade.Value;
                    String    endereco = info.Contato.DsEndereco.Value;
                    TableRow  tRow1    = new TableRow();
                    TableCell tCell    = new TableCell();
                    Button    btn1     = new Button();
                    btn1.Text            = "Editar";
                    btn1.CommandArgument = String.Format("{0}", (codigo));
                    btn1.Click          += button_editar;
                    tCell.Controls.Add(btn1);
                    tRow1.Cells.Add(tCell);
                    Button btn2 = new Button();
                    btn2.Text            = "Deletar";
                    btn2.Click          += button_remove;
                    btn2.CommandArgument = String.Format("{0}", (codigo));
                    tCell.Controls.Add(btn2);
                    tRow1.Cells.Add(tCell);
                    TableCell tCell0 = new TableCell();
                    tCell0.Text = nome;
                    tRow1.Cells.Add(tCell0);
                    TableCell tCell1 = new TableCell();
                    tCell1.Text = email;
                    tRow1.Cells.Add(tCell1);
                    TableCell tCell2 = new TableCell();
                    tCell2.Text = nasci;
                    tRow1.Cells.Add(tCell2);
                    TableCell tCell00 = new TableCell();
                    tCell00.Text = cpf;
                    tRow1.Cells.Add(tCell00);
                    TableCell tCell3 = new TableCell();
                    tCell3.Text = sexo;
                    tRow1.Cells.Add(tCell3);
                    TableCell tCell4 = new TableCell();
                    tCell4.Text = estado;
                    tRow1.Cells.Add(tCell4);
                    TableCell tCell5 = new TableCell();
                    tCell5.Text = cidade;
                    tRow1.Cells.Add(tCell5);
                    TableCell tCell6 = new TableCell();
                    tCell6.Text = endereco;
                    tRow1.Cells.Add(tCell6);
                    tabelaid.Rows.Add(tRow1);
                }
            }

            UpdatePanel1.Update();
        }