Example #1
0
    void ShowInit()
    {
        if (!string.IsNullOrEmpty(Request.Params["File_Id"]))
        {
            try
            {
                Tunnel.BLL.Tunnel_bumf   btb = new Tunnel.BLL.Tunnel_bumf();
                Tunnel.Model.Tunnel_bumf mtb = new Tunnel.Model.Tunnel_bumf();
                Tunnel.BLL.Tunnel_form   tf  = new Tunnel.BLL.Tunnel_form();
                Tunnel.Model.Tunnel_form mtf = new Tunnel.Model.Tunnel_form();
                Tunnel.Common.Form_Class fc  = new Tunnel.Common.Form_Class();
                Tunnel.BLL.UserLogin     ul  = new Tunnel.BLL.UserLogin();
                mtb      = btb.GetModel(Convert.ToInt32(Request.Params["File_Id"]));
                formfile = getFile(mtb.b_file);//附件

                Label1.Text  = mtb.b_title;
                Label2.Text  = fc.From_Content(mtb.b_formcontent, mtb.b_content, true);//取得替换后的表单数据
                ul.UsbnLogin = ul.getUserModel(mtb.b_user);
                Label3.Text  = "发布人:" + ul.UsbnLogin.m_name + " 发布时间:" + mtb.b_time.ToString();
            }
            catch
            {
                Tunnel.Common.Message.back("不正确的ID"); return;
            }
        }
    }
Example #2
0
    void RepeaterBind(string where)
    {
        Tunnel.BLL.Tunnel_form bform = new Tunnel.BLL.Tunnel_form();
        DataSet ds = bform.GetList(where);

        Repeater1.DataSource = ds;
        Repeater1.DataBind();
    }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         if (!string.IsNullOrEmpty(Request.Params["delid"]))
         {
             string id = Request.Params["delid"];
             Tunnel.BLL.Tunnel_form     bf  = new Tunnel.BLL.Tunnel_form();
             Tunnel.BLL.Tunnel_formtype btf = new Tunnel.BLL.Tunnel_formtype();
             bf.Delete(int.Parse(Tunnel.Data.DESEncrypt.Decrypt(id)));
             btf.Delete(int.Parse(Tunnel.Data.DESEncrypt.Decrypt(id)));
             Tunnel.Common.Message.ShowAndReLoad("删除成功!", "Tunnel_FromList.aspx?id=" + Request.Params["id"]);
         }
         this.RepeaterBind("");
     }
 }
Example #4
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Tunnel.BLL.Tunnel_bum        bt  = new Tunnel.BLL.Tunnel_bum();
        Tunnel.BLL.Tunnel_form       tf  = new Tunnel.BLL.Tunnel_form();
        Tunnel.Model.Tunnel_form     mf  = new Tunnel.Model.Tunnel_form();
        Tunnel.BLL.Tunnel_formtype   btf = new Tunnel.BLL.Tunnel_formtype();
        Tunnel.Model.Tunnel_formtype bmf = new Tunnel.Model.Tunnel_formtype();
        mf.f_name = TextBox1.Text.Trim();
        mf.f_lcid = int.Parse(DropDownList2.SelectedValue);
        mf.f_bum  = 0;
        mf.f_user = 1;
        mf.f_date = DateTime.Now;
        int i = tf.Name_Add(mf);

        if (i > 0)
        {
            bmf.Form_id   = i;
            bmf.Form_name = TextBox1.Text.Trim();
            bmf.Item_max  = 0;
            btf.Add(bmf);
            Tunnel.Common.Message.Show("保存成功!");
        }
    }