Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        IDAL.IProp ip = BllFactory.BllAccess.CreateIPropBLL();

        int pid = Convert.ToInt32(Request.QueryString["PID"]);
        List <Model.PropInfo> list = ip.getOnePropInfo(pid);

        repaProp.DataSource = list;
        repaProp.DataBind();
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        IDAL.IProp IP          = BllFactory.BllAccess.CreateIPropBLL();
        int        RecordCount = 0;
        int        pageIndex   = 1;
        string     pageurl     = "?page=";

        if (Request.QueryString["page"] != null)
        {
            pageIndex = Convert.ToInt32(Request.QueryString["page"]);
        }

        repProp.DataSource = IP.getProps(6, pageIndex, out RecordCount);
        repProp.DataBind();

        int pagenumber = (int)Math.Ceiling((double)RecordCount / 6);


        lblPropNumber.Text    = "商品总数:" + RecordCount + " 共" + pagenumber + "页";
        lblpageNumber.Text    = "当前:第" + pageIndex + "页";
        FirstPage.NavigateUrl = Request.Url.AbsolutePath + pageurl + 1;
        NewxtPage.NavigateUrl = Request.Url.AbsolutePath + pageurl + (pageIndex + 1);
        PrvPage.NavigateUrl   = Request.Url.AbsolutePath + pageurl + (pageIndex - 1);
        LastPage.NavigateUrl  = Request.Url.AbsolutePath + pageurl + pagenumber;

        if (pageIndex == 1)
        {
            FirstPage.Visible = false;
            PrvPage.Visible   = false;
        }

        if (pageIndex == pagenumber)
        {
            NewxtPage.Visible = false;
            LastPage.Visible  = false;
        }
    }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     IDAL.IProp ip = BllFactory.BllAccess.CreateIPropBLL();
     gridHotPropss.DataSource = ip.getHotProps();
     gridHotPropss.DataBind();
 }