Пример #1
0
        public void BindTempList()
        {
            string pathdir = (AppDomain.CurrentDomain.BaseDirectory + ZoomLa.Components.SiteConfig.SiteOption.TemplateDir.Replace("/", @"\")).Replace(@"\\", @"\");

            if (!File.Exists(pathdir))
            {
                return;
            }
            DataTable tables = FileSystemObject.GetDirectoryAllInfos(pathdir + "/" + Resources.L.内容页 + "/", FsoMethod.File);

            tables.Columns.Add("TemplatePic");//添加模板图片url
            tables.Columns.Add("TemplateID");
            tables.Columns.Add("TemplateUrl");
            for (int i = 0; i < tables.Rows.Count; i++)
            {
                tables.Rows[i]["rname"] = tables.Rows[i]["rname"].ToString().Replace(pathdir, "").Replace(@"\", "/").Substring(1);
                string filename = "内容页_" + Path.GetFileNameWithoutExtension(tables.Rows[i]["name"].ToString()) + ".jpg";
                tables.Rows[i]["TemplatePic"] = ZoomLa.Components.SiteConfig.SiteOption.TemplateDir + "/thumbnail/" + filename;
                tables.Rows[i]["TemplateID"]  = tables.Rows[i]["rname"];
                tables.Rows[i]["TemplateUrl"] = tables.Rows[i]["rname"];
                if (!File.Exists(function.VToP(pathdir + "/thumbnail/" + filename)))
                {
                    tables.Rows.Remove(tables.Rows[i]);
                    i--;
                }
            }
            tables.DefaultView.RowFilter = "type=1 OR name LIKE '%.html'";
            TlpView_Tlp.DataSource       = tables;
            TlpView_Tlp.DataBind();
        }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         BindWX_DP.DataSource = wxBll.Sel();
         BindWX_DP.DataBind();
         BindWX_DP.Items.Insert(0, "未绑定微信");
         TlpView_Tlp.DataSource = styleBll.Sel();
         TlpView_Tlp.DataBind();
         if (Mid > 0)
         {
             M_CommonData storeMod = conBll.SelReturnModel(Mid);
             UserShopName_T.Text = storeMod.Title;
             DataTable condt = conBll.GetContent(Mid);
             ModelHtml.Text = mfbll.InputallHtml(storeMod.ModelID, 0, new ModelConfig()
             {
                 ValueDT = condt
             });
             TlpView_Tlp.SelectedID  = storeMod.DefaultSkins.ToString();
             UserName_T.Text         = storeMod.Inputer;
             UserName_H.Value        = storeMod.SuccessfulUserID.ToString();
             BindWX_DP.SelectedValue = storeMod.SpecialID;
         }
         else
         {
             DataTable dt = modBll.SelByType("6");
             if (dt.Rows.Count < 1)
             {
                 function.WriteErrMsg("请先创建店铺申请模型");
             }
             ModelHtml.Text = mfbll.InputallHtml(Convert.ToInt32(dt.Rows[0]["ModelID"]), 0, new ModelConfig());
         }
         Call.SetBreadCrumb(Master, "<li><a href='" + customPath2 + "Main.aspx'>工作台</a></li><li><a href='../Shop/ProductManage.aspx'>商城管理</a></li><li><a href='StoreManage.aspx'>店铺管理</a></li><li class='active'>店铺信息</li>");
     }
 }