Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string app = gform("app");
            int tempid = 0;
            gnum(ref tempid, "id");
            switch (app)
            { 
                case "resettemplate":
                    reset_template(tempid);
                    showMessage("使用成功,刷新全部模板成功");
                    break;
                default:
                    break;

            }

            if (!IsPostBack)
            {
                TemplateTypeDal dal = new TemplateTypeDal();
                foreach (TemplateTypeInfo info in dal.view_list())
                {
                    ListItem item = new ListItem(info.templateName, info.templateName);

                    if ("template/"+info.templateName == TEMPLATEPATH)
                    {
                        item.Selected = true;
                    }
                    main_template.Items.Add(item);
                    //else
                    //main_template.Items.Add(new ListItem(info.templateName, info.templateName));
                }
            }
        }
Esempio n. 2
0
        public TemplateCompiled(FileUrl url)
        {
            TemplateTypeDal dal = new TemplateTypeDal();
            TemplateTypeInfo info = dal.view(TEMPLATEPATH.Substring(TEMPLATEPATH.LastIndexOf("/")+1));

            TemplateInfo tinfo = new TemplateDal().read(info.id, "aspx/"+url.name);

            if(this.isEquals(tinfo.templatePath,tinfo.activePath))
            init(tinfo);
        }