protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request["fid"] != null && Request["fid"] != "") { errorscript = ""; strfid = Common.Common.NoHtml(Request["fid"]); } else { errorscript = JQDialog.alertOkMsgBoxClearBody(2, "操作失败<br/>请核对后再操作!"); } if (Session["customerID"] != null && Session["customerID"].ToString() != "") { strUID = Session["customerID"].ToString(); } if (Request["action"] != null && Request["action"] != "" && Request["tid"] != null && Request["tid"] != "") { action = Request["action"]; if (strUID != null && strUID != "") { TopicLoveOrLike(); Response.End(); } else { JQDialog.SetCookies("pageurl", "../../Comment/Index.aspx?fid=" + strfid, 2); errorscript = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "../PalmShop/ShopCode/UserLogin.aspx", "error"); } } GetTopicList(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request["fid"] != null && Request["fid"] != "") { errorscript = ""; strfid = Common.Common.NoHtml(Request["fid"]); } else { errorscript = JQDialog.alertOkMsgBoxClearBody(2, "操作失败<br/>请核对后再操作!"); } if (Session["customerID"] != null && Session["customerID"].ToString() != "") { strUid = Common.Common.NoHtml(Session["customerID"].ToString()); if (Request["action"] != null && Request["action"] != "" && Request["action"].ToString().ToLower() == "edite") { editeCustomerinfo(); } } else { JQDialog.SetCookies("pageurl", "../../Comment/Customerinfo.aspx?fid=" + strfid, 2); errorscript = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "../PalmShop/ShopCode/UserLogin.aspx", "error"); } getTemplate(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { errorscript = ""; if (Request["sid"] != null && Request["sid"].ToString() != "") { sid = Request["sid"].ToString(); } if (Session["customerID"] != null && Session["customerID"].ToString() != "") { customerid = Session["customerID"].ToString(); if (Request["pid"] != null && Request["pid"].ToString() != "") { pid = Request["pid"].ToString(); } else { JQDialog.SetCookies("pageurl", "MyShop.aspx", 1); errorscript = JQDialog.alertOKMsgBoxGoBack(3, "操作失败<br/>请登录后再操作!", true); } if (Request["action"] != null && Request["action"] != "") { action = Request["action"]; } if (action.Trim() != null && action.Trim() != "") { switch (action.ToLower().Trim()) { case "getcateoption": GetOptionList(); break; case "edite": ProductEdite(); break; case "delimg": DelImg(); break; case "delpara": DelPara(); break; } } } else { JQDialog.SetCookies("pageurl", "MyShop.aspx", 1); errorscript = JQDialog.alertOKMsgBox(3, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); } GetHtmlInfo(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["customerID"] != null && Session["customerID"].ToString() != "") { if (Request["pid"] != null && Request["pid"] != "") { pid = Common.Common.NoHtml(Request["pid"]); if (Request["action"] != null && Request["action"] != "") { action = Request["action"]; } if (Request["ishand"] != null && Request["action"] != "") { try { ishand = Convert.ToInt32(Request["ishand"]); } catch (Exception) { } } if (action.Trim() != null && action.Trim() != "") { switch (action.ToLower().Trim()) { case "getcateoption": GetOptionList(); break; case "delimg": DelImg(); break; } } getinfo(); errorscript = ""; } else { JQDialog.SetCookies("pageurl", "PubSecHandEdit.aspx?ishand=" + ishand, 2); getinfo(); errorscript = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); return; } } else { JQDialog.SetCookies("pageurl", "PubSecHandEdit.aspx?ishand=" + ishand, 2); getinfo(); errorscript = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); return; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { errormsg = ""; if (Session["customerID"] != null && Session["customerID"].ToString() != "") { customerid = Session["customerID"].ToString(); } if (Request["sid"] != null && Request["sid"] != "") { shopid = Common.Common.NoHtml(Request["sid"]); } else { if (Session["SID"] != null && Session["SID"].ToString() != "") { shopid = Session["SID"].ToString(); } else { GetShopID(); if (shopid == null || shopid == "") { JQDialog.SetCookies("pageurl", "MyShop.aspx", 1); errormsg = JQDialog.alertOKMsgBox(5, "您还没开通微店,请开通后再操作", "ApplyShop.aspx?action=apply", "error"); } } } if (Request["pid"] != null && Request["pid"] != "") { pid = Common.Common.NoHtml(Request["pid"]); } if (Request["action"] != null && Request["action"] != "") { action = Request["action"]; switch (action.ToLower().Trim()) { case "delproduct": DelProduct(); break; } } GetInfo(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["customerID"] == null || Session["customerID"].ToString() == "") { JQDialog.SetCookies("pageurl", "Vcoin.aspx", 2); errormsg = JQDialog.alertOKMsgBox(5, "您还没有登<br/>请登录后再操作!", "UserLogin.aspx", "error"); } else { struid = Session["customerID"].ToString(); } GetHtmlPage(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { errorscript = ""; if (Session["customerID"] != null && Session["customerID"].ToString() != "") { cuid = Session["customerID"].ToString(); } else { JQDialog.SetCookies("pageurl", "SaleManager.aspx", 2); errorscript = JQDialog.alertOKMsgBox(2, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); } GetHtmlPage(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { errowmsg = ""; try { if (Session["OpenID"] == null || Session["OpenID"].ToString() == "") { GetUserOpenID(); } else { strOpenID = Session["OpenID"].ToString(); } if (Session["customerID"] != null && Session["customerID"].ToString() != "") { uid = Common.Common.NoHtml(Session["customerID"].ToString()); if (Session["SID"] == null || Session["SID"].ToString() == "") { GetShopID(); if (sid != null && sid != "") { JQDialog.SetCookies("pageurl", "ShopIndex.aspx", 5); errowmsg = JQDialog.alertOKMsgBox(5, "您还没开通微店,请开通后再操作", "ApplyShop.aspx?action=reg", "error"); } } } else { JQDialog.SetCookies("pageurl", "ShopIndex.aspx", 2); errowmsg = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); } } catch (Exception ex) { errowmsg = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); } getHtmlpage(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { errorscript = ""; if (Session["SID"] != null && Session["SID"].ToString() != "") { sid = Session["SID"].ToString(); } else { JQDialog.SetCookies("pageurl", "MyShop.aspx", 5); errorscript = JQDialog.alertOKMsgBox(5, "您还没开通微店,请开通后再操作?", "ApplyShop.aspx?action=reg", "error"); } if (Session["customerID"] != null && Session["customerID"].ToString() != "") { customerid = Session["customerID"].ToString(); if (Request["action"] != null && Request["action"] != "") { action = Request["action"]; } if (action.Trim() != null && action.Trim() != "") { switch (action.ToLower().Trim()) { case "getcateoption": GetOptionList(); break; case "publish": PublicProduct(); break; } } } else { JQDialog.SetCookies("pageurl", "MyShop.aspx", 1); errorscript = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); } GetHtmlInfo(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { errormsg = ""; if (Session["customerID"] != null && Session["customerID"].ToString() != "") { customerid = Session["customerID"].ToString(); GetOpenId(); } else { JQDialog.SetCookies("pageurl", "CustomerOrder.aspx", 2); errormsg = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); } if (Request["action"] != null && Request["action"] != "") { action = Request["action"]; action = action.ToLower().Trim(); switch (action) { case "receive": ReceiveOrder(); break; case "pubol": //submitOrder(); break; case "delorder": DelOrder(); break; } } GetHtmlPage(); } }
public void ProcessRequest(HttpContext context) { string CookiesName = string.Empty; string RequestUrl = string.Empty; int time = 0; HttpRequest Request = context.Request; HttpResponse Response = context.Response; if (Request["cname"] != null && Request["cname"] != "") { CookiesName = Request["cname"]; } else { CookiesName = "pageurl"; } if (Request["curl"] != null && Request["curl"] != "") { RequestUrl = Request["curl"]; } if (Request["time"] != null && Request["time"] != "") { try { time = Convert.ToInt32(Request["time"]); } catch (Exception) { time = 2; } } else { time = 2; } JQDialog.SetCookies(CookiesName, RequestUrl, time); Response.Write("{\"succeed\":true,\"logurl\":\"../PalmShop/ShopCode/UserLogin.aspx\"}"); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["customerID"] != null && Session["customerID"].ToString() != "") { strUid = Common.Common.NoHtml(Session["customerID"].ToString()); } else { JQDialog.SetCookies("pageurl", "ShopIndex.aspx", 2); errorscript = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); } if (Request["sid"] != null && Request["sid"] != "") { strSID = Common.Common.NoHtml(Request["sid"]); } else { if (Session["SID"] != null && Session["SID"].ToString() != "") { strSID = Common.Common.NoHtml(Session["SID"].ToString()); } } if (Request["action"] != null && Request["action"] != "") { action = Common.Common.NoHtml(Request["action"]); action = action.Trim().ToLower(); } if (action == "uapply" || action == "uedite") { RegOrUpdateShop(); } GetHtmlPage(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { errorscript = ""; string pageurl = string.Empty; if (Request["sid"] != null && Request["sid"] != "") { shopid = Common.Common.NoHtml(Request["sid"]); pageurl = "?sid=" + shopid; } else { if (Session["SID"] != null && Session["SID"].ToString() != "") { shopid = Session["SID"].ToString(); pageurl = "?sid=" + shopid; } else { JQDialog.SetCookies("pageurl", "CustomerManager.aspx" + pageurl, 1); errorscript = JQDialog.alertOKMsgBox(3, "操作失败,请登录后再操作", "UserLogin.aspx", "error"); } } if (Session["customerID"] != null && Session["customerID"].ToString() != "") { cuid = Session["customerID"].ToString(); } else { JQDialog.SetCookies("pageurl", "CustomerManager.aspx" + pageurl, 2); errorscript = JQDialog.alertOKMsgBox(2, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); } GetHtmlPage(); } }
protected void uploadbtn_Click(object sender, EventArgs e) { #region 信息判断 if (Session["customerID"] != null && Session["customerID"].ToString() != "") { MSCustomersDAL customerDal = new MSCustomersDAL(); phone = customerDal.GetCustomerValueByID("phone", Session["customerID"].ToString()).ToString(); } else { JQDialog.SetCookies("pageurl", "PubSecHandEdit.aspx?ishand=" + ishand, 2); errorscript = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); return; } MSProduct productModel = new MSProduct(); if (setpvalue.Value.Trim() != null && setpvalue.Value.Trim() != "") { productModel.Cid = setpvalue.Value; } if (pdesc.Value.Trim() != null && pdesc.Value.Trim() != "") { productModel.Pcontent = pdesc.Value; } if (price.Value.Trim() != null && price.Value.Trim() != "") { productModel.Price = Convert.ToDecimal(price.Value); } if (ptitle.Value.Trim() != null && ptitle.Value.Trim() != "") { productModel.Ptitle = ptitle.Value; } if (price.Value.Trim() != null && price.Value.Trim() != "") { productModel.Price = Convert.ToDecimal(price.Value); } #endregion productModel.ID = pid; productModel.IsSecHand = ishand; productModel.Pstate = 0; productModel.Review = Review; productModel.CustomerID = Session["customerID"].ToString(); MSProductDAL productDal = new MSProductDAL(); MSShopContacts contactModel = new MSShopContacts(); MSShopContactsDAL contactDal = new MSShopContactsDAL(); contactModel.PID = pid; contactModel.IsDel = 0; contactModel.SID = ""; contactModel.NickName = UserName.Value; contactModel.Phone = UserPhone.Value; bool contactflag = false; if (contactDal.ExistContact("", "", "", pid)) { contactModel.ID = contactID; contactflag = contactDal.UpdateMSSContacts(contactModel); } else { contactModel.ID = Guid.NewGuid().ToString("N").ToUpper(); contactflag = contactDal.AddMSSContacts(contactModel); } if (productDal.UpdateMSProduct(productModel) && SaveImages()) { errorscript = JQDialog.alertOKMsgBox(3, "操作成功!", "MySecHand.aspx", "error"); } else { errorscript = JQDialog.alertOKMsgBox(4, "操作失败,请核对后再操作!", "", "error"); return; } }
protected void uploadbtn_Click(object sender, EventArgs e) { #region 信息判断 if (Session["customerID"] == null || Session["customerID"].ToString() == "") { JQDialog.SetCookies("pageurl", "PubSecHand.aspx?ishand=" + ishand, 2); errorscript = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); return; } MSProduct productModel = new MSProduct(); if (setpvalue.Value.Trim() != null && setpvalue.Value.Trim() != "") { productModel.Cid = setpvalue.Value; } if (pdesc.Value.Trim() != null && pdesc.Value.Trim() != "") { productModel.Pcontent = pdesc.Value; } if (price.Value.Trim() != null && price.Value.Trim() != "") { productModel.Price = Convert.ToDecimal(price.Value); } if (ptitle.Value.Trim() != null && ptitle.Value.Trim() != "") { productModel.Ptitle = ptitle.Value; } if (price.Value.Trim() != null && price.Value.Trim() != "") { productModel.Price = Convert.ToDecimal(price.Value); } #endregion Random random = new Random(); int r1 = (int)(random.Next(0, 9)); //产生2个0-9的随机数 int r2 = (int)(random.Next(0, 9)); string now = DateTime.Now.ToString("yyMMddhhmmssf"); //一个13位的时间戳 String paymentID = r1.ToString() + r2.ToString() + now; pid = "R" + paymentID; productModel.ID = pid; productModel.IsSecHand = ishand; productModel.Pstate = 0; productModel.Review = 1; productModel.CustomerID = Session["customerID"].ToString(); MSProductDAL productDal = new MSProductDAL(); MSShopContacts contactModel = new MSShopContacts(); MSShopContactsDAL contactDal = new MSShopContactsDAL(); contactModel.ID = Guid.NewGuid().ToString("N").ToUpper(); contactModel.PID = pid; contactModel.IsDel = 0; contactModel.SID = ""; contactModel.NickName = UserName.Value; contactModel.Phone = UserPhone.Value; string pageurl = "NewProduct.aspx?ishand=" + ishand; if (productDal.AddMSProduct(productModel) && SaveImages() && contactDal.AddMSSContacts(contactModel)) { if (ishand == 1) { pageurl = "MySecHand.aspx"; } errorscript = JQDialog.alertOKMsgBox(5, "操作成功!", pageurl, "succeed"); } else { errorscript = JQDialog.alertOKMsgBox(3, "操作失败<br/>请核对后再操作!", "", "error"); return; } }
void GetHtmlPage() { string customerid = string.Empty; string strWhere = string.Empty; #region -获取用户信息 if (strOpenID != null && strOpenID != "") { MSCustomersDAL customerDal = new MSCustomersDAL(); try { customerid = customerDal.GetCustomerValueByOpenID("ID", strOpenID).ToString(); } catch (Exception) { } } else { if (Session["customerID"] != null && Session["customerID"].ToString() != "") { customerid = Session["customerID"].ToString(); } else { JQDialog.SetCookies("pageurl", "CustomerOrder.aspx", 2); errormsg = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); } } #endregion List <MyOrderList> myorderlistModel = new List <MyOrderList>(); List <MSProductPara> paralist = new List <MSProductPara>(); if (customerid != null && customerid != "") { MSProductOrderDAL orderDal = new MSProductOrderDAL(); strWhere += " and a.CustomerID='" + customerid + "' and PayState=1 "; DataSet orderds = orderDal.GetCustomerOrderList(strWhere); if (orderds != null && orderds.Tables.Count > 0 && orderds.Tables[0].Rows.Count > 0) { foreach (DataRow item in orderds.Tables[0].Rows) { MyOrderList ordermodel = DataConvert.DataRowToModel <MyOrderList>(item); myorderlistModel.Add(ordermodel); } } } else { JQDialog.SetCookies("pageurl", "MyConsume.aspx", 2); errormsg = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); } string text = System.IO.File.ReadAllText(Server.MapPath("../ShopPage/MyConsume.html")); JinianNet.JNTemplate.TemplateContext context = new JinianNet.JNTemplate.TemplateContext(); //context.TempData["artList"] = liArtList; context.TempData["errormsg"] = errormsg; context.TempData["myorderlist"] = myorderlistModel; JinianNet.JNTemplate.Template t = new JinianNet.JNTemplate.Template(context, text); t.Render(Response.Output); }
void RegOrUpdateShop() { string shopname = string.Empty; string wxname = string.Empty; string wxnum = string.Empty; string isnull = ""; string ShopLogo = string.Empty; string ShopBackImg = string.Empty; string RealName = string.Empty; string IDnum = string.Empty; string IDimg = string.Empty; #region --------------------获取请求参数值------------------------------- try { shopname = Request.Form.Get("shopname").ToString(); } catch (Exception) { shopname = isnull; } try { wxname = Request.Form.Get("wxname").ToString(); } catch (Exception) { wxname = isnull; } try { wxnum = Request.Form.Get("wxnum").ToString(); } catch (Exception) { wxnum = isnull; } try { ShopLogo = Request.Files.Get("logoimg").FileName.ToString(); } catch (Exception) { ShopLogo = isnull; } try { ShopBackImg = Request.Files.Get("backimg").FileName.ToString(); } catch (Exception) { ShopBackImg = isnull; } try { RealName = Request.Files.Get("realname").FileName.ToString(); } catch (Exception) { RealName = isnull; } try { IDnum = Request.Form.Get("idnum").ToString(); } catch (Exception) { IDnum = isnull; } try { IDimg = Request.Files.Get("idimg").FileName.ToString(); } catch (Exception) { IDimg = isnull; } #endregion #region ---------------------获取图像--------------------------- if (ShopLogo != null && ShopLogo != "") { ShopLogo = "ShopLogo/" + UploadImg("logoimg"); } if (ShopBackImg != null && ShopBackImg != "") { ShopBackImg = "ShopLogo/" + UploadImg("backimg"); } if (IDimg != null && IDimg != "") { IDimg = "ShopLogo/" + UploadImg("idimg"); } #endregion MSShop shopModel = new MSShop(); MSShopDAL shopDal = new MSShopDAL(); #region ----------------------设置Model值----------------------------------- if (shopname != null && shopname != "") { shopModel.ShopName = shopname; } shopModel.WXName = wxname; shopModel.WXNum = wxnum; shopModel.ShopLogo = ShopLogo; shopModel.ShopBackImg = ShopBackImg; string regSid = string.Empty; if (strUid != null && strUid != "") { shopModel.UID = strUid; } if (strSID != null && strSID != "") { shopModel.ID = strSID; } else { regSid = Guid.NewGuid().ToString("N").ToUpper(); shopModel.ID = regSid; } #endregion #region ------------------更新注册店铺用户身份信息--------------------------- if (strUid != null && strUid != "") { MSCustomersDAL UserDal = new MSCustomersDAL(); UserDal.UpdateUserIDnum(strUid, RealName, IDnum, IDimg); } #endregion #region ---------------------更新或注册店铺信息-------------------------------------- if (strSID != null && strSID != "" && action == "uedite") { if (shopDal.UpdateMSShop(shopModel)) { errorscript = JQDialog.alertOKMsgBox(3, "操作成功!", "MyShop.aspx", "succeed"); } else { errorscript = JQDialog.alertOKMsgBox(3, "操作失败,请核对后再操作!", "ApplyShop.aspx", "error"); } } else { if (!shopDal.ExistMSShop(shopname, strUid)) { if (shopDal.AddMSShop(shopModel)) { Session["SID"] = regSid; errorscript = JQDialog.alertOKMsgBox(3, "操作成功!", "MyShop.aspx", "succeed"); } else { errorscript = JQDialog.alertOKMsgBox(3, "操作失败,请核对后再操作!", "ApplyShop.aspx", "error"); } } else { JQDialog.SetCookies("pageurl", "MyShop.aspx", 2); errorscript = JQDialog.alertOKMsgBox(3, "改店铺已经存在,请登录后操作", "UserLogin.aspx", "error"); } } #endregion }
void GetHtmlPage() { string strWhere = string.Empty; string productmodelid = string.Empty; string orderstate = string.Empty; string paystate = string.Empty; string receive = string.Empty; string oid = string.Empty;//支付成功返回订单 #region -获取用户信息 if (strOpenID != null && strOpenID != "") { MSCustomersDAL customerDal = new MSCustomersDAL(); try { customerid = customerDal.GetCustomerValueByOpenID("ID", strOpenID).ToString(); } catch (Exception) { } } else { if (Session["customerID"] != null && Session["customerID"].ToString() != "") { customerid = Session["customerID"].ToString(); } else { JQDialog.SetCookies("pageurl", "CustomerOrder.aspx", 2); errormsg = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); } } #endregion List <MyOrderList> myorderlistModel = new List <MyOrderList>(); if (customerid != null && customerid != "") { MSProductOrderDAL orderDal = new MSProductOrderDAL(); #region -获取请求信息 if (Request["oid"] != null && Request["oid"] != "") { oid = Common.Common.NoHtml(Request["oid"]); } if (Request["orderstate"] != null && Request["orderstate"] != "") { orderstate = Common.Common.NoHtml(Request["orderstate"]); } if (Request["paystate"] != null && Request["paystate"] != "") { paystate = Common.Common.NoHtml(Request["paystate"]); } if (Request["receive"] != null && Request["receive"] != "") { receive = Common.Common.NoHtml(Request["receive"]); } strWhere = " and a.CustomerID='" + customerid + "' "; if (orderstate.Trim() != null && orderstate.Trim() != "") { strWhere += " and OrderState=" + orderstate; } if (paystate.Trim() != null && paystate.Trim() != "") { strWhere += " and PayState=" + paystate; } else { strWhere += " and PayState=1 "; } if (receive.Trim() != null && receive.Trim() != "") { strWhere += " and IsReceive=" + receive; } else { strWhere += " and IsReceive=0 "; } if (oid.Trim() != null && oid.Trim() != "") { strWhere += " and a.ID='" + oid + "' "; } #endregion strWhere += " and a.CustomerID='" + customerid + "' "; DataSet orderds = orderDal.GetCustomerOrderList(strWhere); if (orderds != null && orderds.Tables.Count > 0 && orderds.Tables[0].Rows.Count > 0) { foreach (DataRow item in orderds.Tables[0].Rows) { MyOrderList ordermodel = DataConvert.DataRowToModel <MyOrderList>(item); productmodelid = ordermodel.Mid; if (ordermodel.Ptitle.Length > 10) { ordermodel.Ptitle = ordermodel.Ptitle.ToString().Substring(0, 10) + ".."; } myorderlistModel.Add(ordermodel); } } } else { JQDialog.SetCookies("pageurl", "CustomerOrder.aspx", 2); errormsg = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error"); } string text = System.IO.File.ReadAllText(Server.MapPath("../ShopPage/CustomerOrder.html")); JinianNet.JNTemplate.TemplateContext context = new JinianNet.JNTemplate.TemplateContext(); //context.TempData["artList"] = liArtList; context.TempData["myorderlist"] = myorderlistModel; context.TempData["errormsg"] = errormsg; context.TempData["customerid"] = customerid; JinianNet.JNTemplate.Template t = new JinianNet.JNTemplate.Template(context, text); t.Render(Response.Output); }