Exemplo n.º 1
0
    private void BindGrid()
    {
        string condition = " 1 = 1 ";

        if (ViewState["DetailViewID"] != null)
        {
            condition += " AND DetailViewID = '" + ViewState["DetailViewID"].ToString() + "'";
        }

        if (tbx_Find.Text != "")
        {
            condition += " AND (Name like '%" + tbx_Find.Text + "%' OR Code like '%" + tbx_Find.Text + "%')";
        }

        if (ddl_DisplayType.SelectedValue != "0")
        {
            condition += " AND DisplayType = " + ddl_DisplayType.SelectedValue;
        }

        IList <UD_Panel> list = UD_PanelBLL.GetModelList(condition);

        gv_List.TotalRecordCount = list.Count;

        gv_List.PageIndex = (int)ViewState["PageIndex"];
        gv_List.BindGrid <UD_Panel>(list);
    }
Exemplo n.º 2
0
    private void BindDropDown()
    {
        ddl_PanelList.DataSource = UD_PanelBLL.GetModelList("AdvanceFind='Y'");
        ddl_PanelList.DataBind();
        ddl_PanelList.Items.Insert(0, new ListItem("请选择...", "0"));
        ddl_PanelList_SelectedIndexChanged(null, null);

        if (Request.QueryString["Panel"] != null && ddl_PanelList.Items.FindByValue(Request.QueryString["Panel"]) != null)
        {
            ddl_PanelList.SelectedValue = Request.QueryString["Panel"];
            BindGrid();
        }
    }
Exemplo n.º 3
0
 private void BindDropDown()
 {
     ddl_PanelList.DataSource = UD_PanelBLL.GetModelList("AdvanceFind='Y'");
     ddl_PanelList.DataBind();
     ddl_PanelList.Items.Insert(0, new ListItem("请选择...", "0"));
 }