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); CurrentPage = B_Lebi_Theme_Page.GetModel("Code='P_UserOrderDetails'"); id = Rint("id"); 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.Type_id_OrderType == 212) { Response.Redirect(URL("P_UserReturnDetails", id)); } path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">»</em><a href=\"" + URL("P_UserCenter", "") + "\"><span>" + Tag("会员中心") + "</span></a><em>»</em><a href=\"" + URL("P_UserOrders", "") + "\"><span>" + Tag("我的订单") + "</span></a><em>»</em><a href=\"" + URL("P_UserOrderDetails", id) + "\"><span>" + Tag("订单") + ":" + order.Code + "</span></a>"; CurrentPage = B_Lebi_Theme_Page.GetModel("Code='P_UserOrderDetails'"); id = Rint_Para("0"); 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"); pay = B_Lebi_Pay.GetModel(order.Pay_id); if (pay == null) { pay = new Lebi_Pay(); } }
protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode) { LoadTheme(themecode, siteid, languagecode, pcode); int id = Rint_Para("0"); comment = B_Lebi_Comment.GetModel(id); if (comment.id == 0) { Response.Redirect(URL("P_404", "")); Response.End(); } product = GetProduct(comment.Keyid); string where = "Parentid =" + id; comments = B_Lebi_Comment.GetList(where, "id desc", PageSize, pageindex); int recordCount = B_Lebi_Comment.Counts(where); PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?page={0}&id=" + id, pageindex, PageSize, recordCount, CurrentLanguage); ProductStar = Convert.ToInt32(product.Star_Comment); if (ProductStar > 5) { ProductStar = 5; } if (ProductStar < 0) { ProductStar = 0; } pro_type = B_Lebi_Pro_Type.GetModel(product.Pro_Type_id); path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">»</em>"; if (pro_type != null) { string[,] parr = Categorypath(pro_type.id); for (int i = 0; i <= parr.GetUpperBound(0); i++) { path += "<a href=\"" + URL("P_ProductCategory", "" + parr[i, 0] + "") + "\"><span>" + parr[i, 1] + "</span></a><em>»</em>"; } } path += "<a href=\"" + URL("P_Product", product.id) + "\"><span>" + Lang(product.Name) + "</span></a><em>»</em>"; path += "<a><span>" + Tag("晒单") + "</span></a>"; //path += "<a href=\"" + URL("P_Product", id) + "\"><span>" + Lang(product.Name) + "</span></a>"; smalls = comment.ImagesSmall.Split('@'); bigs = comment.Images.Split('@'); if (bigs.Count() > 1) { DefaultImage = bigs[1]; } productcomments = B_Lebi_Comment.GetList("TableName='Product' and Keyid=" + comment.Keyid + " and id!=" + comment.id + "", "id desc", 5, 1); }
protected int ProductStar;//整数的商品评分,最大为5 protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode) { LoadTheme(themecode, siteid, languagecode, pcode); int id = Rint_Para("0"); product = GetProduct(id); if (product.id == 0) { Response.Redirect(URL("P_404", "")); Response.End(); } string where = "Parentid = 0 and TableName = 'Product' and (Keyid = " + id + ""; if (product.Product_id != 0) { where += " or Product_id = " + product.Product_id + ""; } where += ") and (Status = 281 or User_id = " + CurrentUser.id + ")"; comments = B_Lebi_Comment.GetList(where, "id desc", PageSize, pageindex); int recordCount = B_Lebi_Comment.Counts(where); PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?page={0}&id=" + id, pageindex, PageSize, recordCount, CurrentLanguage); ProductStar = Convert.ToInt32(product.Star_Comment); if (ProductStar > 5) { ProductStar = 5; } if (ProductStar < 0) { ProductStar = 0; } pro_type = B_Lebi_Pro_Type.GetModel(product.Pro_Type_id); path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">»</em>"; if (pro_type != null) { string[,] parr = Categorypath(pro_type.id); for (int i = 0; i <= parr.GetUpperBound(0); i++) { path += "<a href=\"" + URL("P_ProductCategory", "" + parr[i, 0] + "") + "\"><span>" + parr[i, 1] + "</span></a><em>»</em>"; } } path += "<a href=\"" + URL("P_Product", product.id) + "\"><span>" + Lang(product.Name) + "</span></a><em>»</em>"; path += "<a><span>" + Tag("商品评论") + "</span></a>"; }
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\">»</em><a href=\"" + URL("P_UserCenter", "") + "\"><span>" + Tag("会员中心") + "</span></a><em>»</em><a href=\"" + URL("P_UserAsk", "") + "\"><span>" + Tag("商品咨询") + "</span></a>"; key = Rstring("key"); dateFrom = Rstring("dateFrom"); dateTo = Rstring("dateTo"); DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom"); DateTime lbsql_dateTo = RequestTool.RequestDate("dateTo"); status = RequestTool.RequestInt("status", 0); types = B_Lebi_Type.GetList("Class='AskStatus'", "sort desc"); pageindex = RequestTool.RequestInt("page", 1); where = "Parentid = 0 and TableName = 'Product_Ask' and User_id=" + CurrentUser.id + ""; if (key != "") { where += " and (Content like lbsql{'%" + key + "%'})"; } if (dateFrom != "" && dateTo != "") { where += " and (datediff(d,Time_Add,'" + lbsql_dateFrom + "')<=0 and datediff(d,Time_Add,'" + lbsql_dateTo + "')>=0)"; } if (status > 0) { where += " and (Status = " + status + ")"; } comments = B_Lebi_Comment.GetList(where, "id desc", PageSize, pageindex); foreach (Shop.Model.Lebi_Comment c in comments) { c.IsRead = 1; B_Lebi_Comment.Update(c); } int recordCount = B_Lebi_Comment.Counts(where); PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?page={0}&key=" + key + "&status=" + status + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "", pageindex, PageSize, recordCount, CurrentLanguage); }