Ejemplo n.º 1
0
 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
     HyoaClass.Hyoa_listsearchfield Hyoa_listsearchfield = new HyoaClass.Hyoa_listsearchfield();
     String[] v_uids = this.txtuids.Value.Split(',');
     for (var i = 0; i < v_uids.Length; i++)
     {
         if (v_uids[i] != "")
         {
             Hyoa_listconfig.ID = v_uids[i];
             Hyoa_listconfig.Delete();
             Hyoa_listsearchfield.hy_listid = v_uids[i];
             Hyoa_listsearchfield.DeleteBylistid();
         }
     }
     this.txtuids.Value = "";
     //DataPlay(1);
     DataPlay(System.Int32.Parse(this.curpage.Text));
 }
Ejemplo n.º 2
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        string lscolunid = "";
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
        HyoaClass.Hyoa_listsearchfield Hyoa_listsearchfield = new HyoaClass.Hyoa_listsearchfield();

        Hyoa_listconfig.hy_mudelid = this.ddlmudelid.SelectedValue;
        Hyoa_listconfig.hy_tableid = this.ddltableid.SelectedValue;
        Hyoa_listconfig.hy_ifflowdoc = this.ddlifflowdoc.SelectedValue;
        Hyoa_listconfig.hy_sort = System.Int32.Parse(this.txtsort.Text);
        Hyoa_listconfig.hy_columnshowid = this.txtselcolid.Value;
        Hyoa_listconfig.hy_columnshow = this.txtselcol.Value;
        Hyoa_listconfig.hy_ifsearch = this.ddlifsearch.SelectedValue;
        Hyoa_listconfig.hy_ifshowsearch = this.ddlifshowsearch.SelectedValue;
        Hyoa_listconfig.hy_width = this.txtwidth.Text;
        Hyoa_listconfig.hy_listname = this.txthy_listname.Text;
        Hyoa_listconfig.hy_sortfield1 = this.txtselsortfieldid1.Value;
        Hyoa_listconfig.hy_sorttype1 = this.ddlsorttype1.SelectedValue;
        Hyoa_listconfig.hy_sortfield2 = this.txtselsortfieldid2.Value;
        Hyoa_listconfig.hy_sorttype2 = this.ddlsorttype2.SelectedValue;
        Hyoa_listconfig.hy_sortfield3 = this.txtselsortfieldid3.Value;
        Hyoa_listconfig.hy_sorttype3 = this.ddlsorttype3.SelectedValue;
        Hyoa_listconfig.hy_fieldid_fl1 = this.txtflfieldid1.Value;
        Hyoa_listconfig.hy_fieldname_fl1 = this.txtflfieldname1.Value;
        Hyoa_listconfig.hy_sql_fl1 = this.txthy_field_fl1.Text;
        Hyoa_listconfig.hy_fieldid_fl2 = this.txtflfieldid2.Value;
        Hyoa_listconfig.hy_fieldname_fl2 = this.txtflfieldname2.Value;
        Hyoa_listconfig.hy_sql_fl2 = this.txthy_field_fl2.Text;
        Hyoa_listconfig.hy_fieldid_fl3 = this.txtflfieldid3.Value;
        Hyoa_listconfig.hy_fieldname_fl3 = this.txtflfieldname3.Value;
        Hyoa_listconfig.hy_sql_fl3 = this.txthy_field_fl3.Text;
        if (this.txtop.Value == "add")
        {
            lscolunid = Hyoa_global.GetRandom();
            Hyoa_listconfig.ID = lscolunid;
            Hyoa_listconfig.Insert();

            //向查询字段表中插入数据
            string[] lv_selsearchid;
            string[] lv_selsearch;
            lv_selsearchid = this.txtselsearchid.Value.ToString().Split(',');
            lv_selsearch = this.txtselsearch.Value.ToString().Split(',');
            for (int m = 0; m < lv_selsearchid.Length; m++)
            {
                Hyoa_listsearchfield.ID = Hyoa_global.GetRandom();
                Hyoa_listsearchfield.hy_listid = lscolunid;
                Hyoa_listsearchfield.hy_mudelid = this.ddlmudelid.SelectedValue;
                Hyoa_listsearchfield.hy_tableid = this.ddltableid.SelectedValue;
                Hyoa_listsearchfield.hy_field = lv_selsearch[m];
                Hyoa_listsearchfield.hy_fieldid = lv_selsearchid[m];
                Hyoa_listsearchfield.hy_sort = m + 1;
                Hyoa_listsearchfield.Insert();
            }
        }
        else
        {
            Hyoa_listconfig.ID = this.txtdocid.Value;
            Hyoa_listconfig.Update();

            //向查询字段表中插入数据
            //要先删除再插入
            Hyoa_listsearchfield.hy_listid = this.txtdocid.Value;
            Hyoa_listsearchfield.DeleteBylistid();

            string[] lv_selsearchid;
            string[] lv_selsearch;
            lv_selsearchid = this.txtselsearchid.Value.ToString().Split(',');
            lv_selsearch = this.txtselsearch.Value.ToString().Split(',');
            for (int m = 0; m < lv_selsearchid.Length; m++)
            {
                Hyoa_listsearchfield.ID = Hyoa_global.GetRandom();
                Hyoa_listsearchfield.hy_listid = this.txtdocid.Value;
                Hyoa_listsearchfield.hy_mudelid = this.ddlmudelid.SelectedValue;
                Hyoa_listsearchfield.hy_tableid = this.ddltableid.SelectedValue;
                Hyoa_listsearchfield.hy_field = lv_selsearch[m];
                Hyoa_listsearchfield.hy_fieldid = lv_selsearchid[m];
                Hyoa_listsearchfield.hy_sort = m;
                Hyoa_listsearchfield.Insert();
            }
        }

        //处理完成后的提示及跳转
        if (this.txtifpop.Value == "")
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
        }
        else
        {
            Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
        }
    }