protected void Button1_Click(object sender, EventArgs e)
 {
     WX.Flow.Model.Form.MODEL model = WX.Request.rForm;  //WX.Flow.Model.Form.GetModel("select * from FL_Forms where ID=" + Request["id"]);
     model.Module.value       = FORM_CONTENT.Value;
     model.Module_Short.value = model.GetShortModule();
     model.UpdateItems();
     model.Update();
     //Response.Redirect("Form_List.aspx");
 }
Esempio n. 2
0
 protected void btnUpload_Click(object sender, EventArgs e)
 {
     if (fuForm.HasFile)
     {
         int id = WX.Request.rFormID;
         WX.Flow.Model.Form.MODEL f = WX.Request.rForm;//WX.Flow.Model.Form.NewDataModel(id);
         //上传
         string file = String.Format("/UploadFiles/Forms/{0}.html", f.Name);
         fuForm.SaveAs(Server.MapPath(file));
         //替换
         ULCode.TextFile tf = new ULCode.TextFile(Server.MapPath(file));
         f.Module.value       = tf.Text();
         f.Module_Short.value = f.GetShortModule();
         f.UpdateItems();
         f.Update();
     }
 }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     WX.Flow.Model.Form.MODEL fm = null;
     if (!IsPostBack && Request["FORM_CONTENT"] != null && Request["FORM_CONTENT"] != "")
     {
         fm.Module.value       = Request["FORM_CONTENT"].Replace("&lt;", "<").Replace("&gt;", ">").Replace("&amp;", "&");
         fm.Module_Short.value = fm.GetShortModule();
         fm.UpdateItems();
         Session["formmodel"] = fm;
     }
     else
     {
         fm = (WX.Flow.Model.Form.MODEL)Session["formmodel"];
     }
     WX.Flow.FormFieldCollection oldffc = fm.FetchItems();
     WX.Flow.FormFieldCollection ffedit = new WX.Flow.FormFieldCollection();
     //ffedit.Add(new WX.Flow.FormField("DATA_1", "item10"));
     //ffedit.Add(new WX.Flow.FormField("DATA_2", "item8"));
     //ffedit.Add(new WX.Flow.FormField("DATA_3", "item9"));
     WX.Flow.FormFieldCollection ffhidden = new WX.Flow.FormFieldCollection();
     //ffhidden.Add(new WX.Flow.FormField("DATA_1", "item7"));
     //ffhidden.Add(new WX.Flow.FormField("DATA_2", "item8"));
     //ffhidden.Add(new WX.Flow.FormField("DATA_3", "item9"));
     if (Request["sub_add"] != null && Request["sub_add"] != "")
     {
         WX.Flow.FormFieldCollection ffc = new WX.Flow.FormFieldCollection();
         foreach (WX.Flow.FormField ff in oldffc)
         {
             ff.Value = Request[ff.Id] == null?"":Request[ff.Id];
             ffc.Add(ff);
         }
         fm.Items_FormFieldCollection = ffc;
         Session["formmodel"]         = fm;
         Literal1.Text = fm.GenerateHtmls(ffc, ffedit, ffhidden, "").Replace("-SYS_IP-", getIp());
     }
     else
     {
         Literal1.Text = fm.GenerateHtmls(oldffc, ffedit, ffhidden, "").Replace("-SYS_IP-", getIp());
     }
 }