Пример #1
0
 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_UserAddressEdit'");
     id          = Rint("id");
     path        = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">&raquo;</em><a href=\"" + URL("P_UserCenter", "") + "\"><span>" + Tag("会员中心") + "</span></a><em>&raquo;</em><a href=\"" + URL("P_UserAddress", "") + "\"><span>" + Tag("收货地址") + "</span></a>";
     if (id > 0)
     {
         path += "<em>&raquo;</em><a href=\"" + URL("P_UserAddressEdit", "" + id + "") + "\"><span>" + Tag("编辑") + "</span></a>";
     }
     else
     {
         path += "<em>&raquo;</em><a href=\"" + URL("P_UserAddressEdit", "0") + "\"><span>" + Tag("添加") + "</span></a>";
     }
     user_address = B_Lebi_User_Address.GetModel("User_id=" + CurrentUser.id + " and id = " + id + "");
     if (user_address == null)
     {
         if (id == 0)
         {
             user_address = new Lebi_User_Address();
         }
         else
         {
             PageError();
         }
     }
 }
Пример #2
0
        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\">&raquo;</em><a href=\"" + URL("P_UserCenter", "") + "\"><span>" + Tag("会员中心") + "</span></a><em>&raquo;</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);
        }