Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("order_list", "订单列表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }
            type         = RequestTool.RequestString("type");
            string where = "Type_id_OrderProductType=256 and IsPaidReserve=1";
            switch (type.ToLower())
            {
            case "1":
                where += " and IsStockOK=0";
                break;

            case "2":
                where += " and IsStockOK = 1";
                break;

            case "3":
                where += " and IsPaid = 0";
                break;

            case "4":
                where += " and IsPaid = 1";
                break;

            case "5":
                where += " and Count_Shipped=0";
                break;

            case "6":
                where += " and Count_Shipped>0";
                break;
            }
            PageSize = RequestTool.getpageSize(25);
            models   = B_Lebi_Order_Product.GetList(where, "id desc", PageSize, page);
            int recordCount = B_Lebi_Order_Product.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&type=" + type, page, PageSize, recordCount);
        }
Esempio n. 2
0
        protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode)
        {
            if (CurrentUser.id == 0)
            {
                Response.Redirect(URL("P_Login", "" + HttpUtility.UrlEncode(RequestTool.GetRequestUrlNonDomain()) + "," + GetUrlToken(RequestTool.GetRequestUrlNonDomain()) + ""));
            }
            LoadTheme(themecode, siteid, languagecode, pcode);
            path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">&raquo;</em><a href=\"" + URL("P_UserCenter", "") + "\"><span>" + Tag("会员中心") + "</span></a><em>&raquo;</em><a href=\"" + URL("P_UserComment", "") + "\"><span>" + Tag("商品评价") + "</span></a>";
            //key={0}&type={1}&status={2}&dateFrom={3}&dateTo={4}
            key      = Rstring("key");
            type     = Rint("type");
            status   = Rint("status");
            dateFrom = Rstring("dateFrom");
            dateTo   = Rstring("dateTo");
            DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom");
            DateTime lbsql_dateTo   = RequestTool.RequestDate("dateTo");

            pageindex = RequestTool.RequestInt("page", 1);
            types     = B_Lebi_Type.GetList("Class='CommentStatus'", "sort desc");
            if (type == 0)
            {
                where = "Parentid = 0 and TableName = 'Product' and User_id=" + CurrentUser.id + "";
                if (key != "")
                {
                    where += " and (Content like lbsql{'%" + key + "%'})";
                }
                if (dateFrom != "" && dateTo != "")
                {
                    where += " and Time_Add>='" + FormatDate(lbsql_dateFrom) + "' and Time_Add<='" + FormatDate(lbsql_dateTo) + " 23:59:59'";
                }
                if (status > 0)
                {
                    where += " and (Status = " + status + ")";
                }
                comments = B_Lebi_Comment.GetList(where, "id desc", PageSize, pageindex);
                foreach (Lebi_Comment c in comments)
                {
                    c.IsRead = 1;
                    B_Lebi_Comment.Update(c);
                }
                int recordCount = B_Lebi_Comment.Counts(where);
                //string url = URL("P_UserComment", key + "," + type + "," + status + "," + dateFrom + "," + dateTo + ",{0}");
                //PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb(url, page, PageSize, recordCount, CurrentLanguage);
                PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?page={0}&key=" + key + "&type=" + type + "&status=" + status + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "", pageindex, PageSize, recordCount, CurrentLanguage);
            }
            else
            {
                //待评价商品
                where = "IsCommented = 0 and User_id=" + CurrentUser.id + " and id in(select id from [Lebi_Order_Product] where Order_id in(select id from [Lebi_Order] where User_id=" + CurrentUser.id + " and IsReceived = 1))";
                if (key != "")
                {
                    where += " and (Product_Name like lbsql{'%" + key + "%'})";
                }
                if (dateFrom != "" && dateTo != "")
                {
                    where += " and Time_Add>='" + FormatDate(lbsql_dateFrom) + "' and Time_Add<='" + FormatDate(lbsql_dateTo) + " 23:59:59'";
                }
                order_products = B_Lebi_Order_Product.GetList(where, "id desc", PageSize, pageindex);
                int    recordCount = B_Lebi_Order_Product.Counts(where);
                string url         = URL("P_UserComment", key + "," + type + "," + status + "," + dateFrom + "," + dateTo + ",{0}");
                PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?page={0}&key=" + key + "&type=" + type + "&status=" + status + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "", pageindex, PageSize, recordCount, CurrentLanguage);
            }
            NextPage = "?page=" + (pageindex + 1) + "&key=" + key + "&type=" + type + "&status=" + status + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "";
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("statis_orderproduct", "订单报表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            key          = RequestTool.RequestString("key");
            orderkey     = RequestTool.RequestString("orderkey");
            IsPay        = RequestTool.RequestInt("IsPay", -1);
            Pay_id       = RequestTool.RequestInt("Pay_id", 0);
            Transport_id = RequestTool.RequestInt("Transport_id", 0);
            supplier_id  = RequestTool.RequestString("supplier_id");
            dateFrom     = RequestTool.RequestString("dateFrom");
            if (dateFrom == "")
            {
                dateFrom = System.DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd");
            }
            dateTo = RequestTool.RequestString("dateTo");
            if (dateTo == "")
            {
                dateTo = System.DateTime.Now.AddDays(0).ToString("yyyy-MM-dd");
            }

            suppliers = B_Lebi_Supplier.GetList("", "");
            where     = "1=1";

            if (IsPay != -1)
            {
                where += " and w.IsPaid = " + IsPay;
            }
            if (Pay_id != 0)
            {
                where += " and w.Pay_id = " + Pay_id;
            }
            if (Transport_id != 0)
            {
                where += " and w.Transport_id = " + Transport_id;
            }
            where += " and (datediff(d,w.Time_Add,'" + dateFrom + "')<=0 and datediff(d,w.Time_Add,'" + dateTo + "')>=0)";
            if (supplier_id != "")
            {
                try
                {
                    supplier_id = Convert.ToInt32(supplier_id).ToString();
                }
                catch
                {
                    supplier_id = "0";
                }
                where += " and w.Supplier_id = " + supplier_id;
            }
            if (orderkey != "")
            {
                where += " and  w.Code like '%" + orderkey + "%'";
            }
            where = "Order_id in (select w.id from Lebi_Order as w where " + where + ")";
            if (key != "")
            {
                where += " and (Product_Name like lbsql{'%" + key + "%'} or Product_Number like lbsql{'%" + key + "%'})";
            }
            PageSize = RequestTool.getpageSize(25);
            //PageSize = 100;
            page = RequestTool.RequestInt("page");
            pros = B_Lebi_Order_Product.GetList(where, "id desc", PageSize, page);
            int recordCount = B_Lebi_Order_Product.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&key=" + key + "&orderkey=" + orderkey + "&supplier_id=" + supplier_id + "&dateTo=" + dateTo + "&dateFrom=" + dateFrom + "&IsPay=" + IsPay + "&Pay_id=" + Pay_id + "&Transport_id=" + Transport_id, page, PageSize, recordCount);
            where      = Server.UrlEncode(where);
            pays       = B_Lebi_Pay.GetList("", "Sort desc");
            transports = B_Lebi_Transport.GetList("", "Sort desc");
            //Response.Write(where);
        }