예제 #1
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);
            if (SYS.IsClosetuihuo == "1")
            {
                PageError();
            }
            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_UserReturn", "") + "\"><span>" + Tag("退货订单") + "</span></a>";
            key      = Rstring("key");
            dateFrom = Rstring("dateFrom");
            dateTo   = Rstring("dateTo");
            status   = Rstring("status");
            DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom");
            DateTime lbsql_dateTo   = RequestTool.RequestDate("dateTo");

            pageindex = RequestTool.RequestInt("page", 1);
            where     = "User_id=" + CurrentUser.id + " and Type_id_OrderType=212";
            if (key != "")
            {
                where += " and id in (select Order_id from Lebi_Order_Product where Product_Name like lbsql{'%" + key + "%'})";
            }
            if (dateFrom != "" && dateTo != "")
            {
                where += " and Time_Add>='" + FormatDate(lbsql_dateFrom) + "' and Time_Add<='" + FormatDate(lbsql_dateTo) + " 23:59:59'";
            }
            orders = B_Lebi_Order.GetList(where, "id desc", PageSize, pageindex);
            int recordCount = B_Lebi_Order.Counts(where);

            PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?page={0}&key=" + key + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "", pageindex, PageSize, recordCount, CurrentLanguage);
            NextPage   = "?page=" + (pageindex + 1) + "&key=" + key + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "";
        }
예제 #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_UserOrders", "") + "\"><span>" + Tag("我的订单") + "</span></a>";
            key      = Rstring("key");
            dateFrom = Rstring("dateFrom");
            dateTo   = Rstring("dateTo");
            status   = Rstring("status");
            DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom");
            DateTime lbsql_dateTo   = RequestTool.RequestDate("dateTo");

            pageindex = RequestTool.RequestInt("page", 1);
            where     = "(IsDel!=1 or IsDel is null) and User_id=" + CurrentUser.id + " and Type_id_OrderType=211";
            if (key != "")
            {
                where += " and (Code like lbsql{'%" + key + "%'} or T_Name like lbsql{'%" + key + "%'} or id in (select Order_id from Lebi_Order_Product where Product_Name like lbsql{'%" + key + "%'}))";
            }
            if (dateFrom != "" && dateTo != "")
            {
                where += " and (datediff(d,Time_Add,'" + FormatDate(lbsql_dateFrom) + "')<=0 and datediff(d,Time_Add,'" + FormatDate(lbsql_dateTo) + "')>=0)";
            }
            if (status == "1")
            {
                where += " and IsPaid = 0 and IsInvalid=0";
            }
            if (status == "2")
            {
                where += " and (IsShipped = 1 or IsPaid=1) and IsReceived_All=0";
            }
            if (status == "3")
            {
                where += " and IsReceived = 1";
            }
            if (status == "4")
            {
                where += " and IsCompleted = 1";
            }
            if (status == "5")
            {
                where += " and IsInvalid = 1";
            }
            orders = B_Lebi_Order.GetList(where, "id desc", PageSize, pageindex);
            int recordCount = B_Lebi_Order.Counts(where);

            PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?page={0}&status=" + status + "&key=" + key + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "", pageindex, PageSize, recordCount, CurrentLanguage);
            NextPage   = "?page=" + (pageindex + 1) + "&status=" + status + "&key=" + key + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "";
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            type     = RequestTool.RequestString("type");
            key      = RequestTool.RequestString("key");
            dateFrom = RequestTool.RequestString("dateFrom");
            dateTo   = RequestTool.RequestString("dateTo");
            t        = RequestTool.RequestInt("t", 211);
            mark     = RequestTool.RequestString("mark");
            DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom");
            DateTime lbsql_dateTo   = RequestTool.RequestDate("dateTo");

            su = new SearchOrder(CurrentAdmin, CurrentLanguage.Code);
            if (t == 212)
            {
                if (!EX_Admin.Power("order_return_list", "退货订单列表"))
                {
                    PageReturnMsg = PageNoPowerMsg();
                }
            }
            else
            {
                if (!EX_Admin.Power("order_list", "订单列表"))
                {
                    PageReturnMsg = PageNoPowerMsg();
                }
            }

            string where = "(IsDel!=1 or IsDel is null) and Type_id_OrderType=" + t + su.SQL;
            if (key != "")
            {
                where += " and (Code like lbsql{'%" + key + "%'} or User_UserName like lbsql{'%" + key + "%'} or T_Name like lbsql{'%" + key + "%'} or Transport_Name like lbsql{'%" + key + "%'})";
            }
            if (dateFrom != "" && dateTo != "")
            {
                where += " and (datediff(d,Time_Add,'" + FormatDate(lbsql_dateFrom) + "')<=0 and datediff(d,Time_Add,'" + FormatDate(lbsql_dateTo) + "')>=0)";
            }

            switch (type.ToLower())
            {
            case "1":
                where += " and IsVerified = 0 and IsInvalid = 0";
                break;

            case "2":
                where += " and IsVerified = 1 and IsInvalid = 0";
                break;

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

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

            case "5":
                where += " and IsVerified = 1 and IsShipped = 0 and IsInvalid = 0";
                break;

            case "6":
                where += " and IsVerified = 1 and IsShipped_All= 1 and IsInvalid = 0";
                break;

            case "7":
                where += " and IsVerified = 1 and IsShipped = 1 and IsShipped_All= 0 and IsInvalid = 0";
                break;

            case "8":
                where += " and IsVerified = 1 and IsReceived = 0 and IsInvalid = 0";
                break;

            case "9":
                where += " and IsVerified = 1 and IsReceived = 1 and IsInvalid = 0";
                break;

            case "10":
                where += " and IsVerified = 1 and IsCompleted = 1 and IsInvalid = 0";
                break;

            case "11":
                where += " and IsInvalid = 1";
                break;

            case "12":
                where += " and IsRefund = 2";
                break;

            case "13":
                where += " and IsRefund = 1";
                break;
            }
            if (mark != "")
            {
                where += " and Mark = " + int.Parse(mark);
            }
            //if (Supplier_id > 0)
            //    where += " and Supplier_id = " + Supplier_id;
            //if (user_id > 0)
            //    where += " and User_id = " + user_id;
            if (domain3admin && CurrentAdmin.Site_ids != "")
            {
                where += " and (Site_id in (" + CurrentAdmin.Site_ids + ") or Site_id=0)";
            }


            PageSize = RequestTool.getpageSize(25);
            //if (product_id > 0)
            //{
            //    Lebi_Product pro = B_Lebi_Product.GetModel(product_id);
            //    if (pro != null)
            //    {
            //        if (pro.Product_id == 0)
            //        {
            //            string pids = "";
            //            List<Lebi_Product> ps = B_Lebi_Product.GetList("Product_id=" + product_id + "", "");
            //            if (ps.Count > 0)
            //            {
            //                foreach (Lebi_Product p in ps)
            //                {
            //                    pids += p.id + ",";
            //                }
            //                pids = pids.TrimEnd(',');
            //                where += " and id in (select Order_id from Lebi_Order_Product where Product_id in (" + pids + "))";
            //            }
            //            else
            //            {
            //                where += " and id in (select Order_id from Lebi_Order_Product where Product_id=" + product_id + ")";
            //            }
            //        }
            //        else
            //        {
            //            where += " and id in (select Order_id from Lebi_Order_Product where Product_id=" + product_id + ")";
            //        }
            //    }
            //}
            models = B_Lebi_Order.GetList(where, "id desc", PageSize, page);
            int recordCount = B_Lebi_Order.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&t=" + t + "&type=" + type + "&mark=" + mark + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&key=" + key + "&" + su.URL, page, PageSize, recordCount);
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("statis_orderproduct", "订单报表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            key          = RequestTool.RequestString("key");
            peisongdian  = RequestTool.RequestString("peisongdian");
            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 IsPaid = " + IsPay;
            }
            if (Pay_id != 0)
            {
                where += " and Pay_id = " + Pay_id;
            }
            if (Transport_id != 0)
            {
                where += " and Transport_id = " + Transport_id;
            }
            if (dateFrom != "" && dateTo != "")
            {
                where += " and Time_Add>='" + dateFrom + "' and Time_Add<='" + dateTo + " 23:59:59'";
            }
            if (supplier_id != "")
            {
                try
                {
                    supplier_id = Convert.ToInt32(supplier_id).ToString();
                }
                catch
                {
                    supplier_id = "0";
                }
                where += " and Supplier_id = " + supplier_id;
            }
            if (peisongdian != "")
            {
                where += " and  Supplier_Delivery_id  in (select w.id from [Lebi_Supplier_Delivery] as w where w.Name like '%" + peisongdian + "%')";
            }

            if (key != "")
            {
                where += " and (Code like lbsql{'%" + key + "%'} or T_Name like lbsql{'%" + key + "%'}))";
            }
            PageSize = RequestTool.getpageSize(25);
            page     = RequestTool.RequestInt("page");
            orders   = B_Lebi_Order.GetList(where, "id desc", PageSize, page);
            int recordCount = B_Lebi_Order.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&key=" + key + "&peisongdian=" + peisongdian + "&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);
        }
예제 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            type     = RequestTool.RequestString("type");
            key      = RequestTool.RequestString("key");
            dateFrom = RequestTool.RequestString("dateFrom");
            dateTo   = RequestTool.RequestString("dateTo");
            t        = RequestTool.RequestInt("t", 211);
            mark     = RequestTool.RequestString("mark");
            if (t == 212)
            {
                if (!Power("supplier_order_return_list", "退货订单列表"))
                {
                    PageReturnMsg = PageNoPowerMsg();
                }
            }
            else
            {
                if (!Power("supplier_order_list", "订单列表"))
                {
                    PageReturnMsg = PageNoPowerMsg();
                }
            }
            DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom");
            DateTime lbsql_dateTo   = RequestTool.RequestDate("dateTo");

            //string where = "Supplier_id = " + CurrentSupplier.id + " and Type_id_OrderType = 213 and IsVerified=1";
            string where = "Supplier_id = " + CurrentSupplier.id + " and Type_id_OrderType = " + t;
            if (key != "")
            {
                where += " and (Code like lbsql{'%" + key + "%'} or User_UserName like lbsql{'%" + key + "%'} or T_Name like lbsql{'%" + key + "%'} or Transport_Name like lbsql{'%" + key + "%'})";
            }
            if (dateFrom != "" && dateTo != "")
            {
                where += " and (datediff(d,Time_Add,'" + FormatDate(lbsql_dateFrom) + "')<=0 and datediff(d,Time_Add,'" + FormatDate(lbsql_dateTo) + "')>=0)";
            }
            switch (type.ToLower())
            {
            case "1":
                where += " and IsVerified = 0 and IsInvalid = 0";
                break;

            case "2":
                where += " and IsVerified = 1 and IsInvalid = 0";
                break;

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

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

            case "5":
                where += " and IsVerified = 1 and IsShipped = 0 and IsInvalid = 0";
                break;

            case "6":
                where += " and IsVerified = 1 and IsShipped = 1 and IsInvalid = 0";
                break;

            case "7":
                where += " and IsVerified = 1 and IsShipped_All = 1 and IsInvalid = 0";
                break;

            case "8":
                where += " and IsVerified = 1 and IsReceived = 0 and IsInvalid = 0";
                break;

            case "9":
                where += " and IsVerified = 1 and IsReceived = 1 and IsInvalid = 0";
                break;

            case "10":
                where += " and IsVerified = 1 and IsCompleted = 1 and IsInvalid = 0";
                break;

            case "11":
                where += " and IsInvalid = 1";
                break;

            case "12":
                where += " and IsRefund = 2";
                break;

            case "13":
                where += " and IsRefund = 1";
                break;
            }
            if (mark != "")
            {
                where += " and Mark = " + int.Parse(mark);
            }
            PageSize = RequestTool.getpageSize(25);

            models = B_Lebi_Order.GetList(where, "id desc", PageSize, page);
            int recordCount = B_Lebi_Order.Counts(where);

            PageString = Shop.Bussiness.Pager.GetPaginationString("?page={0}&t=" + t + "&type=" + type + "&mark=" + mark + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&key=" + key, page, PageSize, recordCount);
        }