private void BindTemplateList()
 {
     TemplateFacade facade = new TemplateFacade();
     List<TemplateInfo> templateList = facade.GetTemplateInfoListByUserId(CurrentUser.Id);
     rptTemplateList.DataSource = templateList;
     rptTemplateList.DataBind();
 }
 protected void lbtnSave_Click(object sender, EventArgs e)
 {
     string name = txtName.Text;
     string content;
     using (StreamReader reader = new StreamReader(fuFile.FileContent))
     {
         content = reader.ReadToEnd();
         reader.Close();
     }
     TemplateFacade facade = new TemplateFacade();
     facade.CreateTemplate(name, content, CurrentUser.Id);
     SetSuccessInformation("添加模板成功!");
 }
        private void BindTemplateList()
        {
            TemplateFacade facade = new TemplateFacade();
            List<TemplateInfo> templateList = facade.GetTemplateInfoListByUserId(CurrentUser.Id);
            templateList.Insert(0, TemplateInfo.GetEmptyObject<TemplateInfo>());
            ddlTemplates.DataSource = templateList;
            ddlTemplates.DataBind();

            if (!string.IsNullOrEmpty(Request["Id"]))
            {
                ddlTemplates.SelectedValue = Request["Id"];
            }
        }