Exemplo n.º 1
0
        /// <summary>
        /// 供应商皮肤下拉框选项
        /// </summary>
        public void GetSupplierSkinOptions()
        {
            int    gid = RequestTool.RequestInt("groupid");
            int    id  = RequestTool.RequestInt("id");
            string str = "<option value=\"0\">┌ " + Tag("默认皮肤") + "</option>";
            Lebi_Supplier_Group group = B_Lebi_Supplier_Group.GetModel(gid);

            if (group != null)
            {
                if (group.Supplier_Skin_ids != "")
                {
                    string sel = "";
                    List <Lebi_Supplier_Skin> models = B_Lebi_Supplier_Skin.GetList("id in (" + group.Supplier_Skin_ids + ")", "");
                    foreach (Lebi_Supplier_Skin model in models)
                    {
                        sel = "";
                        if (id == model.id)
                        {
                            sel = "selected";
                        }
                        str += "<option value=\"" + model.id + "\" " + sel + ">" + model.Name + "</option>";
                    }
                }
            }
            Response.Write(str);
        }
Exemplo n.º 2
0
 //public string GetSkins(int id)
 //{
 //    string str = "";
 //    List<Lebi_Supplier_Skin> skins = B_Lebi_Supplier_Skin.GetList("IsShow=1", "Sort desc");
 //    foreach (Lebi_Supplier_Skin skin in skins)
 //    {
 //        string sel = "";
 //        if (id == skin.id)
 //            sel = "selected";
 //        str += "<option value=\"" + skin.id + "\" " + sel + ">" + skin.Name + "</option>";
 //    }
 //    return str;
 //}
 public List <Lebi_Supplier_Skin> GetSkins()
 {
     try
     {
         List <Lebi_Supplier_Skin> skins = B_Lebi_Supplier_Skin.GetList("IsShow=1 and IsPublic=1 and id in (" + CurrentSupplierGroup.Supplier_Skin_ids + ",0," + model.Supplier_Skin_id + ")", "Sort desc");
         return(skins);
     }
     catch
     {
         return(new List <Lebi_Supplier_Skin>());
     }
 }
Exemplo n.º 3
0
        public string Skins(string ids)
        {
            string str = "";
            List <Lebi_Supplier_Skin> models = B_Lebi_Supplier_Skin.GetList("IsShow=1", "Sort desc");

            foreach (Lebi_Supplier_Skin model in models)
            {
                string sel = "";
                if (("," + ids + ",").Contains("," + model.id + ","))
                {
                    sel = "checked";
                }
                str += "<label><input name=\"Supplier_Skin_ids\" type=\"checkbox\" shop=\"true\" " + sel + " value=\"" + model.id + "\">" + model.Name + "</label>";
            }
            return(str);
        }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("supplier_skin_list", "店铺皮肤列表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            PageSize     = RequestTool.getpageSize(25);
            key          = RequestTool.RequestString("key");
            type         = RequestTool.RequestString("type");
            string where = "1=1";
            if (key != "")
            {
                where += " and Name like lbsql{'%" + key + "%'}";
            }
            if (type != "")
            {
                where += " and type=lbsql{'" + type + "'}";
            }
            models = B_Lebi_Supplier_Skin.GetList(where, "Sort desc", PageSize, page);
            int recordCount = B_Lebi_Supplier_Skin.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&key=" + key, page, PageSize, recordCount);
        }