//流程权限列表
    protected string fflowtacherole()
    {
        string ls_return = "";
        string ls_userid = "";
        string ls_flowtaches = "";
        if (this.Request.QueryString["userid"] != null)
        {
            ls_userid = this.Request.QueryString["userid"].ToString();
            //得到已有的流程权限
            HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
            DataTable dtflowtacheuser = Hyoa_flowtacheuser.Getflowtachesbyuserid(ls_userid);
            if (dtflowtacheuser.Rows.Count > 0)
            {
                for (var i = 0; i < dtflowtacheuser.Rows.Count; i++)
                {
                    ls_flowtaches += "," + dtflowtacheuser.Rows[i]["hy_flowid"].ToString() + "_" + dtflowtacheuser.Rows[i]["hy_tacheid"].ToString();
                }
                this.fdHaveFlowTacheid.Value = ls_flowtaches + ",";
            }

            HyoaClass.Hyoa_flowtache Hyoa_flowtache = new HyoaClass.Hyoa_flowtache();
            DataTable dt = Hyoa_flowtache.Getflowtachesorderbyflowidandsort();
            //加载
            if (dt.Rows.Count > 0)
            {
                for (var i = 0; i < dt.Rows.Count; i++)
                {
                    if (ls_flowtaches == "")
                    {
                        ls_return += "<td width=\"25%\"><input type=\"checkbox\" name=\"fFlowTacheName\" value=\"" + dt.Rows[i]["hy_flowid"].ToString() + "_" + dt.Rows[i]["hy_tacheid"].ToString() + "\">" + dt.Rows[i]["hy_flowname"].ToString() + "_" + dt.Rows[i]["hy_tachename"].ToString() + "</td>";
                    }
                    else
                    {
                        if (ls_flowtaches.Contains(dt.Rows[i]["hy_flowid"].ToString() + "_" + dt.Rows[i]["hy_tacheid"].ToString()))
                        {
                            ls_return += "<td width=\"25%\"><input type=\"checkbox\" checked=\"checked\" name=\"fFlowTacheName\" value=\"" + dt.Rows[i]["hy_flowid"].ToString() + "_" + dt.Rows[i]["hy_tacheid"].ToString() + "\">" + dt.Rows[i]["hy_flowname"].ToString() + "_" + dt.Rows[i]["hy_tachename"].ToString() + "</td>";
                        }
                        else
                        {
                            ls_return += "<td width=\"25%\"><input type=\"checkbox\" name=\"fFlowTacheName\" value=\"" + dt.Rows[i]["hy_flowid"].ToString() + "_" + dt.Rows[i]["hy_tacheid"].ToString() + "\">" + dt.Rows[i]["hy_flowname"].ToString() + "_" + dt.Rows[i]["hy_tachename"].ToString() + "</td>";
                        }
                    }

                    if (((i + 1) % 4) == 0 && i < dt.Rows.Count)
                        ls_return += "</tr><tr>";

                }
            }
            dtflowtacheuser.Clear();
            dt.Clear();
        }
        return ls_return;
    }
    //流程权限列表
    protected string fflowtacherole()
    {
        string ls_return = "";
        string ls_userid = "";
        string ls_flowtaches = "";
        if (this.Request.QueryString["userid"] != null)
        {
            ls_userid = this.Request.QueryString["userid"].ToString();
            //得到已有的流程权限
            HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
            DataTable dtflowtacheuser = Hyoa_flowtacheuser.Getflowtachesbyuserid(ls_userid);
            if (dtflowtacheuser.Rows.Count > 0)
            {
                for (var i = 0; i < dtflowtacheuser.Rows.Count; i++)
                {
                    ls_flowtaches += "," + dtflowtacheuser.Rows[i]["hy_flowid"].ToString() + "^" + dtflowtacheuser.Rows[i]["hy_tacheid"].ToString();
                }
                this.fdHaveFlowTacheid.Value = ls_flowtaches + ",";
            }

            HyoaClass.Hyoa_flowtache Hyoa_flowtache = new HyoaClass.Hyoa_flowtache();
            DataTable dt = Hyoa_flowtache.Getflowtachesorderbyflowidandsort();
            //加载
            int j = 0;
            if (dt.Rows.Count > 0)
            {
                string hy_flowname = "";
                for (var i = 0; i < dt.Rows.Count; i++)
                {
                    if (i == 0)
                    {
                        hy_flowname = dt.Rows[i]["hy_flowname"].ToString();
                        ls_return += "<tr><td colspan=\"4\" align=\"center\" style=\"border-bottom:1px solid #cccccc\"><font color=\"red\">" + hy_flowname + "</font></tr><tr>";
                    }
                    if (i > 0 && hy_flowname != dt.Rows[i]["hy_flowname"].ToString())
                    {
                        //先补齐前边没有输出的td
                        int n = 4 - j + 1;
                        for (int m = 0; m < n; m++)
                        {
                            //Response.Write(n + "<br />");
                            ls_return += "<td style=\"border-bottom:1px solid #cccccc\" width=\"25%\"></td>";
                        }
                        hy_flowname = dt.Rows[i]["hy_flowname"].ToString();
                        ls_return += "</tr><tr><td colspan=\"4\" align=\"center\" style=\"border-bottom:1px solid #cccccc\"><font color=\"red\">" + hy_flowname + "</font></tr><tr>";
                        j = 0;
                    }

                    if (ls_flowtaches == "")
                    {
                        ls_return += "<td style=\"border-bottom:1px solid #cccccc\" width=\"25%\"><input type=\"checkbox\" name=\"fFlowTacheName\" value=\"" + dt.Rows[i]["hy_flowid"].ToString() + "^" + dt.Rows[i]["hy_tacheid"].ToString() + "\">" + dt.Rows[i]["hy_flowname"].ToString() + "^" + dt.Rows[i]["hy_tachename"].ToString() + "</td>";
                    }
                    else
                    {
                        if (("," + ls_flowtaches + ",").Contains("," + dt.Rows[i]["hy_flowid"].ToString() + "^" + dt.Rows[i]["hy_tacheid"].ToString() + ","))
                        {
                            ls_return += "<td style=\"border-bottom:1px solid #cccccc\" width=\"25%\"><input type=\"checkbox\" checked=\"checked\" name=\"fFlowTacheName\" value=\"" + dt.Rows[i]["hy_flowid"].ToString() + "^" + dt.Rows[i]["hy_tacheid"].ToString() + "\">" + dt.Rows[i]["hy_flowname"].ToString() + "^" + dt.Rows[i]["hy_tachename"].ToString() + "</td>";
                        }
                        else
                        {
                            ls_return += "<td style=\"border-bottom:1px solid #cccccc\" width=\"25%\"><input type=\"checkbox\" name=\"fFlowTacheName\" value=\"" + dt.Rows[i]["hy_flowid"].ToString() + "^" + dt.Rows[i]["hy_tacheid"].ToString() + "\">" + dt.Rows[i]["hy_flowname"].ToString() + "^" + dt.Rows[i]["hy_tachename"].ToString() + "</td>";
                        }
                    }

                    if (((j + 1) % 4) == 0 && j < dt.Rows.Count)
                    {
                        ls_return += "</tr><tr>";
                        j = 0;
                    }
                    j += 1;

                }
            }
            dtflowtacheuser.Clear();
            dt.Clear();
        }
        return ls_return;
    }