private void DelBuy() { string info = Utils.GetRequest("info", "all", 1, "", ""); int meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login(); } int id = int.Parse(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误")); if (info != "ok") { Master.Title = "删除订单"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("确定删除此订单记录吗"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("myshop.aspx?info=ok&act=del&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">确定删除</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("myshop.aspx?act=view&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">先留着吧..</a>"); builder.Append(Out.Tab("</div>", "")); } else { if (!new BCW.BLL.Buylist().Exists(id, meid, 0)) { Utils.Error("订单已通过审核或订单不存在", ""); } //得到实体 BCW.Model.Buylist model = new BCW.BLL.Buylist().GetBuylistMe(id); //更新购买人数 new BCW.BLL.Goods().UpdatePaycount(model.GoodsId, -1); //更新出售数量 new BCW.BLL.Goods().UpdateSellCount(model.GoodsId, model.Paycount); //删除 new BCW.BLL.Buylist().Delete(id); //读取商品实体 BCW.Model.Goods modelGoods = new BCW.BLL.Goods().GetGoods(model.GoodsId); if (modelGoods != null) { if (modelGoods.PostType == 1) { new BCW.BLL.User().UpdateiGold(model.UserId, model.UserName, Convert.ToInt64(model.AcPrice), "购买商品《" + modelGoods.Title + "》"); //发信给下订单的会员 new BCW.BLL.Guest().Add(model.UserId, model.UserName, "您已成功删除订单[url=/shopdetail.aspx?id=" + model.GoodsId + "]" + modelGoods.Title + "[/url],返还您" + Convert.ToInt64(model.AcPrice) + "" + ub.Get("SiteBz") + ",欢迎再次购买![br][url=/myshop.aspx]>我的订单[/url]"); } else if (modelGoods.PostType == 2) { new BCW.BLL.User().UpdateiMoney(model.UserId, model.UserName, Convert.ToInt64(model.AcPrice), "购买商品《" + modelGoods.Title + "》"); //发信给下订单的会员 new BCW.BLL.Guest().Add(model.UserId, model.UserName, "您已成功删除订单[url=/shopdetail.aspx?id=" + model.GoodsId + "]" + modelGoods.Title + "[/url],返还您" + Convert.ToInt64(model.AcPrice) + "" + ub.Get("SiteBz2") + ",欢迎再次购买![br][url=/myshop.aspx]>我的订单[/url]"); } } Utils.Success("删除订单", "删除订单成功..", Utils.getUrl("myshop.aspx?backurl=" + Utils.getPage(0) + ""), "1"); } }
private void EditBuy() { int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误")); if (!new BCW.BLL.Buylist().Exists(id)) { Utils.Error("不存在的记录", ""); } BCW.Model.Buylist model = new BCW.BLL.Buylist().GetBuylist(id); Master.Title = "修改订单"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("修改用户订单"); builder.Append(Out.Tab("</div>", "")); //是否已评价标识 int Ispn = 0; if (string.IsNullOrEmpty(model.LaNotes)) { Ispn = 1; } string strText = "姓名:/,电话:/,送货地址:/,用户备注:/,用户评价:/,实收金额(元):/,,,,"; string strName = "RealName,Mobile,Address,Notes,LaNotes,AcPrice,id,backurl,act,Ispn"; string strType = "text,text,text,text,text,num,hidden,hidden,hidden,hidden"; string strValu = "" + model.RealName + "'" + model.Mobile + "'" + model.Address + "'" + model.Notes + "'" + model.LaNotes + "'" + Convert.ToInt32(model.AcPrice) + "'" + id + "'" + Utils.getPage(0) + "'save'" + Ispn + ""; string strEmpt = "false,false,false,true,true,false,false"; string strIdea = "/"; string strOthe = "修改|reset,shopbuy.aspx,post,1,red|blue"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?act=view&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">返回上一级</a><br />"); if (Utils.getPage(1) != "") { builder.Append(" <a href=\"" + Utils.getPage(1) + "\">返回订单管理</a><br />"); } builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>")); builder.Append(Out.Tab("</div>", "<br />")); }
private void InfoBuylist() { int id = int.Parse(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误")); if (!new BCW.BLL.Goods().Exists(id)) { Utils.Error("不存在的记录", ""); } int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[0-1]$", "0")); string sTitle = string.Empty; if (ptype == 0) { sTitle = "成交列表"; } else { sTitle = "评价列表"; } Master.Title = sTitle; builder.Append(Out.Tab("<div class=\"title\">" + sTitle + "</div>", "")); int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = ""; string[] pageValUrl = { "ptype", "id", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //查询条件 strWhere += " GoodsId=" + id + ""; if (ptype == 1) { strWhere += " and LaNotes IS NOT NULL"; } // 开始读取列表 IList <BCW.Model.Buylist> listBuylist = new BCW.BLL.Buylist().GetBuylists(pageIndex, pageSize, strWhere, out recordCount); if (listBuylist.Count > 0) { int k = 1; foreach (BCW.Model.Buylist n in listBuylist) { if (k % 2 == 0) { builder.Append(Out.Tab("<div class=\"text\">", Out.Hr())); } else { if (k == 1) { builder.Append(Out.Tab("<div>", "")); } else { builder.Append(Out.Tab("<div>", Out.Hr())); } } //recordCount - (((pageIndex - 1) * pageSize) + (k - 1)) if (ptype == 0) { builder.AppendFormat("{0}{1}购买{2}件[{3}]", "☆", BCW.User.Users.FormatMobile(n.Mobile), n.Paycount, DT.FormatDate(n.AddTime, 5)); } else { builder.AppendFormat("{0}{1}{2}[{3}]", "☆", BCW.User.Users.FormatMobile(n.Mobile), n.LaNotes, DT.FormatDate(n.AddTime, 5)); } k++; builder.Append(Out.Tab("</div>", "")); } // 分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } else { builder.Append(Out.Div("div", "没有相关记录..")); } builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("shopdetail.aspx?id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">.." + new BCW.BLL.Goods().GetTitle(id) + "</a>"); builder.Append(Out.Tab("</div>", "")); }
private void ReloadPage() { int meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login(); } Master.Title = "我的订单记录"; builder.Append(Out.Tab("<div class=\"title\">我的订单记录</div>", "")); int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = ""; string[] pageValUrl = { "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //查询条件 strWhere = "UserId=" + meid + ""; // 开始读取列表 IList <BCW.Model.Buylist> listBuylist = new BCW.BLL.Buylist().GetBuylists(pageIndex, pageSize, strWhere, out recordCount); if (listBuylist.Count > 0) { int k = 1; foreach (BCW.Model.Buylist n in listBuylist) { if (k % 2 == 0) { builder.Append(Out.Tab("<div class=\"text\">", "<br />")); } else { if (k == 1) { builder.Append(Out.Tab("<div>", "")); } else { builder.Append(Out.Tab("<div>", "<br />")); } } builder.AppendFormat("<a href=\"" + Utils.getUrl("myshop.aspx?act=view&id={0}&backurl=" + Utils.PostPage(1) + "") + "\">{2}.{3}</a>(" + BCW.User.AppCase.CaseBuyStats(n.AcStats) + ")<br />共{4}元.{5}", n.ID, pageIndex, (pageIndex - 1) * pageSize + k, n.Title, Convert.ToDouble(n.AcPrice), DT.FormatDate(n.AddTime, 2)); k++; builder.Append(Out.Tab("</div>", "")); } // 分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } else { builder.Append(Out.Div("div", "没有相关记录..")); } builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("default.aspx") + "\">上级</a>"); builder.Append(Out.Tab("</div>", "")); }
private void ViewBuy() { int id = int.Parse(Utils.GetRequest("id", "get", 1, @"^[0-9]\d*$", "0")); int meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login(); } if (!new BCW.BLL.Buylist().Exists(id, meid)) { Utils.Error("不存在的记录", ""); } BCW.Model.Buylist model = new BCW.BLL.Buylist().GetBuylist(id, meid); Master.Title = "我的订单"; builder.Append(Out.Tab("<div class=\"title\">我的订单</div>", "")); //读取商品实体 BCW.Model.Goods modelGoods = new BCW.BLL.Goods().GetGoods(model.GoodsId); if (modelGoods == null) { Utils.Error("不存在的商品记录", ""); } builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("<a href=\"" + Utils.getUrl("shopdetail.aspx?id=" + model.GoodsId + "&backurl=" + Utils.PostPage(1) + "") + "\">.." + model.Title + "</a>"); builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div>", "<br />")); builder.Append("订单号:" + model.TingNo + ""); builder.Append("<br />单价:"); if (modelGoods.PostType == 0) { builder.Append("¥" + Convert.ToDouble(model.Price) + "元"); } else if (modelGoods.PostType == 1) { builder.Append(Convert.ToDouble(model.Price) + "" + ub.Get("SiteBz")); } else { builder.Append(Convert.ToDouble(model.Price) + "" + ub.Get("SiteBz2")); } builder.Append("<br />购买数量" + model.Paycount + ""); if (model.PostMoney == -1) { builder.Append("送货方式:当面交易"); } else { builder.Append("<br />邮费:"); if (model.PostMoney == 0) { builder.Append("包邮"); } else { builder.Append(model.PostMoney + "元"); } } builder.Append("<br />你的姓名:" + model.RealName + ""); builder.Append("<br />你的电话:" + model.Mobile + ""); builder.Append("<br />送货地址:" + model.Address + ""); builder.Append("<br />备注:" + model.Notes + ""); builder.Append("<br />总金额:"); if (modelGoods.PostType == 0) { builder.Append("¥" + Convert.ToDouble(model.AcPrice) + "元"); } else if (modelGoods.PostType == 1) { builder.Append(Convert.ToDouble(model.AcPrice) + "" + ub.Get("SiteBz")); } else { builder.Append(Convert.ToDouble(model.AcPrice) + "" + ub.Get("SiteBz2")); } builder.Append("<br />状态:" + BCW.User.AppCase.CaseBuyStats(model.AcStats) + ""); //商家信息 if (model.AcStats != 0) { if (!string.IsNullOrEmpty(model.AcEms)) { builder.Append("<br />运单号:" + model.AcEms + ""); } if (!string.IsNullOrEmpty(model.AcText)) { builder.Append("<br />管理员附言:" + model.AcText + ""); } if (!string.IsNullOrEmpty(model.LaNotes)) { builder.Append("<br />您的评价:" + model.LaNotes + ""); } } builder.Append("<br />时间:" + model.AddTime + ""); builder.Append(Out.Tab("</div>", "")); if (model.AcStats == 2) { string strText = "输入评价:/,,,"; string strName = "LaNotes,stats,id,act"; string strType = "text,select,hidden,hidden"; string strValu = "" + model.LaNotes + "'3'" + id + "'ok"; string strEmpt = "true,3|交易成功,false,false"; string strIdea = ""; string strOthe = "确定,myshop.aspx,post,1,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); } if (model.AcStats == 0) { builder.Append(Out.Tab("<div>", "<br />")); builder.Append("<a href=\"" + Utils.getUrl("myshop.aspx?act=del&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">删除此订单</a>"); builder.Append(Out.Tab("</div>", "")); } builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getUrl("shopdetail.aspx?id=" + modelGoods.ID + "&backurl=" + Utils.getPage(0) + "") + "\">上级</a>-"); builder.Append("<a href=\"" + Utils.getUrl("myshop.aspx") + "\">订单记录</a>"); builder.Append(Out.Tab("</div>", "")); }
private void ReloadPage() { int uid = int.Parse(Utils.GetRequest("uid", "all", 1, @"^[0-9]\d*$", "0")); int ptype = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[0-9]\d*$", "0")); int id = int.Parse(Utils.GetRequest("id", "all", 1, @"^[0-9]\d*$", "0")); Master.Title = "商品订单管理"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("商品订单管理"); builder.Append(Out.Tab("</div>", "<br />")); if (id != 0) { if (!new BCW.BLL.Goods().Exists(id)) { Utils.Error("不存在的记录", ""); } string Title = new BCW.BLL.Goods().GetTitle(id); builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("<a href=\"" + Utils.getUrl("../shopdetail.aspx?id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">.." + Title + "</a>"); builder.Append(Out.Tab("</div>", "<br />")); } builder.Append(Out.Tab("<div class=\"text\">", "")); if (ptype == 0) { builder.Append("待审|"); } else { builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?id=" + id + "&uid=" + uid + "&ptype=0&backurl=" + Utils.getPage(0) + "") + "\">待审</a>|"); } if (ptype == 1) { builder.Append("待发|"); } else { builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?id=" + id + "&uid=" + uid + "&ptype=1&backurl=" + Utils.getPage(0) + "") + "\">待发</a>|"); } if (ptype == 2) { builder.Append("已发|"); } else { builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?id=" + id + "&uid=" + uid + "&ptype=2&backurl=" + Utils.getPage(0) + "") + "\">已发</a>|"); } if (ptype == 3) { builder.Append("成功|"); } else { builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?id=" + id + "&uid=" + uid + "&ptype=3&backurl=" + Utils.getPage(0) + "") + "\">成功</a>|"); } if (ptype == 4) { builder.Append("失败"); } else { builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?id=" + id + "&uid=" + uid + "&ptype=4&backurl=" + Utils.getPage(0) + "") + "\">失败</a>"); } builder.Append(Out.Tab("</div>", "<br />")); int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = ""; string[] pageValUrl = { "id", "uid", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //查询条件 if (uid != 0) { strWhere += "userid=" + uid + "and "; } strWhere += " AcStats=" + ptype + ""; // 开始读取列表 IList <BCW.Model.Buylist> listBuylist = new BCW.BLL.Buylist().GetBuylists(pageIndex, pageSize, strWhere, out recordCount); if (listBuylist.Count > 0) { int k = 1; foreach (BCW.Model.Buylist n in listBuylist) { if (k % 2 == 0) { builder.Append(Out.Tab("<div class=\"text\">", "<br />")); } else { if (k == 1) { builder.Append(Out.Tab("<div>", "")); } else { builder.Append(Out.Tab("<div>", "<br />")); } } builder.AppendFormat("<a href=\"" + Utils.getUrl("shopbuy.aspx?act=view&id={0}&backurl=" + Utils.PostPage(true) + "") + "\">{2}.{3}</a>(" + BCW.User.AppCase.CaseBuyStats(n.AcStats) + ")<br />共{4}元.{5}", n.ID, pageIndex, (pageIndex - 1) * pageSize + k, n.Title, Convert.ToDouble(n.AcPrice), DT.FormatDate(n.AddTime, 2)); k++; builder.Append(Out.Tab("</div>", "")); } // 分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } else { builder.Append(Out.Div("div", "没有相关记录..")); } if (id == 0) { string strText = "输入用户ID:/"; string strName = "uid"; string strType = "num"; string strValu = "'"; string strEmpt = "true"; string strIdea = "/"; string strOthe = "搜订单,shopbuy.aspx,post,1,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); } builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); if (Utils.getPage(1) != "") { builder.Append(" <a href=\"" + Utils.getPage(1) + "\">返回上一级</a><br />"); } //商品推广功能 if (Utils.GetDomain().Contains("127.0.0.6") || Utils.GetDomain().Contains("xgbxj.net")) { builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?act=appbank") + "\">推广拥金结算</a><br />"); } builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>")); builder.Append(Out.Tab("</div>", "<br />")); }
private void OkBuy() { int id = int.Parse(Utils.GetRequest("id", "post", 1, @"^[0-9]\d*$", "0")); string AcEms = Utils.GetRequest("AcEms", "post", 3, @"^[A-Za-z0-9]+$", "运单号填写错误"); string AcText = Utils.GetRequest("AcText", "post", 3, @"^[\s\S]{1,300}$", "附言最多300字"); int stats = int.Parse(Utils.GetRequest("stats", "post", 2, @"^[0-4]$", "选择状态错误")); string info = Utils.GetRequest("info", "all", 1, "", ""); if (info != "ok" && (stats == 3 || stats == 4)) { Master.Title = "确定订单"; builder.Append(Out.Tab("<div class=\"title\">", "")); if (stats == 3) { builder.Append("确定把订单记录确认为交易成功吗,确认后不可修改"); } else { builder.Append("确定把订单记录确认为交易失败吗,确认后不可修改"); } builder.Append(Out.Tab("</div>", "<br />")); string strName = "AcEms,AcText,stats,id,act,backurl,info"; string strValu = "" + AcEms + "'" + AcText + "'" + stats + "'" + id + "'ok'" + Utils.getPage(2) + "'ok"; string strOthe = "确认交易,shopbuy.aspx,post,0,red"; builder.Append(Out.wapform(strName, strValu, strOthe)); builder.Append(Out.Tab("<div>", "<br />")); builder.Append(" <a href=\"" + Utils.getUrl("shopbuy.aspx?act=view&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">等待确认</a>"); builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?act=view&id=" + id + "") + "\">返回上一级</a><br />"); builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>")); builder.Append(Out.Tab("</div>", "<br />")); } else { if (!new BCW.BLL.Buylist().Exists(id)) { Utils.Error("不存在的记录", ""); } BCW.Model.Buylist modelBuy = new BCW.BLL.Buylist().GetBuylist(id); if (modelBuy.AcStats == 3 || modelBuy.AcStats == 4) { Utils.Error("此订单已经确认,无法进行更改", ""); } BCW.Model.Buylist model = new BCW.Model.Buylist(); model.ID = id; model.AcText = AcText; model.AcEms = AcEms; model.AcStats = stats; new BCW.BLL.Buylist().UpdateMStats(model); if (stats == 4) { //如果失败,更新出售数量 new BCW.BLL.Goods().UpdateSellCount(modelBuy.GoodsId, -modelBuy.Paycount); } if (stats == 3) { //如果交易成功并有推荐ID,则执行 long ReTar = Utils.ParseInt64(ub.GetSub("BuylistReTar", xmlPath)); if (ReTar > 0) { int InviteNum = new BCW.BLL.User().GetInviteNum(modelBuy.UserId); if (InviteNum > 0) { //计算分成 long gold = Convert.ToInt64(modelBuy.Paycount * modelBuy.Price); long ReFcGold = Convert.ToInt64(gold * ReTar * 0.01); //更新InviteNum分成金额 new BCW.BLL.User().UpdateiFcGold(InviteNum, ReFcGold); BCW.Model.Shoptg tg = new BCW.Model.Shoptg(); tg.ZrID = InviteNum; tg.UsID = modelBuy.UserId; tg.UsName = modelBuy.UserName; tg.Notes = "购买" + modelBuy.Title + "(" + modelBuy.Paycount + "件),分成收入" + ReFcGold + "元"; tg.DetailId = modelBuy.GoodsId; tg.AddTime = DateTime.Now; new BCW.BLL.Shoptg().Add(tg); //发信给推荐ID,提醒分成收入 new BCW.BLL.Guest().Add(InviteNum, new BCW.BLL.User().GetUsName(InviteNum), "恭喜!您推荐的会员[url=/bbs/uinfo.aspx?uid=" + modelBuy.UserId + "]" + modelBuy.UserName + "[/url]成功购买了商品[url=/shopdetail.aspx?id=" + modelBuy.GoodsId + "]《" + modelBuy.Title + "》[/url],你的分成收入增加" + ReFcGold + "元"); } } } //发信给下订单的会员 new BCW.BLL.Guest().Add(modelBuy.UserId, modelBuy.UserName, "您的订单[url=/myshop.aspx?act=view&id=" + id + "]" + modelBuy.Title + "[/url]已变更为" + BCW.User.AppCase.CaseBuyStats(stats) + ""); Utils.Success("确定交易", "确定成功,订单变更为" + BCW.User.AppCase.CaseBuyStats(stats) + "," + modelBuy.UserName + "将收到订单结果的内线..", Utils.getUrl("shopbuy.aspx?act=view&id=" + id + "&backurl=" + Utils.getPage(0) + ""), "1"); } }
private void ViewBuy() { int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误")); if (!new BCW.BLL.Buylist().Exists(id)) { Utils.Error("不存在的记录", ""); } BCW.Model.Buylist model = new BCW.BLL.Buylist().GetBuylist(id); Master.Title = "查看订单"; builder.Append(Out.Tab("<div class=\"title\">查看订单</div>", "")); //读取商品实体 BCW.Model.Goods modelGoods = new BCW.BLL.Goods().GetGoods(model.GoodsId); builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("<a href=\"" + Utils.getUrl("/shopdetail.aspx?id=" + model.GoodsId + "&backurl=" + Utils.PostPage(1) + "") + "\">.." + model.Title + "</a>"); builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div>", "<br />")); builder.Append("购买用户:<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + model.UserId + "&backurl=" + Utils.PostPage(1) + "") + "\">" + model.UserName + "(" + model.UserId + ")</a>"); builder.Append("<br />订单号:" + model.TingNo + ""); builder.Append("<br />单价:"); if (modelGoods.PostType == 0) { builder.Append("¥" + Convert.ToDouble(model.Price) + "元"); } else if (modelGoods.PostType == 1) { builder.Append(Convert.ToDouble(model.Price) + "" + ub.Get("SiteBz")); } else { builder.Append(Convert.ToDouble(model.Price) + "" + ub.Get("SiteBz2")); } builder.Append("<br />购买数量:" + model.Paycount + ""); if (model.PostMoney == -1) { builder.Append("送货方式:当面交易"); } else { builder.Append("<br />邮费:"); if (model.PostMoney == 0) { builder.Append("包邮"); } else { builder.Append(model.PostMoney + "元"); } } builder.Append("<br />姓名:" + model.RealName + ""); builder.Append("<br />电话:" + model.Mobile + ""); builder.Append("<br />送货地址:" + model.Address + ""); builder.Append("<br />备注:" + model.Notes + ""); builder.Append("<br />实收金额:"); if (modelGoods.PostType == 0) { builder.Append("¥" + Convert.ToDouble(model.AcPrice) + "元"); } else if (modelGoods.PostType == 1) { builder.Append(Convert.ToDouble(model.AcPrice) + "" + ub.Get("SiteBz")); } else { builder.Append(Convert.ToDouble(model.AcPrice) + "" + ub.Get("SiteBz2")); } builder.Append("<br />状态:" + BCW.User.AppCase.CaseBuyStats(model.AcStats) + ""); //商家信息 if (model.AcStats != 0) { if (!string.IsNullOrEmpty(model.AcEms)) { builder.Append("<br />运单号:" + model.AcEms + ""); } if (!string.IsNullOrEmpty(model.AcText)) { builder.Append("<br />管理员附言:" + model.AcText + ""); } if (!string.IsNullOrEmpty(model.LaNotes)) { builder.Append("<br />买家评价:" + model.LaNotes + ""); } } builder.Append("<br />时间:" + model.AddTime + ""); builder.Append(Out.Tab("</div>", "")); if (model.AcStats != 3 && model.AcStats != 4) { string strText = "运单号(可空):/,附言(可空):/,状态:,,,"; string strName = "AcEms,AcText,stats,id,act,backurl"; string strType = "text,text,select,hidden,hidden,hidden"; string strValu = "" + model.AcEms + "'" + model.AcText + "'" + model.AcStats + "'" + id + "'ok'" + Utils.getPage(0) + ""; string strEmpt = "true,true,0|" + BCW.User.AppCase.CaseBuyStats(0) + "|1|" + BCW.User.AppCase.CaseBuyStats(1) + "|2|" + BCW.User.AppCase.CaseBuyStats(2) + "|3|" + BCW.User.AppCase.CaseBuyStats(3) + "|4|" + BCW.User.AppCase.CaseBuyStats(4) + ",false,false,false"; string strIdea = "/"; string strOthe = "确定,shopbuy.aspx,post,1,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); } builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?act=edit&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">修改订单</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?act=del&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">删除订单</a><br />"); if (Utils.getPage(1) != "") { builder.Append("<a href=\"" + Utils.getPage(1) + "\">返回上一级</a><br />"); } builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx") + "\">返回订单管理</a><br />"); builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>")); builder.Append(Out.Tab("</div>", "<br />")); }