コード例 #1
0
ファイル: main_ml2.aspx.cs プロジェクト: wjszxli/Webapp
    private void DataPlay()
    {
        //加载一级目录ID、一级目录名称、每个一级目录最大的二级目录
        HyoaClass.Hyoa_ml Hyoa_firstml = new HyoaClass.Hyoa_ml();
        DataTable dtfirstml = Hyoa_firstml.GetFirstmls();
        if (dtfirstml.Rows.Count > 0)
        {
            this.ddlfirstmlid.DataSource = dtfirstml;
            this.ddlfirstmlid.DataTextField = "MLID";
            this.ddlfirstmlid.DataValueField = "MLID";
            this.ddlfirstmlid.DataBind();
            this.ddlfirstmlid.Items.Insert(0, "--请选择--");
            this.ddlfirstmlid.SelectedIndex = 0;
            this.ddlfirstmlname.DataSource = dtfirstml;
            this.ddlfirstmlname.DataTextField = "MLName";
            this.ddlfirstmlname.DataValueField = "MLName";
            this.ddlfirstmlname.DataBind();
            this.ddlfirstmlname.Items.Insert(0, "--请选择--");
            this.ddlfirstmlname.SelectedIndex = 0;
            //加载每个一级目录最大的二级目录
            string ls_id;
            for (var i = 0; i < dtfirstml.Rows.Count; i++)
            {
                ls_id = Hyoa_firstml.GetMaxMLID(dtfirstml.Rows[i]["MLID"].ToString());
                this.ddlsecondmlid.Items.Insert(i, ls_id);
            }
            this.ddlsecondmlid.Items.Insert(0, "--请选择--");
            this.ddlsecondmlid.SelectedIndex = 0;
        }

        //加载模块信息
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dtmudel = Hyoa_mudel.Getmudels();
        if (dtmudel.Rows.Count > 0)
        {
            this.ddlmudelid.DataSource = dtmudel;
            this.ddlmudelid.DataTextField = "hy_mudelname";
            this.ddlmudelid.DataValueField = "hy_mudelid";
            this.ddlmudelid.DataBind();
            this.ddlmudelid.Items.Insert(0, "--请选择--");
            this.ddlmudelid.SelectedIndex = 0;
        }

        //加载权限
        HyoaClass.Hyoa_role Hyoa_role = new HyoaClass.Hyoa_role();
        DataTable dtrole = Hyoa_role.Getroles();
        if (dtrole.Rows.Count > 0)
        {
            this.ddlrole.DataSource = dtrole;
            this.ddlrole.DataTextField = "hy_rolename";
            this.ddlrole.DataValueField = "hy_roleid";
            this.ddlrole.DataBind();
            this.ddlrole.Items.Insert(0, "--请选择--");
            this.ddlrole.SelectedIndex = 0;
        }

        this.ddlisenabled.Items.Insert(0, "是");
        this.ddlisenabled.Items.Insert(1, "否");

        if (this.Request.QueryString["op"] != null)
        {
            this.txtop.Value = this.Request.QueryString["op"].ToString();           //新增还是修改

            //判断当前用户是否有保存的权限
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
            {
                this.btn_submit.Visible = true; //保存
            }
            else
            {
                this.btn_submit.Visible = false; //保存
            }

            HyoaClass.Hyoa_ml Hyoa_ml = new HyoaClass.Hyoa_ml();

            //旧文档
            if (this.Request.QueryString["op"] == "modify")
            {
                if (this.Request.QueryString["id"] != null)
                {
                    //根据id得到信息
                    this.lblid.Value = this.Request.QueryString["id"].ToString();
                    this.txtMLID.Value = this.Request.QueryString["id"].ToString();
                    DataTable dt = Hyoa_ml.Getml(this.lblid.Value);
                    if (dt.Rows.Count > 0)
                    {
                        this.txtname.Value = dt.Rows[0]["MLName"].ToString();
                        this.txtlink.Value = dt.Rows[0]["hy_link"].ToString();
                        this.ddltarget.SelectedValue = dt.Rows[0]["hy_target"].ToString();
                        this.ddlrole.SelectedValue = dt.Rows[0]["hy_role"].ToString();
                        this.txtsort.Value = dt.Rows[0]["hy_sort"].ToString();
                        //模块信息定位
                        for (var i = 0; i < this.ddlmudelid.Items.Count; i++)
                        {
                            if (this.ddlmudelid.Items[i].Value == dt.Rows[0]["hy_mudelid"].ToString())
                            {
                                this.ddlmudelid.SelectedIndex = i;
                            }
                        }
                        //一级目录定位
                        for (var i = 0; i < this.ddlfirstmlid.Items.Count; i++)
                        {
                            if (this.ddlfirstmlid.Items[i].Value == dt.Rows[0]["MLID"].ToString().Substring(0,3))
                            {
                                this.ddlfirstmlid.SelectedIndex = i;
                                this.ddlfirstmlname.SelectedIndex = i;
                            }
                        }

                        if (dt.Rows[0]["hy_ifqy"].ToString() == "是")
                            this.ddlisenabled.SelectedIndex = 0;
                        else
                            this.ddlisenabled.SelectedIndex = 1;

                        //根据模块信息得到对应的选择表单值
                        if (dt.Rows[0]["hy_tableid"] != "" && dt.Rows[0]["hy_tableid"] != null)
                        {
                            this.ddltableid.Items.Clear();
                            //根据模块ID得到表单ID
                            HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
                            DataTable dtgettableid = Hyoa_tableconfig.GetTablesbymudelid(dt.Rows[0]["hy_mudelid"].ToString());
                            if (dtgettableid.Rows.Count > 0)
                            {
                                for (var i = 0; i < dtgettableid.Rows.Count; i++)
                                {
                                    this.ddltableid.Items.Insert(i, new ListItem(dtgettableid.Rows[i]["hy_name"].ToString(), dtgettableid.Rows[i]["ID"].ToString()));
                                }
                                this.ddltableid.Items.Insert(0, new ListItem("--请选择--", ""));
                                //定位
                                this.ddltableid.SelectedValue = dt.Rows[0]["hy_tableid"].ToString();
                            }
                        }
                    }
                    dt.Clear();
                }
            }
        }
    }
コード例 #2
0
    private void DataPlay()
    {
        this.btn_submit.Visible = false; //保存
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (Hyoa_global.isHaveRole("Role9999", (this.Session["hyuid"].ToString())))
        {
            this.btn_submit.Visible = true; //保存
        }

        //加载模块信息
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dtmudel = Hyoa_mudel.Getmudels();
        if (dtmudel.Rows.Count > 0)
        {
            this.ddlmudelid.DataSource = dtmudel;
            this.ddlmudelid.DataTextField = "hy_mudelname";
            this.ddlmudelid.DataValueField = "hy_mudelid";
            this.ddlmudelid.DataBind();
            this.ddlmudelid.Items.Insert(0, "--请选择--");
            this.ddlmudelid.SelectedIndex = 0;
        }

        //获取排序号
        HyoaClass.Hyoa_role Hyoa_role = new HyoaClass.Hyoa_role();
        DataTable dt = Hyoa_role.GetMaxrolesort();
        if (dt.Rows.Count > 0)
            this.txtno.Value = (System.Int32.Parse(dt.Rows[0]["hy_sort"].ToString()) + 2).ToString();
        else
            this.txtno.Value = "1";
    }
コード例 #3
0
    private void DataPlay()
    {
        //是否流程文档
        this.ddlifflowdoc.Items.Insert(0, "否");
        this.ddlifflowdoc.Items.Insert(1, "是");
        //是否显示所有文档非流程
        this.ddlifdisplayall.Items.Insert(0, "否");
        this.ddlifdisplayall.Items.Insert(1, "是");
        //是否进行评论
        this.ddlifcomment.Items.Insert(0, "否");
        this.ddlifcomment.Items.Insert(1, "是");
        //主表单显示的列数
        this.ddldisplaycol.Items.Insert(0, "4");
        this.ddldisplaycol.Items.Insert(1, "6");
        this.ddldisplaycol.Items.Insert(2, "8");
        this.ddldisplaycol.Items.Insert(3, "10");
        //只对流程模块起作用,流程完成后是否公开,是表示大家都能看,否表示不公开
        this.ddlispuballByflowYB.Items.Insert(0, "否");
        this.ddlispuballByflowYB.Items.Insert(1, "是");

        //加载模块
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dtmudel = Hyoa_mudel.Getmudels();
        if (dtmudel.Rows.Count > 0)
        {
            this.ddlmudelid.DataSource = dtmudel;
            this.ddlmudelid.DataTextField = "hy_mudelname";
            this.ddlmudelid.DataValueField = "hy_mudelid";
            this.ddlmudelid.DataBind();
            this.ddlmudelid.Items.Insert(0, "--请选择--");
            this.ddlmudelid.SelectedIndex = 0;
        }

        if (this.Request.QueryString["op"] != null)
        {
            this.txtop.Value = this.Request.QueryString["op"].ToString();           //新增还是修改

            //判断当前用户是否有保存的权限
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
            {
                this.btn_submit.Visible = true; //保存
            }
            else
            {
                this.btn_submit.Visible = false; //保存
            }

            //旧文档
            HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
            if (this.Request.QueryString["op"] == "modify")
            {
                if (this.Request.QueryString["id"] != null)
                {
                    //根据id得到信息
                    this.txtdocid.Text = this.Request.QueryString["id"].ToString();
                    this.txtdocid.Enabled = false;
                    DataTable dt = Hyoa_tableconfig.GetTable(this.txtdocid.Text);
                    if (dt.Rows.Count > 0)
                    {
                        this.ddlmudelid.SelectedValue = dt.Rows[0]["hy_mudelid"].ToString();
                        this.txtname.Value = dt.Rows[0]["hy_name"].ToString();
                        this.txtsort.Value = dt.Rows[0]["hy_sort"].ToString();
                        this.ddlifflowdoc.SelectedValue = dt.Rows[0]["hy_ifflowdoc"].ToString();
                        this.ddlifdisplayall.SelectedValue = dt.Rows[0]["hy_ifdisplayall"].ToString();
                        this.ddlifcomment.SelectedValue = dt.Rows[0]["hy_ifcomment"].ToString();
                        this.ddlispuballByflowYB.SelectedValue = dt.Rows[0]["hy_ispuballByflowYB"].ToString();
                        this.txthy_onload.Text = dt.Rows[0]["hy_onload"].ToString();
                        this.ddltablerole.SelectedValue = dt.Rows[0]["hy_tablerole"].ToString();
                        this.ddldisplaycol.SelectedValue = dt.Rows[0]["hy_colnum"].ToString();
                    }
                }
            }
            else
            {
                this.txtdocid.Text = "Table";
                //自动获取最大排序号,然后+2
                DataTable dt_maxsort = Hyoa_tableconfig.GetMaxtableconfigsort();
                if (dt_maxsort.Rows.Count > 0)
                    txtsort.Value = (int.Parse(dt_maxsort.Rows[0]["hy_sort"].ToString()) + 2).ToString();
                else
                    txtsort.Value = "1";
            }
        }
    }
コード例 #4
0
    private void DataPlay()
    {
        //是否启用
        this.ddlifsearch.Items.Insert(0, "是");
        this.ddlifsearch.Items.Insert(1, "否");
        this.ddlifflowdoc.Items.Insert(0, "是");
        this.ddlifflowdoc.Items.Insert(1, "否");
        this.ddlifshowsearch.Items.Insert(0, "是");
        this.ddlifshowsearch.Items.Insert(1, "否");
        //模块编号
        //加载模块信息
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dtmudel = Hyoa_mudel.Getmudels();
        if (dtmudel.Rows.Count > 0)
        {
            this.ddlmudelid.DataSource = dtmudel;
            this.ddlmudelid.DataTextField = "hy_mudelname";
            this.ddlmudelid.DataValueField = "hy_mudelid";
            this.ddlmudelid.DataBind();
            this.ddlmudelid.Items.Insert(0, new ListItem("请选择", "请选择"));
            this.ddlmudelid.SelectedIndex = 0;
        }

        if (this.Request.QueryString["op"] != null)
        {
            this.txtop.Value = this.Request.QueryString["op"].ToString();           //新增还是修改

            //判断当前用户是否有保存的权限
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
            {
                this.btn_submit.Visible = true; //保存
            }
            else
            {
                this.btn_submit.Visible = false; //保存
            }

            //旧文档
            HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
            if (this.Request.QueryString["op"] == "modify")
            {
                if (this.Request.QueryString["id"] != null)
                {
                    //根据id得到信息
                    this.txtdocid.Value = this.Request.QueryString["id"].ToString();
                    DataTable dt = Hyoa_listconfig.Getlistconfig(this.txtdocid.Value);
                    if (dt.Rows.Count > 0)
                    {
                        this.txtsort.Text = dt.Rows[0]["hy_sort"].ToString();
                        if (dt.Rows[0]["hy_ifsearch"].ToString() == "是")
                        {
                            this.ddlifsearch.SelectedIndex = 0;
                        }
                        else
                        {
                            this.ddlifsearch.SelectedIndex = 1;
                        }
                        if (dt.Rows[0]["hy_ifshowsearch"].ToString() != "否")
                        {
                            this.ddlifshowsearch.SelectedIndex = 0;
                        }
                        else
                        {
                            this.ddlifshowsearch.SelectedIndex = 1;
                        }
                        this.ddlmudelid.SelectedValue = dt.Rows[0]["hy_mudelid"].ToString();
                        if (dt.Rows[0]["hy_ifflowdoc"].ToString() == "是")
                        {
                            this.ddlifflowdoc.SelectedIndex = 0;
                        }
                        else
                        {
                            this.ddlifflowdoc.SelectedIndex = 1;
                        }
                        this.txthy_listname.Text = dt.Rows[0]["hy_listname"].ToString();
                        this.txtwidth.Text = dt.Rows[0]["hy_width"].ToString();

                        //加载所有列信息
                        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
                        DataTable dtflowfield;

                        //dtflowfield = Hyoa_flowfield.Getflowfields();
                        dtflowfield = Hyoa_flowfield.GetflowfieldsbyMudelidAndTableid(dt.Rows[0]["hy_mudelid"].ToString(), dt.Rows[0]["hy_tableid"].ToString());
                        if (dtflowfield.Rows.Count > 0)
                        {
                            this.ddlcolumnshow.DataSource = dtflowfield;
                            this.ddlcolumnshow.DataTextField = "hy_fieldname";
                            this.ddlcolumnshow.DataValueField = "hy_fieldid";
                            this.ddlcolumnshow.DataBind();
                            this.ddlcolumnshow.SelectedIndex = 0;
                        }
                        dtflowfield.Clear();

                        //将列都列出来
                        string[] lv_columnshowselect;
                        string[] lv_columnshowselectid;
                        lv_columnshowselect = dt.Rows[0]["hy_columnshow"].ToString().Split(',');
                        lv_columnshowselectid = dt.Rows[0]["hy_columnshowid"].ToString().Split(',');
                        for (int j = 0; j < lv_columnshowselect.Length; j++)
                        {
                            this.ddlcolumnshowselect.Items.Insert(j, new ListItem(lv_columnshowselect[j], lv_columnshowselectid[j]));
                        }

                        //根据模块信息得到对应的选择表单值
                        if (dt.Rows[0]["hy_tableid"] != "" && dt.Rows[0]["hy_tableid"] != null)
                        {
                            this.ddltableid.Items.Clear();
                            //根据模块ID得到表单ID
                            HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
                            DataTable dtgettableid = Hyoa_tableconfig.GetTablesbymudelid(dt.Rows[0]["hy_mudelid"].ToString());
                            if (dtgettableid.Rows.Count > 0)
                            {
                                for (var i = 0; i < dtgettableid.Rows.Count; i++)
                                {
                                    this.ddltableid.Items.Insert(i, new ListItem(dtgettableid.Rows[i]["hy_name"].ToString(), dtgettableid.Rows[i]["ID"].ToString()));
                                }
                                this.ddltableid.Items.Insert(0, new ListItem("--请选择--", ""));
                                this.ddltableid.Attributes.Add("onchange ", "mudelidonchang() ");
                                //定位
                                this.ddltableid.SelectedValue = dt.Rows[0]["hy_tableid"].ToString();
                            }
                        }

                        //排序的字段
                        //根据模块ID+表单ID+字段ID得到字段中文名
                        DataTable dt_flowfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(dt.Rows[0]["hy_mudelid"].ToString(), dt.Rows[0]["hy_sortfield1"].ToString(), dt.Rows[0]["hy_tableid"].ToString());
                        if (dt_flowfield.Rows.Count > 0)
                        {
                            this.searchsort1.Items.Insert(0, new ListItem(dt_flowfield.Rows[0]["hy_fieldname"].ToString(), dt.Rows[0]["hy_sortfield1"].ToString()));
                        }
                        this.ddlsorttype1.SelectedValue = dt.Rows[0]["hy_sorttype1"].ToString();
                        dt_flowfield.Clear();
                        dt_flowfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(dt.Rows[0]["hy_mudelid"].ToString(), dt.Rows[0]["hy_sortfield2"].ToString(), dt.Rows[0]["hy_tableid"].ToString());
                        if (dt_flowfield.Rows.Count > 0)
                        {
                            this.searchsort2.Items.Insert(0, new ListItem(dt_flowfield.Rows[0]["hy_fieldname"].ToString(), dt.Rows[0]["hy_sortfield2"].ToString()));
                        }
                        this.ddlsorttype2.SelectedValue = dt.Rows[0]["hy_sorttype2"].ToString();
                        dt_flowfield.Clear();
                        dt_flowfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(dt.Rows[0]["hy_mudelid"].ToString(), dt.Rows[0]["hy_sortfield3"].ToString(), dt.Rows[0]["hy_tableid"].ToString());
                        if (dt_flowfield.Rows.Count > 0)
                        {
                            this.searchsort3.Items.Insert(0, new ListItem(dt_flowfield.Rows[0]["hy_fieldname"].ToString(), dt.Rows[0]["hy_sortfield3"].ToString()));
                        }
                        this.ddlsorttype3.SelectedValue = dt.Rows[0]["hy_sorttype3"].ToString();
                        dt_flowfield.Clear();
                        //分类的字段
                        this.txthy_field_fl1.Text = dt.Rows[0]["hy_sql_fl1"].ToString();
                        if (dt.Rows[0]["hy_fieldid_fl1"].ToString() != "")
                        {
                            this.flfield1.Items.Insert(0, new ListItem(dt.Rows[0]["hy_fieldname_fl1"].ToString(), dt.Rows[0]["hy_fieldid_fl1"].ToString()));
                        }
                        this.txthy_field_fl2.Text = dt.Rows[0]["hy_sql_fl2"].ToString();
                        if (dt.Rows[0]["hy_fieldid_fl2"].ToString() != "")
                        {
                            this.flfield2.Items.Insert(0, new ListItem(dt.Rows[0]["hy_fieldname_fl2"].ToString(), dt.Rows[0]["hy_fieldid_fl2"].ToString()));
                        }
                        this.txthy_field_fl3.Text = dt.Rows[0]["hy_sql_fl3"].ToString();
                        if (dt.Rows[0]["hy_fieldid_fl3"].ToString() != "")
                        {
                            this.flfield3.Items.Insert(0, new ListItem(dt.Rows[0]["hy_fieldname_fl3"].ToString(), dt.Rows[0]["hy_fieldid_fl3"].ToString()));
                        }
                    }
                    dt.Clear();
                    HyoaClass.Hyoa_listsearchfield Hyoa_listsearchfield = new HyoaClass.Hyoa_listsearchfield();
                    DataTable dt5 = Hyoa_listsearchfield.Getlistsearchfieldsbylistid(this.txtdocid.Value);
                    if (dt5.Rows.Count > 0)
                    {
                        for (int m = 0; m < dt5.Rows.Count; m++)
                        {
                            this.searchselect.Items.Insert(m, new ListItem(dt5.Rows[m]["hy_field"].ToString(), dt5.Rows[m]["hy_fieldid"].ToString()));
                        }
                    }
                }
            }
            else
            {
                //自动获取最大排序号,然后+2
                DataTable dt_maxsort = Hyoa_listconfig.GetMaxlistconfigsort();
                if (dt_maxsort.Rows.Count > 0)
                    txtsort.Text = (int.Parse(dt_maxsort.Rows[0]["hy_sort"].ToString()) + 2).ToString();
                else
                    txtsort.Text = "1";
            }
        }
    }
コード例 #5
0
    private void DataPlay()
    {
        //是否启用
        this.ddlifsearch.Items.Insert(0, "是");
        this.ddlifsearch.Items.Insert(1, "否");
        //this.ddlifflowdoc.Items.Insert(0, "是");
        //this.ddlifflowdoc.Items.Insert(1, "否");
        //模块编号
        //加载模块信息
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dtmudel = Hyoa_mudel.Getmudels();
        if (dtmudel.Rows.Count > 0)
        {
            this.ddlmudelid.DataSource = dtmudel;
            this.ddlmudelid.DataTextField = "hy_mudelname";
            this.ddlmudelid.DataValueField = "hy_mudelid";
            this.ddlmudelid.DataBind();
            this.ddlmudelid.Items.Insert(0, new ListItem("请选择", "请选择"));
            this.ddlmudelid.SelectedIndex = 0;
            //this.ddlmudelid.Items.Insert(0, new ListItem(lsmudel, lsmudelid));

        }
        //dtmudel.Clear();
        //加载列信息
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dtflowfield;

        dtflowfield = Hyoa_flowfield.Getflowfields();
        if (dtflowfield.Rows.Count > 0)
        {
            this.ddlcolumnshow.DataSource = dtflowfield;
            this.ddlcolumnshow.DataTextField = "hy_fieldname";
            this.ddlcolumnshow.DataValueField = "hy_fieldid";
            this.ddlcolumnshow.DataBind();
            this.ddlcolumnshow.SelectedIndex = 0;
        }
        dtflowfield.Clear();

        if (this.Request.QueryString["op"] != null)
        {
            this.txtop.Value = this.Request.QueryString["op"].ToString();           //新增还是修改

            //判断当前用户是否有保存的权限
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
            {
                this.btn_submit.Visible = true; //保存
            }
            else
            {
                this.btn_submit.Visible = false; //保存
            }

            //旧文档
            if (this.Request.QueryString["op"] == "modify")
            {
                string ls_xszd="";
                string ls_xszdid="";
                if (this.Request.QueryString["id"] != null)
                {
                    //根据id得到信息

                    this.txtdocid.Value = this.Request.QueryString["id"].ToString();
                    HyoaClass.DAO db = new HyoaClass.DAO();
                    string sql = "select * from hyt_searchconfig where ID='" + this.txtdocid.Value + "'";
                    DataTable dt = db.GetDataTable(sql);
                    if (dt.Rows.Count > 0)
                    {
                        this.txtsort.Text = dt.Rows[0]["hy_sort"].ToString();
                        //this.txtwidth.Text = dt.Rows[0]["hy_width"].ToString();
                        if (dt.Rows[0]["hy_ifsearch"].ToString() == "是")
                            this.ddlifsearch.SelectedIndex = 0;
                        else
                            this.ddlifsearch.SelectedIndex = 1;

                        this.ddlmudelid.SelectedValue = dt.Rows[0]["hy_mudelid"].ToString();
                        this.hy_field41_1.Value = dt.Rows[0]["hy_kckry"].ToString();
                        this.hy_field43_1.Value = dt.Rows[0]["hy_kckryid"].ToString();
                        //将列都列出来
                        string[] lv_columnshowselect;
                        string[] lv_columnshowselectid;
                        lv_columnshowselect = dt.Rows[0]["hy_columnshow"].ToString().Split(',');
                        lv_columnshowselectid = dt.Rows[0]["hy_columnshowid"].ToString().Split(',');
                        for (int j = 0; j < lv_columnshowselect.Length; j++)
                        {
                            this.ddlcolumnshowselect.Items.Insert(j, new ListItem(lv_columnshowselect[j], lv_columnshowselectid[j]));
                        }

                        //根据模块信息得到对应的选择表单值
                        if (dt.Rows[0]["hy_tableid"] != "" && dt.Rows[0]["hy_tableid"] != null)
                        {
                            this.ddltableid.Items.Clear();
                            //根据模块ID得到表单ID
                            HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
                            DataTable dtgettableid = Hyoa_tableconfig.GetTablesbymudelid(dt.Rows[0]["hy_mudelid"].ToString());
                            if (dtgettableid.Rows.Count > 0)
                            {
                                for (var i = 0; i < dtgettableid.Rows.Count; i++)
                                {
                                    this.ddltableid.Items.Insert(i, new ListItem(dtgettableid.Rows[i]["hy_name"].ToString(), dtgettableid.Rows[i]["ID"].ToString()));
                                }
                                this.ddltableid.Items.Insert(0, new ListItem("--请选择--", ""));
                                this.ddltableid.Attributes.Add("onchange ", "mudelidonchang() ");
                                //定位
                                this.ddltableid.SelectedValue = dt.Rows[0]["hy_tableid"].ToString();
                            }
                        }

                        //排序的字段
                        //根据模块ID+表单ID+字段ID得到字段中文名
                        //DataTable dt_flowfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(dt.Rows[0]["hy_mudelid"].ToString(), dt.Rows[0]["hy_sortfield"].ToString(), dt.Rows[0]["hy_tableid"].ToString());
                        //if(dt_flowfield.Rows.Count>0)
                        //    this.searchsort.Items.Insert(0, new ListItem(dt_flowfield.Rows[0]["hy_fieldname"].ToString(), dt.Rows[0]["hy_sortfield"].ToString()));

                        //this.ddlsorttype.SelectedValue = dt.Rows[0]["hy_sorttype"].ToString();

                        ls_xszd = dt.Rows[0]["hy_xszd"].ToString();
                        ls_xszdid = dt.Rows[0]["hy_xszdid"].ToString();

                    }
                    dt.Clear();
                    //HyoaClass.Hyoa_listsearchfield Hyoa_listsearchfield = new HyoaClass.Hyoa_listsearchfield();
                    //DataTable dt5 = Hyoa_listsearchfield.Getlistsearchfieldsbylistid(this.txtdocid.Value);
                    //if (dt5.Rows.Count > 0)
                    //{
                    //    for (int m = 0; m < dt5.Rows.Count; m++)
                    //    {
                    //        this.searchselect.Items.Insert(m, new ListItem(dt5.Rows[m]["hy_field"].ToString(), dt5.Rows[m]["hy_fieldid"].ToString()));
                    //    }
                    //}
                    string[] lv_xszd = ls_xszd.Split(',');
                    string[] lv_xszdid = ls_xszdid.Split(',');
                    for (int jj = 0; jj < lv_xszd.Length; jj++)
                    {
                        this.searchselect.Items.Insert(jj, new ListItem(lv_xszd[jj], lv_xszdid[jj]));
                    }

                }
            }
        }
    }
コード例 #6
0
ファイル: main_flowinfor.aspx.cs プロジェクト: wjszxli/Webapp
    private void DataPlay()
    {
        if (this.Request.QueryString["op"] != null)
        {
            this.txtop.Value = this.Request.QueryString["op"].ToString();           //新增还是修改

            //判断当前用户是否有保存的权限
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
            {
                this.btn_submit.Visible = true; //保存
            }
            else
            {
                this.btn_submit.Visible = false; //保存
            }

            //加载模块
            HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
            DataTable dtmudel = Hyoa_mudel.Getmudels();
            if (dtmudel.Rows.Count > 0)
            {
                this.ddlmudelid.DataSource = dtmudel;
                this.ddlmudelid.DataTextField = "hy_mudelname";
                this.ddlmudelid.DataValueField = "hy_mudelid";
                this.ddlmudelid.DataBind();
                this.ddlmudelid.Items.Insert(0, "--请选择--");
                this.ddlmudelid.SelectedIndex = 0;
            }

            //旧文档
            if (this.Request.QueryString["op"] == "modify")
            {
                if (this.Request.QueryString["id"] != null)
                {
                    //根据id得到信息
                    this.txtid.Text = this.Request.QueryString["id"].ToString();
                    HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
                    DataTable dt = Hyoa_flowinfor.Getflowinfor(this.txtid.Text);
                    if (dt.Rows.Count > 0)
                    {
                        this.txtname.Value = dt.Rows[0]["hy_flowname"].ToString();
                        this.txtsort.Value = dt.Rows[0]["hy_sort"].ToString();
                        this.ddlmudelid.SelectedValue = dt.Rows[0]["hy_mudelid"].ToString();
                    }
                    dt.Clear();
                    this.txtid.Enabled = false;
                }
            }
        }
    }
コード例 #7
0
    private void DataPlay()
    {
        //是否流程文档
        this.ddlifflowdoc.Items.Insert(0, "否");
        this.ddlifflowdoc.Items.Insert(1, "是");

        //加载模块
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dtmudel = Hyoa_mudel.Getmudels();
        if (dtmudel.Rows.Count > 0)
        {
            this.ddlmudelidbymd.DataSource = dtmudel;
            this.ddlmudelidbymd.DataTextField = "hy_mudelname";
            this.ddlmudelidbymd.DataValueField = "hy_mudelid";
            this.ddlmudelidbymd.DataBind();
            this.ddlmudelidbymd.Items.Insert(0, "--请选择--");
            this.ddlmudelidbymd.SelectedIndex = 0;
        }

        //判断当前用户是否有保存的权限
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
        {
            this.btn_submit.Visible = true; //保存
        }
        else
        {
            this.btn_submit.Visible = false; //保存
        }

        if (this.Request.QueryString["id"] != null)
        {
            //根据id得到信息
            this.txtdocid.Value = this.Request.QueryString["id"].ToString();
            HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
            DataTable dt = Hyoa_tableconfig.GetTable(this.txtdocid.Value);
            if (dt.Rows.Count > 0)
            {
                this.lbtableidbysorce.Text = this.txtdocid.Value;
                this.lbmudelnamebysource.Text = dt.Rows[0]["hy_name"].ToString();
                this.lbmudelidbysource.Text = dt.Rows[0]["hy_mudelid"].ToString();
                this.ddlifflowdoc.SelectedValue = dt.Rows[0]["hy_ifflowdoc"].ToString();
            }
            dt.Clear();
        }
    }
コード例 #8
0
ファイル: main_iplimit.aspx.cs プロジェクト: wjszxli/Webapp
    private void DataPlay()
    {
        //是否启用
        this.ddlisenabled.Items.Insert(0, "是");
        this.ddlisenabled.Items.Insert(1, "否");
        //模块编号
        //加载模块
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dtmudel = Hyoa_mudel.Getmudels();
        if (dtmudel.Rows.Count > 0)
        {
            this.ddlmudelid.DataSource = dtmudel;
            this.ddlmudelid.DataTextField = "hy_mudelname";
            this.ddlmudelid.DataValueField = "hy_mudelid";
            this.ddlmudelid.DataBind();
            this.ddlmudelid.Items.Insert(0, "--请选择--");
            this.ddlmudelid.SelectedIndex = 0;
        }

        if (this.Request.QueryString["op"] != null)
        {
            this.txtop.Value = this.Request.QueryString["op"].ToString();           //新增还是修改

            //判断当前用户是否有保存的权限
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
            {
                this.btn_submit.Visible = true; //保存
            }
            else
            {
                this.btn_submit.Visible = false; //保存
            }

            //旧文档
            if (this.Request.QueryString["op"] == "modify")
            {
                if (this.Request.QueryString["id"] != null)
                {
                    //根据id得到信息
                    this.txtdocid.Value = this.Request.QueryString["id"].ToString();
                    HyoaClass.Hyoa_iplimit Hyoa_iplimit = new HyoaClass.Hyoa_iplimit();
                    DataTable dt = Hyoa_iplimit.Getiplimit(this.txtdocid.Value);
                    if (dt.Rows.Count > 0)
                    {
                        this.txtiplists.Value = dt.Rows[0]["hy_iplists"].ToString();

                        if (dt.Rows[0]["hy_isenabled"].ToString() == "是")
                            this.ddlisenabled.SelectedIndex = 0;
                        else
                            this.ddlisenabled.SelectedIndex = 1;

                        this.ddlmudelid.SelectedValue = dt.Rows[0]["hy_mudelid"].ToString();
                    }
                    dt.Clear();
                }
            }
        }
    }
コード例 #9
0
ファイル: list_mudel.aspx.cs プロジェクト: wjszxli/Webapp
    private void DataPlay(int PageNo)
    {
        //判断当前用户是否有新建删除权限
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
        {
            this.isrole.Value = "1";
            this.tdnewdoc.Visible = true; //新建
            this.tddeldoc.Visible = true; //删除

        }
        else
        {
            this.isrole.Value = "0";
            this.tdnewdoc.Visible = false; //新建
            this.tddeldoc.Visible = false; //删除
        }

        //得到当前页号
        this.curpage.Text = PageNo.ToString();
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();

        DataTable dt;
        dt = Hyoa_mudel.Getmudels();

        DataTable tempTable = dt.Clone();
        for (int i = (PageNo - 1) * System.Int32.Parse(PageSize.Text); i < PageNo * System.Int32.Parse(PageSize.Text); i++)
        {
            if (i > dt.Rows.Count - 1)
                break;

            DataRow dr = tempTable.NewRow();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            tempTable.Rows.Add(dr);
        }

        int TotalRecord = dt.Rows.Count;
        this.sumts.Text = TotalRecord.ToString();
        this.sumts2.Text = TotalRecord.ToString();
        this.ShowTotalRecord.Text = TotalRecord.ToString();
        //计算及显示总页数
        int TotalPage;
        if (TotalRecord < System.Int32.Parse(PageSize.Text))
        {
            TotalPage = 1;
        }
        else
        {
            if (TotalRecord % System.Int32.Parse(PageSize.Text) != 0)
            {
                TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text) + 1;

            }
            else
            {
                TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text);

            }
        }
        this.ShowTotalPage.Text = TotalPage.ToString();
        this.rptlist.DataSource = tempTable;
        this.rptlist.DataBind();
        dt.Clear();
    }
コード例 #10
0
ファイル: main_flowcopy.aspx.cs プロジェクト: wjszxli/Webapp
    private void DataPlay()
    {
        //判断当前用户是否有保存的权限
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
        {
            this.btn_submit.Visible = true; //保存
        }
        else
        {
            this.btn_submit.Visible = false; //保存
        }

        //加载模块
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dtmudel = Hyoa_mudel.Getmudels();
        if (dtmudel.Rows.Count > 0)
        {
            this.ddlmudelid.DataSource = dtmudel;
            this.ddlmudelid.DataTextField = "hy_mudelname";
            this.ddlmudelid.DataValueField = "hy_mudelid";
            this.ddlmudelid.DataBind();
            this.ddlmudelid.Items.Insert(0, "--请选择--");
            this.ddlmudelid.SelectedIndex = 0;
        }

        //根据流程ID得到流程名称
        if (this.txtSrcFlowID.Value != "")
        {
            HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
            DataTable dt = Hyoa_flowinfor.Getflowinfor(this.txtSrcFlowID.Value);
            if(dt.Rows.Count>0)
            {
                this.lblSrcFlowID.Text = this.txtSrcFlowID.Value;
                this.lblSrcFlowName.Text = dt.Rows[0]["hy_flowname"].ToString();
            }
        }
    }