protected void Page_Load(object sender, EventArgs e) { if (!Power("supplier_order_edit", "编辑订单")) { NewPageNoPower(); } int id = RequestTool.RequestInt("id", 0); model = B_Lebi_Order.GetModel("Supplier_id = " + CurrentSupplier.id + " and id = " + id); if (model == null) { PageError(); return; } else { shop = CurrentSupplier; if (shop == null) { shop = new Lebi_Supplier(); } if (CurrentSupplier.id != model.Supplier_id) { PageError(); return; } } if (model.Type_id_OrderType == 212) { str = "- "; } //if (model.Type_id_OrderType == 212) // Response.Redirect("Torder_view.aspx?id=" + id); pros = B_Lebi_Order_Product.GetList("Order_id=" + model.id + "", ""); Logs = B_Lebi_Log.GetList("TableName='Order' and Keyid='" + model.id + "'", "id desc"); torders = B_Lebi_Transport_Order.GetList("Order_id=" + model.id + "", "id desc"); comms = B_Lebi_Comment.GetList("TableName='Order' and Keyid=" + model.id + "", "id desc"); langs = Language.Languages(); Lebi_Bill bill = B_Lebi_Bill.GetModel("Order_id=" + model.id + ""); if (bill == null) { billstatus = Tag("不开发票"); } else { billstatus = Tag(EX_Type.TypeName(bill.Type_id_BillStatus)); } TransportCount = B_Lebi_Transport_Order.Counts("Order_id=" + model.id + ""); CommentCount = B_Lebi_Comment.Counts("TableName='Order' and Keyid=" + model.id + ""); LogCount = B_Lebi_Log.Counts("TableName='Order' and Keyid='" + model.id + "'"); deliveries = B_Lebi_Supplier_Delivery.GetList("Supplier_id = " + model.Supplier_id + "", "Sort desc"); DeliveryCount = B_Lebi_Supplier_Delivery.Counts("Supplier_id = " + model.Supplier_id + ""); }
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); }
public void LoadPage() { int PageSize = RequestTool.RequestInt("pagesize", 10); pageindex = RequestTool.RequestInt("page", 1); id = RequestTool.RequestInt("id", 0); product_id = RequestTool.RequestInt("product_id", 0); string where = "Parentid = 0 and TableName = 'Product' and (Keyid = " + id + ""; if (product_id != 0) { where += " or Product_id = " + product_id + ""; } where += ") and (Status = 281 or User_id = " + CurrentUser.id + ")"; models = 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 + "#tab", pageindex, PageSize, recordCount, CurrentLanguage); model = GetProduct(id); //获取星级评分人数 string Starwhere = "Parentid = 0 and TableName = 'Product' and (Keyid = " + id + ""; if (product_id != 0) { Starwhere += " or Product_id = " + product_id + ""; } Starwhere += ")"; Star5Count = B_Lebi_Comment.Counts(Starwhere + " and Star = 5"); Star4Count = B_Lebi_Comment.Counts(Starwhere + " and Star = 4"); Star3Count = B_Lebi_Comment.Counts(Starwhere + " and Star = 3"); Star2Count = B_Lebi_Comment.Counts(Starwhere + " and Star = 2"); Star1Count = B_Lebi_Comment.Counts(Starwhere + " and Star = 1"); if (model.Count_Comment == 0) { Star5Percent = 0; Star4Percent = 0; Star3Percent = 0; Star2Percent = 0; Star1Percent = 0; } else { Star5Percent = Star5Count / model.Count_Comment * 100; Star4Percent = Star4Count / model.Count_Comment * 100; Star3Percent = Star3Count / model.Count_Comment * 100; Star2Percent = Star2Count / model.Count_Comment * 100; Star1Percent = Star1Count / model.Count_Comment * 100; } }
public void LoadPage() { id = RequestTool.RequestInt("id", 0); product_id = RequestTool.RequestInt("product_id", 0); pageindex = RequestTool.RequestInt("page", 1); int PageSize = RequestTool.RequestInt("pagesize", 10); string where = "Parentid = 0 and TableName = 'Product_Ask' and (Keyid = " + id + ""; if (product_id != 0) { where += " or Product_id = " + product_id + ""; } where += ") and (Status = 283 or User_id = " + CurrentUser.id + ")"; models = 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 + "#tab", pageindex, PageSize, recordCount, CurrentLanguage); }
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); NextPage = "?page=" + (pageindex + 1) + "&id=" + id + ""; 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 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); PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?page={0}&key=" + key + "&status=" + status + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "", pageindex, PageSize, recordCount, CurrentLanguage); NextPage = "?page=" + (pageindex + 1) + "&key=" + key + "&status=" + status + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + ""; }
/// <summary> /// 晒单加载更多 /// </summary> /// <returns></returns> public void OrderShare() { int page = RequestTool.RequestInt("page", 1); int wap = RequestTool.RequestInt("wap", 0); List <Lebi_Comment> models = B_Lebi_Comment.GetList("TableName='Product' and Images!='' and Status=281", "id desc", 10, page); string str = ""; foreach (Lebi_Comment model in models) { int Count = B_Lebi_Comment.Counts("TableName='Product' and Parentid = " + model.id); string[] images = model.Images.Split('@'); str += "<div class=\"item\">"; str += "<div class=\"itembox\">"; str += "<div class=\"item_img\">"; str += "<p><a href=\"" + URL("P_ProductCommentDetails", model.id) + "\""; if (wap == 0) { str += " target=\"_blank\""; } str += ">"; str += "<img src=\"" + Image(images[1]) + "\"></a></p>"; str += "</div>"; str += "<div class=\"item_content\">"; str += "<h5>" + model.User_UserName + "</h5>"; str += "<p>" + model.Content + "</p>"; str += "</div>"; str += "<div class=\"item_bottom\">"; str += "<a class=\"leaveAMsg\" href=\"" + URL("P_ProductCommentDetails", model.id) + "\""; if (wap == 0) { str += " target=\"_blank\""; } str += ">" + Count + "</a>"; str += "</div>"; str += "</div>"; str += "</div>"; } Response.Write(str); }
protected void Page_Load(object sender, EventArgs e) { if (!Power("supplier_ask", "商品咨询")) { PageReturnMsg = PageNoPowerMsg(); } PageSize = RequestTool.getpageSize(25); lang = RequestTool.RequestString("lang"); key = RequestTool.RequestString("key"); 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 = "Supplier_id = " + CurrentSupplier.id + " and Parentid = 0 and TableName = 'Product_Ask'"; if (key != "") { where += " and Content like lbsql{'%" + key + "%'}"; } if (status > 0) { where += " and Status like lbsql{'%" + status + "%'}"; } if (lang != "") { where += " and Language_Code = lbsql{'" + lang + "'}"; } if (dateFrom != "" && dateTo != "") { where += " and (datediff(d,Time_Add,'" + FormatDate(lbsql_dateFrom) + "')<=0 and datediff(d,Time_Add,'" + FormatDate(lbsql_dateTo) + "')>=0)"; } models = B_Lebi_Comment.GetList(where, "id desc", PageSize, page); int recordCount = B_Lebi_Comment.Counts(where); PageString = Shop.Bussiness.Pager.GetPaginationString("?page={0}&lang=" + lang + "&status=" + status + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&&key=" + key, page, PageSize, recordCount); }
protected void Page_Load(object sender, EventArgs e) { if (!EX_Admin.Power("comment_list", "商品评价列表")) { PageReturnMsg = PageNoPowerMsg(); } PageSize = RequestTool.getpageSize(25); lang = RequestTool.RequestString("lang"); key = RequestTool.RequestString("key"); 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 = "Parentid = 0 and TableName = 'Product'"; if (key != "") { where += " and Content like lbsql{'%" + key + "%'}"; } if (status > 0) { where += " and Status like lbsql{'%" + status + "%'}"; } if (lang != "") { where += " and Language_Code = lbsql{'" + lang + "'}"; } if (dateFrom != "" && dateTo != "") { where += " and Time_Add>='" + FormatDate(lbsql_dateFrom) + "' and Time_Add<='" + FormatDate(lbsql_dateTo) + " 23:59:59'"; } models = B_Lebi_Comment.GetList(where, "id desc", PageSize, page); int recordCount = B_Lebi_Comment.Counts(where); PageString = Pager.GetPaginationString("?page={0}&lang=" + lang + "&status=" + status + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&&key=" + key, page, PageSize, recordCount); }
protected void Page_Load(object sender, EventArgs e) { if (!EX_Admin.Power("order_edit", "编辑订单")) { NewPageNoPower(); } int id = RequestTool.RequestInt("id", 0); model = B_Lebi_Order.GetModel(id); if (model == null) { model = new Lebi_Order(); shop = new Lebi_Supplier(); } else { if (model.Supplier_id > 0) { shop = B_Lebi_Supplier.GetModel(model.Supplier_id); } if (shop == null) { shop = new Lebi_Supplier(); } if (domain3admin && CurrentAdmin.Site_ids != "") { if (!("," + CurrentAdmin.Site_ids + ",").Contains("," + model.Site_id + ",")) { PageError(); return; } } } if (model.Type_id_OrderType == 212) { str = "- "; } //if (model.Type_id_OrderType == 212) // Response.Redirect("Torder_view.aspx?id=" + id); pros = B_Lebi_Order_Product.GetList("Order_id=" + model.id + "", ""); Logs = B_Lebi_Log.GetList("TableName='Order' and Keyid='" + model.id + "'", "id desc"); torders = B_Lebi_Transport_Order.GetList("Order_id=" + model.id + "", "id desc"); comms = B_Lebi_Comment.GetList("TableName='Order' and Keyid=" + model.id + "", "id desc"); langs = Language.Languages(); Lebi_Bill bill = B_Lebi_Bill.GetModel("Order_id=" + model.id + ""); if (bill == null) { billstatus = Tag("不开发票"); } else { billstatus = EX_Type.TypeName(bill.Type_id_BillStatus); } TransportCount = B_Lebi_Transport_Order.Counts("Order_id=" + model.id + ""); CommentCount = B_Lebi_Comment.Counts("TableName='Order' and Keyid=" + model.id + ""); LogCount = B_Lebi_Log.Counts("TableName='Order' and Keyid='" + model.id + "'"); deliveries = B_Lebi_Supplier_Delivery.GetList("Supplier_id = " + model.Supplier_id + "", "Sort desc"); DeliveryCount = B_Lebi_Supplier_Delivery.Counts("Supplier_id = " + model.Supplier_id + ""); if (model.Promotion_Type_ids != "") { //List<Lebi_Promotion_Type> Promotions = B_Lebi_Promotion_Type.GetList("id in (" + model.Promotion_Type_ids + ")", ""); //foreach (Lebi_Promotion_Type p in Promotions) //{ // if (Promotion == "") // Promotion = Lang(p.Name); // else // Promotion += "<br/>" + Lang(p.Name); //} Promotion = Lang(model.Promotion_Type_Name); } }
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_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 (datediff(d,Time_Add,'" + FormatDate(lbsql_dateFrom) + "')<=0 and datediff(d,Time_Add,'" + FormatDate(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); //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 (datediff(d,Time_Add,'" + FormatDate(lbsql_dateFrom) + "')<=0 and datediff(d,Time_Add,'" + FormatDate(lbsql_dateTo) + "')>=0)"; } 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 + ""; }