示例#1
0
 private void ddlUsuarioBind(DropDownList ddl)
 {
     t02_usuario t02 = new t02_usuario();
     {
         t02.fl_ativa = true;
         t02.order = " and t02.t05_cd_parceiro in (select t05_cd_parceiro from t05_parceiro where t01_cd_entidade = " + pb.cd_entidade() + ") and t02.t02_cd_usuario not in (select t02_cd_usuario from t32_usuariolinha where t01_cd_entidade =" + pb.cd_entidade() + ")";
         ddl.DataSource = t02.List();
         ddl.DataTextField = "nm_nome";
         ddl.DataValueField = "t02_cd_usuario";
         ddl.DataBind();
         pb.AddEmptyItem(ddl, "Selecione");
     }
 }
示例#2
0
    private void GridBind(string order)
    {
        string query = "";
        if (!pb.fl_admin())
        {
            query = " and t02.t05_cd_parceiro <> 0 ";
           // query = " and t02.t05_cd_parceiro in (select t05_cd_parceiro from t05_parceiro where t01_cd_entidade = " + pb.cd_entidade() +")";
            //GridView1.Columns[7].Visible = false;
        }
        t02_usuario t02 = new t02_usuario();
        {
            t02.fl_ativa = true;
            lbltotal.Text = "(total: "+ t02.List().Tables[0].Rows.Count +" usuários)";
            t02.order = query + ViewState["pesquisa"] + order;
            if (ViewState["pesquisa"] != null)
            {
                if (ViewState["pesquisa"].ToString() != "")
                { lblfindtotal.Text = t02.List().Tables[0].Rows.Count + " encontrados "; }
                else { lblfindtotal.Text = ""; }
            }

            GridView1.DataSource = t02.List();
            GridView1.DataBind();
        }
    }