Esempio n. 1
0
 protected void FormBind()
 {
     DropDownList ddl = this.ddlt01_cd_entidade;
     t01_entidade t01 = new t01_entidade();
     {
         t01.order = "order by nm_entidade";
         t01.fl_ativa = true;
         ddl.DataSource = t01.List();
         ddl.DataTextField = "nm_entidade";
         ddl.DataValueField = "t01_cd_entidade";
         ddl.DataBind();
         pb.AddEmptyItem(ddl, "Selecione");
     }
     ddl = ddlt05_cd_parceiro;
     t05_parceiro t05 = new t05_parceiro();
     {
         t05.order = "order by nm_parceiro";
         t05.t01_cd_entidade = pb.cd_entidade();
         ddl.DataSource = t05.List();
         ddl.DataTextField = "nm_parceiro";
         ddl.DataValueField = "t05_cd_parceiro";
         ddl.DataBind();
         pb.AddEmptyItem(ddl, "Selecione");
     }
     CheckBoxList cbl = cblt25_cd_perfil;
     t25_perfil t25 = new t25_perfil();
     {
         cbl.DataSource = t25.List();
         cbl.DataTextField = "nm_perfil";
         cbl.DataValueField = "t25_cd_perfil";
         cbl.DataBind();
     }
 }
Esempio n. 2
0
 private void GridBind(String order)
 {
     t01_entidade t01 = new t01_entidade();
     {
         t01.order = order;
         t01.fl_ativa = true;
         GridView1.DataSource = t01.List();
         GridView1.DataBind();
         ddlBind(ddlnm_uf);
     }
 }
 protected void ddlBind()
 {
     if (pb.fl_admin())
     {
         t01_entidade t01 = new t01_entidade();
         {
             t01.fl_ativa = true;
             t01.order = " and t01_cd_entidade in (select t01_cd_entidade from t03_projeto where fl_ativa=1) order by nm_entidade";
             ddlt01_cd_entidade.DataSource = t01.List();
             ddlt01_cd_entidade.DataTextField = "nm_entidade";
             ddlt01_cd_entidade.DataValueField = "t01_cd_entidade";
             ddlt01_cd_entidade.DataBind();
             pb.AddEmptyItem(ddlt01_cd_entidade, "Selecione");
         }
         ddlt03_cd_projeto.Enabled = false;
         trParceiro.Visible = true;
     }
     else
     {
         trParceiro.Visible = false;
     }
     t03_projeto t03 = new t03_projeto();
     {
         if (pb.cd_entidade() != 0)
         {
             //se usuário normal
             if (pb.fl_estrategico() || pb.fl_adminparceiro())
             {
                 t03.order = "where t01_cd_entidade=" + pb.cd_entidade() + " and fl_ativa=1 order by nm_projeto";
             }
             else
             {
                 t03.order = "where t02_cd_usuario='" + pb.cd_usuario() + "' ";
             }
         }
         else
         {
             //se usuário parceiro
             t03.order = "where t02_cd_usuario='" + pb.cd_usuario() + "' ";
         }
         ddlt03_cd_projeto.Items.Clear();
         ddlt03_cd_projeto.DataSource = t03.List();
         ddlt03_cd_projeto.DataTextField = "nm_projeto";
         ddlt03_cd_projeto.DataValueField = "t03_cd_projeto";
         ddlt03_cd_projeto.DataBind();
         pb.AddEmptyItem(ddlt03_cd_projeto, "Todos");
     }
     t04_tipologia t04 = new t04_tipologia();
     {
         t04.fl_ativa = true;
         t04.order = "order by nm_tipologia";
         ddlt04_cd_tipologia.DataSource = t04.List();
         ddlt04_cd_tipologia.DataTextField = "nm_tipologia";
         ddlt04_cd_tipologia.DataValueField = "t04_cd_tipologia";
         ddlt04_cd_tipologia.DataBind();
         pb.AddEmptyItem(ddlt04_cd_tipologia, "Todas");
     }
     t05_parceiro t05 = new t05_parceiro();
     {
       //  t05.fl_entidade = true;
         t05.order = "order by nm_parceiro";
         ddlt05_cd_parceiro.DataSource = t05.List();
         ddlt05_cd_parceiro.DataTextField = "nm_parceiro";
         ddlt05_cd_parceiro.DataValueField = "t05_cd_parceiro";
         ddlt05_cd_parceiro.DataBind();
         pb.AddEmptyItem(ddlt05_cd_parceiro, "Todos");
     }
     t19_fase t19 = new t19_fase();
     {
         t19.order = "order by nm_fase";
         ddlt19_cd_fase.DataSource = t19.List();
         ddlt19_cd_fase.DataTextField = "nm_fase";
         ddlt19_cd_fase.DataValueField = "t19_cd_fase";
         ddlt19_cd_fase.DataBind();
         pb.AddEmptyItem(ddlt19_cd_fase, "Todas");
     }
 }
 private void FormBind()
 {
     t01_entidade t01 = new t01_entidade();
     {
         t01.fl_ativa = true;
         t01.order = " and t01_cd_entidade in (select t01_cd_entidade from t03_projeto where fl_ativa=1)";
         DropDownList ddl = ddlt01_cd_entidade;
         ddl.DataSource = t01.List();
         ddl.DataTextField = "nm_entidade";
         ddl.DataValueField = "t01_cd_entidade";
         ddl.DataBind();
         pb.AddEmptyItem(ddl, "Selecione");
     }
 }