protected int sid = 0;//结算供应商ID public void LoadPage() { edit_id = RequestTool.RequestInt("edit_id", 0); id = RequestTool.RequestInt("id", 0); sid = RequestTool.RequestInt("sid", 0); if (id == 0) { try { id = B_Lebi_User_Address.GetMaxId("User_id=" + CurrentUser.id + ""); } catch (InvalidCastException) { id = 0; } } models = B_Lebi_User_Address.GetList("User_id=" + CurrentUser.id + "", ""); address = B_Lebi_User_Address.GetModel(CurrentUser.User_Address_id); if (address == null) { address = B_Lebi_User_Address.GetModel("User_id=" + CurrentUser.id + " order by id desc"); } if (address == null) { address = new Lebi_User_Address(); } if (edit_id > 0) { edit_address = B_Lebi_User_Address.GetModel(edit_id); } if (edit_address == null) { edit_address = new Lebi_User_Address(); } }
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_UserAddress", "") + "\"><span>" + Tag("收货地址") + "</span></a>"; key = Rstring("key"); pageindex = RequestTool.RequestInt("page", 1); where = "User_id=" + CurrentUser.id + ""; if (key != "") { where += " and (Name like lbsql{'%" + key + "%'} or Address like lbsql{'%" + key + "%'} or MobilePhone like lbsql{'%" + key + "%'} or Phone like lbsql{'%" + key + "%'})"; } user_addresss = B_Lebi_User_Address.GetList(where, "id desc", PageSize, pageindex); int recordCount = B_Lebi_User_Address.Counts(where); PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?page={0}&key=" + key, pageindex, PageSize, recordCount, CurrentLanguage); NextPage = "?page=" + (pageindex + 1) + "&key=" + key + ""; }