Ejemplo n.º 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);
     id          = Rint("id");
     CurrentPage = B_Lebi_Theme_Page.GetModel("Code='P_UserOrderDetails'");
     order       = B_Lebi_Order.GetModel("User_id = " + CurrentUser.id + " and id = " + id + "");
     if (order == null)
     {
         PageError();
     }
     if (order.User_id != CurrentUser.id)
     {
         PageError();
     }
     if (order.IsShipped == 0)
     {
         Response.Redirect(URL("P_UserReturnShip", id));
     }
     if (order.Type_id_OrderType == 211)
     {
         Response.Redirect(URL("P_UserOrderDetails", id));
     }
     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><em>&raquo;</em><a href=\"" + URL("P_UserReturnDetails", id) + "\"><span>" + Tag("订单") + ":" + order.Code + "</span></a>";
     comments         = B_Lebi_Comment.GetList("TableName='Order' and Keyid=" + order.id, "id desc");
     transport_orders = B_Lebi_Transport_Order.GetList("Order_id=" + order.id, "id desc");
     bills            = B_Lebi_Bill.GetList("Order_id=" + order.id, "id desc");
     order_products   = B_Lebi_Order_Product.GetList("Order_id=" + order.id, "id desc");
 }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("bill_edit", "修改发票"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            t        = RequestTool.RequestInt("t", 0);
            status   = RequestTool.RequestInt("status", 0);
            dateFrom = RequestTool.RequestString("dateFrom");
            dateTo   = RequestTool.RequestString("dateTo");
            DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom");
            DateTime lbsql_dateTo   = RequestTool.RequestDate("dateTo");

            string where = "1=1";
            if (t > 0)
            {
                where += "and Type_id_BillType=" + t;
            }
            if (status > 0)
            {
                where += "and Type_id_BillStatus=" + status;
            }
            if (dateFrom != "" && dateTo != "")
            {
                where += " and (datediff(d,Time_Add,'" + FormatDate(lbsql_dateFrom) + "')<=0 and datediff(d,Time_Add,'" + FormatDate(lbsql_dateTo) + "')>=0)";
            }
            PageSize = RequestTool.getpageSize(25);

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

            PageString = Pager.GetPaginationString("?page={0}&t=" + t + "&status=" + status + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo, page, PageSize, recordCount);
        }