Beispiel #1
0
    private void loadDMlv2Xem(double u)
    {
        danhmucBLL bs = new danhmucBLL();

        rpLV1.DataSource = bs.getDanhMuclvXem(u);
        rpLV1.DataBind();
        for (int i = 0; i <= rpLV1.Items.Count - 1; i++)
        {
            Label lbDanhMucSTT = rpLV1.Items[i].FindControl("lbDanhMucSubSTT") as Label;
            lbDanhMucSTT.Text = (i + 1).ToString();
        }
    }
Beispiel #2
0
    private void loadDMlv2()
    {
        danhmucBLL bs = new danhmucBLL();
        //DropDownList ddlLevel = rpLV1.Items[0].FindControl("ddlLevel") as DropDownList;
        List <danhmucDAL> ds = bs.getDanhMuclv(1);

        ddlLevel.Items.Add("Tất cả");
        ddlLevel.DataSource     = ds;
        ddlLevel.DataTextField  = "ten_danhmuc";
        ddlLevel.DataValueField = "groupdanhmuc";
        ddlLevel.DataBind();
        double            index = Convert.ToDouble(ddlLevel.SelectedValue) + 0.1;
        List <danhmucDAL> list  = bs.getDanhMuclvXem(index);

        rpLV1.DataSource = list;
        rpLV1.DataBind();
        for (int i = 0; i <= rpLV1.Items.Count - 1; i++)
        {
            Label lbDanhMucSTT = rpLV1.Items[i].FindControl("lbDanhMucSubSTT") as Label;
            lbDanhMucSTT.Text = (i + 1).ToString();
        }
    }