Пример #1
0
    private void BindIndexHelp()
    {
        StringBuilder sb       = new StringBuilder();
        int           currPage = WebUnitily.CheckInt(Request["p"]);

        if (currPage == 0)
        {
            currPage = 1;
        }

        L_PageList pl = new L_PageList();

        pl.Currpage             = currPage;
        pl.PageSize             = 10;
        new8517PageList.CurPage = currPage;
        //select helpID,helptitle,postTime from ShopHelp where isPost=1
        pl.TableName = " ShopHelp";
        pl.PKey      = " helpID";
        pl.FieldList = " helpID,helptitle,postTime";

        if (classID != 0)
        {
            pl.Conditon = " and classID=" + classID + " or ParentIDRoute like '%/,'+CAST(" + classID + " as varchar(10))+'/,%' ESCAPE '/'";
        }
        if (keyWord != "")
        {
            pl.Conditon = " and HelpTitle like '%" + keyWord + "%'";
        }
        pl.Conditon = " and isPost=1";
        if (orderBy == "")
        {
            pl.OrderBy = " postTime desc";
        }

        longyuan_TableUpDateFieldsInfo tb = new longyuan_TableUpDateFieldsInfo();
        DataSet dSet = tb.GetPageList(pl);

        if (dSet.Tables.Count > 0)
        {
            if (dSet.Tables[0].Rows.Count > 0)
            {
                ddlBindIndexHelpInfo.DataSource = dSet.Tables[0];
                ddlBindIndexHelpInfo.DataBind();
                new8517PageList.TotalPage = int.Parse(tb.PageCount.ToString());
            }
            else
            {
                new8517PageList.Visible      = false;
                ddlBindIndexHelpInfo.Visible = false;
                lbInfo.Visible = true;
                lbInfo.Text    = "此类别还没有帮助主题呢!!";
            }
        }
    }
Пример #2
0
    private void BindIndexOrderListInfo()
    {
        StringBuilder sb = new StringBuilder();

        int currPage = WebUnitily.CheckInt(Request["p"]);

        if (currPage == 0)
        {
            currPage = 1;
        }

        L_PageList pl = new L_PageList();

        pl.Currpage       = currPage;
        pl.PageSize       = 16;
        pList8517.CurPage = currPage;

        pl.TableName = " (OrderList as a Left Join (Select orderID,Sum(memberPrice*discount) as PriceTotal,Sum(freign) as FreightTotal From orderDetail group by orderID) as b On b.orderID=a.orderID) ";
        pl.PKey      = " a.orderID ";
        pl.FieldList = " a.orderID,a.userID,isNew,orderState,orderTime,ISNULL(b.PriceTotal,0) as PriceTotal,ISNULL(b.FreightTotal,0) as FreightTotal ";
        pl.Conditon  = " and orderState=10 and userID= " + userID;
        pl.OrderBy   = " orderTime Desc ";

        longyuan_TableUpDateFieldsInfo tb = new longyuan_TableUpDateFieldsInfo();
        DataSet dSet = tb.GetPageList(pl);

        if (dSet.Tables.Count > 0)
        {
            if (dSet.Tables[0].Rows.Count > 0)
            {
                gvBindOrderListInfo.DataSource   = dSet.Tables[0];
                gvBindOrderListInfo.DataKeyNames = new string[] { "orderID" };
                gvBindOrderListInfo.DataBind();

                pList8517.TotalPage = int.Parse(tb.PageCount.ToString());
            }
            else
            {
                gvBindOrderListInfo.DataBind();
            }
        }
        else
        {
            gvBindOrderListInfo.DataBind();
        }
    }
Пример #3
0
    private void BindProduct()
    {
        int currPage = WebUnitily.CheckInt(Request["p"]);  //获取所请求页的索引

        if (currPage == 0)
        {
            currPage = 1;
        }

        L_PageList p1 = new L_PageList();

        p1.Currpage = currPage;
        p1.PageSize = 15;

        //获取分页的用户控件
        pList8517.CurPage = currPage;

        p1.TableName = "Product";
        p1.PKey      = "productID";
        p1.FieldList = "productID,productName,categoryName,productImage,currentPrice,menberPrice,danwei,productStore,remainDay,addTime,isPost,isCommend";
        // p1.Conditon = " and isPost=1";
        p1.OrderBy = " addTime Desc";

        longyuan_TableUpDateFieldsInfo tb = new longyuan_TableUpDateFieldsInfo();
        DataSet dsSet = tb.GetPageList(p1);

        if (dsSet.Tables.Count > 0)
        {
            if (dsSet.Tables[0].Rows.Count > 0)
            {
                gvProduct.DataSource   = dsSet.Tables[0];
                gvProduct.DataKeyNames = new string[] { "ProductID" };
                gvProduct.DataBind();
                pList8517.TotalPage = int.Parse(tb.PageCount.ToString());
            }
            else
            {
                gvProduct.DataBind();
            }
        }
        else
        {
            gvProduct.DataBind();
        }
    }
Пример #4
0
    private void BindIndexyifahuo()
    {
        StringBuilder sb       = new StringBuilder();
        int           currPage = WebUnitily.CheckInt(Request["p"]);

        if (currPage == 0)
        {
            currPage = 1;
        }

        L_PageList pl = new L_PageList();

        pl.Currpage = currPage;
        pl.PageSize = 15;

        plist8571.CurPage = currPage;

        pl.TableName = "(OrderList as a Left Join (Select orderID,sum(memberPrice*BugNum*DisCount) as PriceTotal,sum(freign) as freightTotal From OrderDeTail Group by orderID) as b on b.orderID=a.orderID) ";
        pl.PKey      = "a.orderID ";
        pl.FieldList = "a.orderID,a.userID,isNew,orderState,acceptName,acceptAddr,handSet,tel,zipCode,orderTime,ISNULL(b.priceTotal,0) as priceTotal,ISNULL(b.freightTotal,0) as freightTotal ";
        pl.Conditon  = "and orderState=30 ";
        pl.OrderBy   = "orderTime Desc ";

        longyuan_TableUpDateFieldsInfo tb = new longyuan_TableUpDateFieldsInfo();
        DataSet set = tb.GetPageList(pl);

        if (set.Tables.Count > 0)
        {
            if (set.Tables[0].Rows.Count > 0)
            {
                gvBindyifahuo.DataSource   = set.Tables[0];
                gvBindyifahuo.DataKeyNames = new string[] { "orderID" };
                gvBindyifahuo.DataBind();
            }
            else
            {
                gvBindyifahuo.DataBind();
            }
        }
        else
        {
            gvBindyifahuo.DataBind();
        }
    }
Пример #5
0
    private void BindHelpInfo()
    {
        int currPage = WebUnitily.CheckInt(Request["p"]);

        if (currPage == 0)
        {
            currPage = 1;
        }
        L_PageList pl = new L_PageList();

        pl.Currpage       = currPage;
        pl.PageSize       = 10;
        pList8517.CurPage = currPage;

        pl.TableName = "ShopHelp";
        pl.PKey      = "helpID";
        pl.FieldList = "helpID,helpTitle,classID,className,helpContent,postTime,isPost";
        pl.OrderBy   = "postTime desc";

        longyuan_TableUpDateFieldsInfo tb = new longyuan_TableUpDateFieldsInfo();
        DataSet dsSet = tb.GetPageList(pl);

        if (dsSet.Tables.Count > 0)
        {
            if (dsSet.Tables[0].Rows.Count > 0)
            {
                gvHelpInfo.DataSource   = dsSet.Tables[0];
                gvHelpInfo.DataKeyNames = new string[] { "helpID" };
                gvHelpInfo.DataBind();

                pList8517.TotalPage = Int32.Parse(tb.PageCount.ToString());
            }
            else
            {
                gvHelpInfo.DataBind();
            }
        }
        else
        {
            gvHelpInfo.DataBind();
        }
    }
Пример #6
0
    private void bindClassList()
    {
        StringBuilder sb       = new StringBuilder();
        int           currpage = WebUnitily.CheckInt(Request["p"]);

        if (currpage == 0)
        {
            currpage = 1;
        }
        L_PageList pl = new L_PageList();

        pl.Currpage = currpage;
        pl.PageSize = 10;

        plList8531.CurPage = currpage;

        pl.TableName = "Product ";
        pl.PKey      = "productID ";
        pl.FieldList = "productID,ProductName,ProductImage,Price,CurrentPrice,MenberPrice,Danwei,RemainDay,AddTime,LinkQQId,LinkQQName ";
        pl.OrderBy   = " AddTime Desc ";

        longyuan_TableUpDateFieldsInfo tb = new longyuan_TableUpDateFieldsInfo();
        DataSet set = tb.GetPageList(pl);

        if (set.Tables.Count > 0)
        {
            if (set.Tables[0].Rows.Count > 0)
            {
                rpDataList.DataSource = set.Tables[0];
                rpDataList.DataBind();
                plList8531.TotalPage = int.Parse(tb.PageCount.ToString());
            }
            else
            {
                rpDataList.DataBind();
            }
        }
        else
        {
            rpDataList.DataBind();
        }
    }
Пример #7
0
    protected void btnDel_Click(object sender, EventArgs e)
    {
        string str = "", sqlStr = "", delFileName = "";

        if (Request["cbName"] != null)
        {
            str = Request["cbName"];
        }
        if (str.Trim().Length < 1)
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("请您选择要删除的商品"));
            return;
        }

        sqlStr = "select ProductID from Product where productID in(" + str + ")";
        DataSet set = new longyuan_TableUpDateFieldsInfo().getDeleteShop(sqlStr);

        for (int i = 0; i < set.Tables[0].Rows.Count; i++)
        {
            if (delFileName.Length > 1)
            {
                delFileName = delFileName.Substring(1);
            }
            else
            {
                delFileName = "";
            }
        }
        if (new longyuan_TableUpDateFieldsInfo().Deleteproject("product", " and ProductID in(" + str + ")") > 0)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("产品删除成功!!"));
        }
        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", WebUnitily.AlertUrl("产品删除失败!!"));
        }
        BindProduct();
    }
Пример #8
0
    private void BindBulletin()
    {
        int currPage = WebUnitily.CheckInt(Request["p"]);

        if (currPage == 0)
        {
            currPage = 1;
        }
        L_PageList pl = new L_PageList();

        pl.Currpage = currPage;

        pl.PageSize       = 2;
        pList8517.CurPage = currPage;
        pl.TableName      = "Bulletin";
        pl.PKey           = "ID";
        pl.FieldList      = "ID,bulletinTitle,bulletinContent,isPost,orderNum,postTime";
        pl.OrderBy        = "postTime desc";

        longyuan_TableUpDateFieldsInfo tb = new longyuan_TableUpDateFieldsInfo();
        DataSet Dset = tb.GetPageList(pl);

        if (Dset.Tables.Count > 0)
        {
            if (Dset.Tables[0].Rows.Count > 0)
            {
                gvBulletin.DataSource   = Dset.Tables[0];
                gvBulletin.DataKeyNames = new string[] { "ID" };
                gvBulletin.DataBind();

                pList8517.TotalPage = int.Parse(tb.PageCount.ToString());
            }
            else
            {
                gvBulletin.DataBind();
            }
        }
    }