示例#1
0
    private void DataPlay()
    {
        if (Request.QueryString["id"] != null)
        {
            string ls_docid = Request.QueryString["id"].ToString();

            //根据ID得到出车记录
            HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
            DataTable dt = Hyoa_flowmain.Getflowmain(ls_docid);
            if (dt.Rows.Count > 0)
            {
                this.Label1.Text = dt.Rows[0]["hy_djrname"].ToString();
                this.Label2.Text = dt.Rows[0]["hy_djsj"].ToString();
                this.Label3.Text = dt.Rows[0]["hy_djrbmname"].ToString();
                this.Label4.Text = dt.Rows[0]["hy_field1"].ToString();
                this.Label5.Text = dt.Rows[0]["hy_bt"].ToString();
                this.Label6.Text = dt.Rows[0]["hy_field9"].ToString();
                this.Label7.Text = dt.Rows[0]["hy_field32"].ToString();
                this.Label8.Text = dt.Rows[0]["hy_field33"].ToString();
                this.Label9.Text = dt.Rows[0]["hy_field2"].ToString();
                this.Label10.Text = dt.Rows[0]["hy_content1"].ToString();
                this.Label11.Text = dt.Rows[0]["hy_field5"].ToString();
                this.Label12.Text = dt.Rows[0]["hy_field6"].ToString();
                this.Label13.Text = dt.Rows[0]["hy_field38"].ToString();
                this.Label14.Text = dt.Rows[0]["hy_field3"].ToString();
            }
        }
    }
示例#2
0
    protected void WebPageOpen()
    {
        string ls_uid = "";
        string ls_uname = "";
        string ls_deptid = "";
        string ls_deptname = "";
        string ls_key = "";
        string ls_url = "";
        string ls_docid = "";

        if (this.Request.QueryString["uid"] != null)
            ls_uid = this.Request.QueryString["uid"].ToString();

        if (this.Request.QueryString["key"] != null)
            ls_key = this.Request.QueryString["key"].ToString();

        if (this.Request.QueryString["docid"] != null)
            ls_docid = this.Request.QueryString["docid"].ToString();

        int pos = Request.RawUrl.IndexOf("&redirectto=");
        if (pos > 0)
            ls_url = this.Request.RawUrl.Substring(pos + 12);

        if (ls_key != "cd04fa144ec48507")
            Response.Write("<script language=javascript>alert('非常抱歉,您的访问地址有误,请联系管理员!');self.close();</script>");

        //判断该用户是否存在
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        DataTable dt_user = Hyoa_user.Getuserallinfo(ls_uid);
        if (dt_user.Rows.Count > 0)
        {
            ls_uname = dt_user.Rows[0]["hy_username"].ToString();
            ls_deptid = dt_user.Rows[0]["hy_deptid"].ToString();
            ls_deptname = dt_user.Rows[0]["hy_deptname"].ToString();
        }
        else
        {
            Response.Write("<script>alert('未找到该用户信息,请联系管理员!');self.close();</script>");
        }

        Session["hyuid"] = ls_uid;
        Session["hyuname"] = ls_uname;
        Session["hydeptid"] = ls_deptid;
        Session["hydeptname"] = ls_deptname;

        //根据文档ID来判断该文件是否存在,如果存在则跳转到该URL
        HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
        DataTable dt = Hyoa_flowmain.Getflowmain(ls_docid);
        if (dt.Rows.Count > 0)
        {
            this.Response.Redirect(ls_url);
        }
        else
        {
            Response.Write("<script>alert('未找到对应的文档,可能文档已被删除,请联系管理员!');window.location='/'</script>");
        }
    }
示例#3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("/login.aspx");

        if (!this.IsPostBack)
        {
            if (this.Request.QueryString["docid"] != null)
            {
                string ls_docid = this.Request.QueryString["docid"].ToString();

                //根据文档ID得到记录
                HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
                DataTable dt = Hyoa_flowmain.Getflowmain(ls_docid);

                string ls_flowid, ls_flowname, ls_mudelid, ls_curtacheid, ls_curtachename;

                if (dt.Rows.Count > 0)
                {
                    ls_flowid = dt.Rows[0]["hy_flowid"].ToString();             //流程ID
                    ls_flowname = dt.Rows[0]["hy_flowname"].ToString();         //流程名称
                    ls_mudelid = dt.Rows[0]["hy_mudelid"].ToString();           //模块ID
                    ls_curtacheid = dt.Rows[0]["hy_curtacheid"].ToString();     //当前环节ID
                    ls_curtachename = dt.Rows[0]["hy_curtachename"].ToString(); //当前环节名称

                    dt.Clear();

                    HyoaClass.Hyoa_cklc Hyoa_cklc_CurrnetDocFlow = new HyoaClass.Hyoa_cklc();
                    //制作表格式信息
                    this.txtCurrnetDocFlow.Value = Hyoa_cklc_CurrnetDocFlow.GetCurrnetDocFlow(ls_docid,ls_flowid,ls_flowname,ls_mudelid,ls_curtacheid,ls_curtachename);
                    //制作流程图
                    this.txtFlowXML.Value = Hyoa_cklc_CurrnetDocFlow.GetXmlBody(ls_docid, ls_flowid, ls_flowname, ls_mudelid, ls_curtacheid, ls_curtachename);
                }

            }
        }
    }
示例#4
0
    protected void btndelinfo_my_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
        String[] v_uids = this.txtuids.Value.Split(',');
        string ls_filepath = "";
        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                //判断是否是当前用户的文档
                DataTable dt_judge = Hyoa_flowmain.Getflowmain(v_uids[i]);
                if (dt_judge.Rows.Count > 0)
                {
                    if (dt_judge.Rows[0]["hy_djrid"].ToString() == Session["hyuid"].ToString())
                    {
                        Hyoa_flowmain.DOCID = v_uids[i];
                        Hyoa_flowmain.Delete();
                        //删除文档时将待办事宜删除start
                        HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
                        Hyoa_dbsy.DOCID = v_uids[i];
                        Hyoa_dbsy.Deletebydocid(v_uids[i]);
                        //删除文档时将待办事宜删除end

                        //删的时候将附件也删除start
                        HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
                        DataTable dtfileatt = Hyoa_fileatt.GetfileattByFatherid(v_uids[i]);
                        if (dtfileatt.Rows.Count > 0)
                        {
                            for (int k = 0; k < dtfileatt.Rows.Count; k++)
                            {
                                ls_filepath = Server.MapPath("~/") + dtfileatt.Rows[k]["hy_filepath"].ToString();
                                if (File.Exists(ls_filepath))
                                {
                                    System.IO.File.Delete(ls_filepath);
                                }
                                Hyoa_fileatt.ID = dtfileatt.Rows[k]["ID"].ToString();
                                Hyoa_fileatt.Delete();
                            }
                        }
                        //删的时候将附件也删除end
                    }
                }
            }
        }
        this.txtuids.Value = "";
        //DataPlay(1);
        DataPlay(System.Int32.Parse(this.curpage.Text));
    }
示例#5
0
    //复制
    protected void btncopyinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
        String[] v_uids = this.txtuids.Value.Split(',');
        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                //得到记录
                DataTable dt = Hyoa_flowmain.Getflowmain(v_uids[i]);
                if (dt.Rows.Count > 0)
                {
                    //开始复制
                    HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
                    Hyoa_flowmain.DOCID = Hyoa_global.GetRandom();
                    Hyoa_flowmain.hy_mudelid = dt.Rows[0]["hy_mudelid"].ToString();
                    Hyoa_flowmain.hy_tableid = dt.Rows[0]["hy_tableid"].ToString();
                    Hyoa_flowmain.hy_flowid = dt.Rows[0]["hy_flowid"].ToString();
                    Hyoa_flowmain.hy_flowname = dt.Rows[0]["hy_flowname"].ToString();
                    Hyoa_flowmain.hy_curtacheid = "";
                    Hyoa_flowmain.hy_curtachename = "";
                    Hyoa_flowmain.hy_curclrid = "";
                    Hyoa_flowmain.hy_curclrname = "";
                    Hyoa_flowmain.hy_djrid = dt.Rows[0]["hy_djrid"].ToString();
                    Hyoa_flowmain.hy_djrname = dt.Rows[0]["hy_djrname"].ToString();
                    Hyoa_flowmain.hy_djrbmid = dt.Rows[0]["hy_djrbmid"].ToString();
                    Hyoa_flowmain.hy_djrbmname = dt.Rows[0]["hy_djrbmname"].ToString();
                    Hyoa_flowmain.hy_djsj = dt.Rows[0]["hy_djsj"].ToString();

                    Hyoa_flowmain.hy_bt = dt.Rows[0]["hy_bt"].ToString();

                    Hyoa_flowmain.hy_content1 = dt.Rows[0]["hy_content1"].ToString();
                    Hyoa_flowmain.hy_content2 = dt.Rows[0]["hy_content2"].ToString();
                    Hyoa_flowmain.hy_content3 = dt.Rows[0]["hy_content3"].ToString();
                    Hyoa_flowmain.hy_content4 = dt.Rows[0]["hy_content4"].ToString();
                    Hyoa_flowmain.hy_content5 = dt.Rows[0]["hy_content5"].ToString();

                    Hyoa_flowmain.hy_field1 = dt.Rows[0]["hy_field1"].ToString();
                    Hyoa_flowmain.hy_field2 = dt.Rows[0]["hy_field2"].ToString();
                    Hyoa_flowmain.hy_field3 = dt.Rows[0]["hy_field3"].ToString();
                    Hyoa_flowmain.hy_field4 = dt.Rows[0]["hy_field4"].ToString();
                    Hyoa_flowmain.hy_field5 = dt.Rows[0]["hy_field5"].ToString();
                    Hyoa_flowmain.hy_field6 = dt.Rows[0]["hy_field6"].ToString();
                    Hyoa_flowmain.hy_field7 = dt.Rows[0]["hy_field7"].ToString();
                    Hyoa_flowmain.hy_field8 = dt.Rows[0]["hy_field8"].ToString();
                    Hyoa_flowmain.hy_field9 = dt.Rows[0]["hy_field9"].ToString();
                    Hyoa_flowmain.hy_field10 = dt.Rows[0]["hy_field10"].ToString();
                    Hyoa_flowmain.hy_field11 = dt.Rows[0]["hy_field11"].ToString();
                    Hyoa_flowmain.hy_field12 = dt.Rows[0]["hy_field12"].ToString();
                    Hyoa_flowmain.hy_field13 = dt.Rows[0]["hy_field13"].ToString();
                    Hyoa_flowmain.hy_field14 = dt.Rows[0]["hy_field14"].ToString();
                    Hyoa_flowmain.hy_field15 = dt.Rows[0]["hy_field15"].ToString();
                    Hyoa_flowmain.hy_field16 = dt.Rows[0]["hy_field16"].ToString();
                    Hyoa_flowmain.hy_field17 = dt.Rows[0]["hy_field17"].ToString();
                    Hyoa_flowmain.hy_field18 = dt.Rows[0]["hy_field18"].ToString();
                    Hyoa_flowmain.hy_field19 = dt.Rows[0]["hy_field19"].ToString();
                    Hyoa_flowmain.hy_field20 = dt.Rows[0]["hy_field20"].ToString();
                    Hyoa_flowmain.hy_field21 = dt.Rows[0]["hy_field21"].ToString();
                    Hyoa_flowmain.hy_field22 = dt.Rows[0]["hy_field22"].ToString();
                    Hyoa_flowmain.hy_field23 = dt.Rows[0]["hy_field23"].ToString();
                    Hyoa_flowmain.hy_field24 = dt.Rows[0]["hy_field24"].ToString();
                    Hyoa_flowmain.hy_field25 = dt.Rows[0]["hy_field25"].ToString();
                    Hyoa_flowmain.hy_field26 = dt.Rows[0]["hy_field26"].ToString();
                    Hyoa_flowmain.hy_field27 = dt.Rows[0]["hy_field27"].ToString();
                    Hyoa_flowmain.hy_field28 = dt.Rows[0]["hy_field28"].ToString();
                    Hyoa_flowmain.hy_field29 = dt.Rows[0]["hy_field29"].ToString();
                    Hyoa_flowmain.hy_field30 = dt.Rows[0]["hy_field30"].ToString();
                    Hyoa_flowmain.hy_field31 = dt.Rows[0]["hy_field31"].ToString();
                    Hyoa_flowmain.hy_field32 = dt.Rows[0]["hy_field32"].ToString();
                    Hyoa_flowmain.hy_field33 = dt.Rows[0]["hy_field33"].ToString();
                    Hyoa_flowmain.hy_field34 = dt.Rows[0]["hy_field34"].ToString();
                    Hyoa_flowmain.hy_field35 = dt.Rows[0]["hy_field35"].ToString();

                    Hyoa_flowmain.hy_field36 = float.Parse(dt.Rows[0]["hy_field36"].ToString());
                    Hyoa_flowmain.hy_field37 = float.Parse(dt.Rows[0]["hy_field37"].ToString());
                    Hyoa_flowmain.hy_field38 = float.Parse(dt.Rows[0]["hy_field38"].ToString());
                    Hyoa_flowmain.hy_field39 = float.Parse(dt.Rows[0]["hy_field39"].ToString());
                    Hyoa_flowmain.hy_field40 = float.Parse(dt.Rows[0]["hy_field40"].ToString());

                    Hyoa_flowmain.hy_field41 = dt.Rows[0]["hy_field41"].ToString();
                    Hyoa_flowmain.hy_field42 = dt.Rows[0]["hy_field42"].ToString();
                    Hyoa_flowmain.hy_field43 = dt.Rows[0]["hy_field43"].ToString();
                    Hyoa_flowmain.hy_field44 = dt.Rows[0]["hy_field44"].ToString();
                    Hyoa_flowmain.hy_field45 = dt.Rows[0]["hy_field45"].ToString();
                    Hyoa_flowmain.hy_field46 = dt.Rows[0]["hy_field46"].ToString();
                    Hyoa_flowmain.hy_field47 = dt.Rows[0]["hy_field47"].ToString();
                    Hyoa_flowmain.hy_field48 = dt.Rows[0]["hy_field48"].ToString();
                    Hyoa_flowmain.hy_field49 = dt.Rows[0]["hy_field49"].ToString();
                    Hyoa_flowmain.hy_field50 = dt.Rows[0]["hy_field50"].ToString();
                    Hyoa_flowmain.hy_field51 = dt.Rows[0]["hy_field51"].ToString();
                    Hyoa_flowmain.hy_field52 = dt.Rows[0]["hy_field52"].ToString();
                    Hyoa_flowmain.hy_field53 = dt.Rows[0]["hy_field53"].ToString();
                    Hyoa_flowmain.hy_field54 = dt.Rows[0]["hy_field54"].ToString();
                    Hyoa_flowmain.hy_field55 = dt.Rows[0]["hy_field55"].ToString();
                    Hyoa_flowmain.hy_field56 = dt.Rows[0]["hy_field56"].ToString();
                    Hyoa_flowmain.hy_field57 = dt.Rows[0]["hy_field57"].ToString();
                    Hyoa_flowmain.hy_field58 = dt.Rows[0]["hy_field58"].ToString();
                    Hyoa_flowmain.hy_field59 = dt.Rows[0]["hy_field59"].ToString();
                    Hyoa_flowmain.hy_field60 = dt.Rows[0]["hy_field60"].ToString();

                    Hyoa_flowmain.hy_field61 = dt.Rows[0]["hy_field61"].ToString();
                    Hyoa_flowmain.hy_field62 = dt.Rows[0]["hy_field62"].ToString();
                    Hyoa_flowmain.hy_field63 = dt.Rows[0]["hy_field63"].ToString();
                    Hyoa_flowmain.hy_field64 = dt.Rows[0]["hy_field64"].ToString();
                    Hyoa_flowmain.hy_field65 = dt.Rows[0]["hy_field65"].ToString();
                    Hyoa_flowmain.hy_field66 = dt.Rows[0]["hy_field66"].ToString();
                    Hyoa_flowmain.hy_field67 = dt.Rows[0]["hy_field67"].ToString();
                    Hyoa_flowmain.hy_field68 = dt.Rows[0]["hy_field68"].ToString();
                    Hyoa_flowmain.hy_field69 = dt.Rows[0]["hy_field69"].ToString();
                    Hyoa_flowmain.hy_field70 = dt.Rows[0]["hy_field70"].ToString();

                    Hyoa_flowmain.hy_field71 = float.Parse(dt.Rows[0]["hy_field71"].ToString());
                    Hyoa_flowmain.hy_field72 = float.Parse(dt.Rows[0]["hy_field72"].ToString());
                    Hyoa_flowmain.hy_field73 = float.Parse(dt.Rows[0]["hy_field73"].ToString());
                    Hyoa_flowmain.hy_field74 = float.Parse(dt.Rows[0]["hy_field74"].ToString());
                    Hyoa_flowmain.hy_field75 = float.Parse(dt.Rows[0]["hy_field75"].ToString());
                    Hyoa_flowmain.hy_field76 = float.Parse(dt.Rows[0]["hy_field76"].ToString());
                    Hyoa_flowmain.hy_field77 = float.Parse(dt.Rows[0]["hy_field77"].ToString());
                    Hyoa_flowmain.hy_field78 = float.Parse(dt.Rows[0]["hy_field78"].ToString());
                    Hyoa_flowmain.hy_field79 = float.Parse(dt.Rows[0]["hy_field79"].ToString());
                    Hyoa_flowmain.hy_field80 = float.Parse(dt.Rows[0]["hy_field80"].ToString());
                    Hyoa_flowmain.hy_field81 = float.Parse(dt.Rows[0]["hy_field81"].ToString());
                    Hyoa_flowmain.hy_field82 = float.Parse(dt.Rows[0]["hy_field82"].ToString());
                    Hyoa_flowmain.hy_field83 = float.Parse(dt.Rows[0]["hy_field83"].ToString());
                    Hyoa_flowmain.hy_field84 = float.Parse(dt.Rows[0]["hy_field84"].ToString());
                    Hyoa_flowmain.hy_field85 = float.Parse(dt.Rows[0]["hy_field85"].ToString());
                    Hyoa_flowmain.hy_field86 = float.Parse(dt.Rows[0]["hy_field86"].ToString());
                    Hyoa_flowmain.hy_field87 = float.Parse(dt.Rows[0]["hy_field87"].ToString());
                    Hyoa_flowmain.hy_field88 = float.Parse(dt.Rows[0]["hy_field88"].ToString());
                    Hyoa_flowmain.hy_field89 = float.Parse(dt.Rows[0]["hy_field89"].ToString());
                    Hyoa_flowmain.hy_field90 = float.Parse(dt.Rows[0]["hy_field90"].ToString());
                    Hyoa_flowmain.hy_field91 = float.Parse(dt.Rows[0]["hy_field91"].ToString());
                    Hyoa_flowmain.hy_field92 = float.Parse(dt.Rows[0]["hy_field92"].ToString());
                    Hyoa_flowmain.hy_field93 = float.Parse(dt.Rows[0]["hy_field93"].ToString());
                    Hyoa_flowmain.hy_field94 = float.Parse(dt.Rows[0]["hy_field94"].ToString());
                    Hyoa_flowmain.hy_field95 = float.Parse(dt.Rows[0]["hy_field95"].ToString());
                    Hyoa_flowmain.hy_field96 = float.Parse(dt.Rows[0]["hy_field96"].ToString());
                    Hyoa_flowmain.hy_field97 = float.Parse(dt.Rows[0]["hy_field97"].ToString());
                    Hyoa_flowmain.hy_field98 = float.Parse(dt.Rows[0]["hy_field98"].ToString());
                    Hyoa_flowmain.hy_field99 = float.Parse(dt.Rows[0]["hy_field99"].ToString());
                    Hyoa_flowmain.hy_field100 = float.Parse(dt.Rows[0]["hy_field100"].ToString());

                    Hyoa_flowmain.hy_iftx = dt.Rows[0]["hy_iftx"].ToString();
                    Hyoa_flowmain.hy_zhtxsj = dt.Rows[0]["hy_zhtxsj"].ToString();
                    Hyoa_flowmain.hy_readuserlist = dt.Rows[0]["hy_readuserlist"].ToString();

                    Hyoa_flowmain.Insert();
                }
            }
        }
        this.txtuids.Value = "";
        DataPlay(System.Int32.Parse(this.curpage.Text));
    }
示例#6
0
    //得到某一个字段的HTML  Written by xf 20110515
    //pi_flag 0:不赋值  1:需赋值
    //ifsearch:是否查询时使用 0:非查询时使用 1:查询时使用
    //docid:旧文档使用时,文档ID,新文档则为空就可以
    //ifhavarole:是否有权限  0:lable输出 1:input输出
    public string GetFieldHtml(string hy_mudelid, string hy_fieldid, string pi_flag, string hy_tableid, string ifsearch, string docid, string ifhavarole)
    {
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dtfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(hy_mudelid, hy_fieldid, hy_tableid);
        HyoaClass.DAO db = new HyoaClass.DAO();
        string lsField = "";
        string field_css = "";
        string field_value = "";
        string field_functionhy_onclick = "";
        string field_functionhy_ondblclick = "";
        string field_functionhy_onchange = "";
        string field_functionhy_onkeydown = "";
        string field_functionhy_onkeyup = "";
        string field_wordlimit = "";

        if (dtfield.Rows.Count > 0)
        {
            //得到该字段的样式start
            if (dtfield.Rows[0]["hy_ifreadonly"].ToString() == "是")
            {
                if (ifsearch == "0")
                    field_css += " readonly ";
            }
            if (dtfield.Rows[0]["hy_class"].ToString() != "")
            {
                field_css += " class='" + dtfield.Rows[0]["hy_class"].ToString() + "' ";
            }
            if (dtfield.Rows[0]["hy_width"].ToString() != "")
            {
                field_css += " style='width:" + dtfield.Rows[0]["hy_width"].ToString() + ";";
            }
            else
            {
                field_css += " style='";
            }
            if (dtfield.Rows[0]["hy_height"].ToString() != "")
            {
                field_css += " height:" + dtfield.Rows[0]["hy_height"].ToString() + "'";
            }
            else
            {
                field_css += "'";
            }

            //得到字数限制
            if (dtfield.Rows[0]["hy_wordlimit"].ToString() != "")
            {
                field_wordlimit += " maxlength='" + dtfield.Rows[0]["hy_wordlimit"].ToString() + "' ";
            }

            //默认值
            //默认值取值的方式,查询时不使用默认值

            if (ifsearch == "0")
            {
                if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() != "")
                {
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "0")
                        field_value += dtfield.Rows[0]["hy_defaultvalue"].ToString();

                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "1")
                    {
                        DataTable dtdefault = db.GetDataTable(dtfield.Rows[0]["hy_defaultvalue"].ToString());
                        if (dtdefault.Rows.Count > 0)
                            field_value += dtdefault.Rows[0][0].ToString();
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "2")
                    {
                        field_value += Session[dtfield.Rows[0]["hy_defaultvalue"].ToString()].ToString();
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "3")
                    {
                        if (dtfield.Rows[0]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                            field_value += System.DateTime.Now.ToShortDateString();
                        else
                            field_value += System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    //自动生成值的情况 Added by xf 20110719
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "4")
                    {
                        if (dtfield.Rows[0]["hy_fieldtype"].ToString() == "数值")
                        {
                            //得到目前最大的数值,然后+1,未找到则赋值为1
                            HyoaClass.DAO db_autovalue = new HyoaClass.DAO();

                            DataTable dt_autovalue = db_autovalue.GetDataTable("select max(hy_field36) as maxint from hyp_flowmain where hy_tableid='" + dtfield.Rows[0]["hy_tableid"].ToString() + "'");
                            if (dt_autovalue.Rows[0]["maxint"].ToString() == null || dt_autovalue.Rows[0]["maxint"].ToString() == "")
                                field_value += "1";
                            else
                                field_value += (System.Int32.Parse(dt_autovalue.Rows[0]["maxint"].ToString()) + 1).ToString();
                        }
                        else
                        {
                            field_value += System.Guid.NewGuid().ToString();
                        }
                    }
                }
            }

            //事件
            if (dtfield.Rows[0]["hy_onclick"].ToString() != "")
            {
                field_functionhy_onclick += " onclick=\"" + dtfield.Rows[0]["hy_onclick"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_ondblclick"].ToString() != "")
            {
                field_functionhy_ondblclick += " ondblclick=\"" + dtfield.Rows[0]["hy_ondblclick"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_onchange"].ToString() != "")
            {
                field_functionhy_onchange += " onchange=\"" + dtfield.Rows[0]["hy_onchange"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_onkeydown"].ToString() != "")
            {
                field_functionhy_onkeydown += " onkeydown=\"" + dtfield.Rows[0]["hy_onkeydown"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_onkeyup"].ToString() != "")
            {
                field_functionhy_onkeyup += " onkeyup=\"" + dtfield.Rows[0]["hy_onkeyup"].ToString() + "\" ";
            }
            //得到该字段的样式end
            string field_type = dtfield.Rows[0]["hy_fieldtype"].ToString();

            //是否需要赋值,如果需要赋值,得到当前字段对应的值(日期型需要根据格式进行转换)
            string field_docvalue = "";
            //this.Response.Write("<script>alert('" + pi_flag + "');</script>");
            if (pi_flag == "1")
            {
                HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
                DataTable dt_flowmain = Hyoa_flowmain.Getflowmain(docid);
                if (dt_flowmain.Rows.Count > 0)
                {
                    if (dtfield.Rows[0]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                    {
                        field_docvalue = System.DateTime.Parse(dt_flowmain.Rows[0][dtfield.Rows[0]["hy_sqlfield"].ToString()].ToString()).ToShortDateString();
                    }
                    else
                    {
                        //如果SQL为数值的字段部分,则需要截取小数点后边两位
                        if (dtfield.Rows[0]["hy_fieldtype"].ToString() == "数值")
                        {
                            if (dt_flowmain.Rows[0][dtfield.Rows[0]["hy_sqlfield"].ToString()].ToString().Contains(".") == true)
                                field_docvalue = float.Parse(dt_flowmain.Rows[0][dtfield.Rows[0]["hy_sqlfield"].ToString()].ToString()).ToString("F2");
                            else
                                field_docvalue = dt_flowmain.Rows[0][dtfield.Rows[0]["hy_sqlfield"].ToString()].ToString();
                        }
                        else
                        {
                            field_docvalue = dt_flowmain.Rows[0][dtfield.Rows[0]["hy_sqlfield"].ToString()].ToString();
                        }
                    }
                }
            }
            //如果没有权限,直接输出lable
            //this.Response.Write("<script>alert('" + ifhavarole + "');</script>");
            if (ifhavarole == "0")
            {
                //痕迹保留
                if (field_type == "痕迹保留")
                {
                    lsField += "<input type=button id=\"btn_zwxg\" value='正  文' class=btn3 onclick=\"window.open('ntko/readoffice.aspx?newofficetype=1&fatherid=" + docid + "&tacheByhj=1&jsxd=1','newwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" ";
                }
                else
                {
                    //附件组件
                    if (field_type == "附件组件")
                    {
                        //根据docid得到目前已上传的附件信息
                        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                        HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
                        DataTable dt_fileatt = Hyoa_fileatt.GetfileattByFatherid(docid);
                        if (dt_fileatt.Rows.Count > 0)
                        {
                            for (var ii = 0; ii < dt_fileatt.Rows.Count; ii++)
                            {
                                string ls_name = "";
                                DataTable dt_user = Hyoa_user.Getuser(dt_fileatt.Rows[ii]["hy_userid"].ToString());
                                if (dt_user.Rows.Count > 0)
                                {
                                    ls_name = dt_user.Rows[0]["hy_username"].ToString();
                                }
                                lsField += (ii + 1).ToString() + "、<a href=\"" + dt_fileatt.Rows[ii]["hy_filepath"].ToString() + "\" target=_blank>" + dt_fileatt.Rows[ii]["hy_filename"].ToString() + "&nbsp;&nbsp;&nbsp;&nbsp;" + ls_name + "&nbsp;&nbsp;[" + dt_fileatt.Rows[ii]["hy_djsj"].ToString() + "]" + "</a><br />";
                            }
                        }
                        else
                        {
                            lsField += "&nbsp;";
                        }
                    }
                    else
                    {
                        //ztmztmztm2start
                        if (field_docvalue.Length > 8)
                        {
                            if (field_docvalue.Substring(0, 8) == "1900-1-1")
                            {
                                field_docvalue = "&nbsp;";
                            }
                        }
                        //ztmztmztm2end
                        lsField = field_docvalue + "&nbsp;";
                    }
                }
            }
            else
            {
                //单行文本
                if (field_type == "文本")
                {
                    if (pi_flag == "0")
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_value + "\">";
                    else
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_docvalue + "\">";
                }
                //多行文本
                if (field_type == "多行文本")
                {
                    //格式化内容,将<br>转为/n
                    if (field_docvalue.Contains("<br>"))
                        field_docvalue = field_docvalue.Replace("<br>", "\n");

                    if (pi_flag == "0")
                        lsField = "<textarea name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_css + field_wordlimit + " >" + field_value + "</textarea>";
                    else
                        lsField = "<textarea name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_css + field_wordlimit + " >" + field_docvalue + "</textarea>";
                }
                //日期
                if (field_type == "日期")
                {
                    //this.Response.Write("<script>alert('aaaaaa');</script>");
                    //this.Response.Write("<script>alert('" + pi_flag + "');</script>");

                    if (ifsearch == "0")
                    {
                        if (pi_flag == "0")
                            lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_value + "\">";
                        else
                        {

                            //add ztm3 start
                            if (field_docvalue.Length > 7)
                            {
                                if (field_docvalue.Substring(0, 8) == "1900-1-1")
                                {
                                    field_docvalue = "";
                                }
                            }
                            //add ztm3 end
                            lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_docvalue + "\">";

                        }
                    }
                    else
                    {
                        //this.Response.Write("<script>alert('aaaa');</script>");
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_value + "\">至";
                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_value + "\">";
                    }
                }
                //文本加按钮
                if (field_type == "文本加按钮")
                {
                    if (pi_flag == "0")
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_value + "\">&nbsp;<input type=button id=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" name=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" value=" + dtfield.Rows[0]["hy_fieldname"].ToString() + " class=btn3 " + field_functionhy_onclick + " >";
                    else
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_docvalue + "\">&nbsp;<input type=button id=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" name=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" value=" + dtfield.Rows[0]["hy_fieldname"].ToString() + " class=btn3 " + field_functionhy_onclick + " >";
                }
                //多行文本加按钮
                if (field_type == "多行文本加按钮")
                {
                    //格式化内容,将<br>转为/n
                    if (field_docvalue.Contains("<br>"))
                        field_docvalue = field_docvalue.Replace("<br>", "\n");

                    if (pi_flag == "0")
                        lsField = "<textarea name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_wordlimit + " " + field_css + " >" + field_value + "</textarea>&nbsp;<input type=button id=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" name=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" value=" + dtfield.Rows[0]["hy_fieldname"].ToString() + " class=btn3 " + field_functionhy_onclick + " >";
                    else
                        lsField = "<textarea name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_wordlimit + " " + field_css + " >" + field_docvalue + "</textarea>&nbsp;<input type=button id=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" name=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" value=" + dtfield.Rows[0]["hy_fieldname"].ToString() + " class=btn3 " + field_functionhy_onclick + " >";
                }
                //数值
                if (field_type == "数值")
                {
                    if (ifsearch == "0")
                    {
                        if (pi_flag == "0")
                            lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_value + "\">";
                        else
                            lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_docvalue + "\">";
                    }
                    else
                    {
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_value + "\">到";
                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_value + "\">";
                    }
                }
                //对话框列表(下拉框
                if (field_type == "对话框列表")
                {
                    lsField = "<select name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onchange + field_css + "> ";
                    //第一项:请选择
                    lsField += "<option value=''>--请选择--</option>";
                    //有哪些选项
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "0")
                    {
                        string[] lv_options = dtfield.Rows[0]["hy_options"].ToString().Split('#');
                        for (var ii = 0; ii < lv_options.Length; ii++)
                        {
                            if (pi_flag == "0")
                            {
                                lsField += "<option value='" + lv_options[ii].ToString() + "'>" + lv_options[ii].ToString() + "</option>";
                            }
                            else
                            {
                                if (field_docvalue == lv_options[ii].ToString())
                                    lsField += "<option value='" + lv_options[ii].ToString() + "' selected>" + lv_options[ii].ToString() + "</option>";
                                else
                                    lsField += "<option value='" + lv_options[ii].ToString() + "'>" + lv_options[ii].ToString() + "</option>";
                            }
                        }
                    }
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "1")
                    {
                        DataTable dtoptions = db.GetDataTable(dtfield.Rows[0]["hy_options"].ToString());
                        if (dtoptions.Rows.Count > 0)
                        {
                            for (var ii = 0; ii < dtoptions.Rows.Count; ii++)
                            {
                                if (pi_flag == "0")
                                {
                                    lsField += "<option value='" + dtoptions.Rows[ii][0].ToString() + "'>" + dtoptions.Rows[ii][0].ToString() + "</option>";
                                }
                                else
                                {
                                    if (field_docvalue == dtoptions.Rows[ii][0].ToString())
                                        lsField += "<option value='" + dtoptions.Rows[ii][0].ToString() + "' selected>" + dtoptions.Rows[ii][0].ToString() + "</option>";
                                    else
                                        lsField += "<option value='" + dtoptions.Rows[ii][0].ToString() + "'>" + dtoptions.Rows[ii][0].ToString() + "</option>";
                                }
                            }
                        }
                    }
                    lsField += "</select>";
                }
                //复选框
                if (field_type == "复选框")
                {
                    //有哪些选项
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "0")
                    {
                        string[] lv_options = dtfield.Rows[0]["hy_options"].ToString().Split('#');
                        for (var ii = 0; ii < lv_options.Length; ii++)
                        {
                            if (pi_flag == "0")
                            {
                                if (field_value == lv_options[ii].ToString())
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                                else
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                            }
                            else
                            {
                                if (field_docvalue.Contains(lv_options[ii].ToString()))
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                                else
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                            }
                        }
                    }
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "1")
                    {
                        DataTable dtoptions = db.GetDataTable(dtfield.Rows[0]["hy_options"].ToString());
                        if (dtoptions.Rows.Count > 0)
                        {
                            for (var ii = 0; ii < dtoptions.Rows.Count; ii++)
                            {
                                if (pi_flag == "0")
                                {
                                    if (field_value == dtoptions.Rows[ii][0].ToString())
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                    else
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                }
                                else
                                {
                                    if (field_docvalue.Contains(dtoptions.Rows[ii][0].ToString()))
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                    else
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                }
                            }
                        }
                    }
                }

                //单选框
                if (field_type == "单选框")
                {
                    //有哪些选项
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "0")
                    {
                        string[] lv_options = dtfield.Rows[0]["hy_options"].ToString().Split('#');
                        for (var ii = 0; ii < lv_options.Length; ii++)
                        {
                            if (pi_flag == "0")
                            {
                                if (field_value == lv_options[ii].ToString())
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                                else
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                            }
                            else
                            {
                                if (field_docvalue == lv_options[ii].ToString())
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                                else
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                            }
                        }
                    }
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "1")
                    {
                        DataTable dtoptions = db.GetDataTable(dtfield.Rows[0]["hy_options"].ToString());
                        if (dtoptions.Rows.Count > 0)
                        {
                            for (var ii = 0; ii < dtoptions.Rows.Count; ii++)
                            {
                                if (pi_flag == "0")
                                {
                                    if (field_value == dtoptions.Rows[ii][0].ToString())
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                    else
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                }
                                else
                                {
                                    if (field_docvalue == dtoptions.Rows[ii][0].ToString())
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                    else
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                }
                            }
                        }
                    }
                }
                //口令
                if (field_type == "口令")
                {
                    if (pi_flag == "0")
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=password id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_value + "\">";
                    else
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=password id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_docvalue + "\">";
                }
                //附件组件
                if (field_type == "附件组件")
                {
                    lsField = "";
                    //根据docid得到目前已上传的附件信息
                    HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
                    DataTable dt_fileatt = Hyoa_fileatt.GetfileattByFatherid(docid);
                    HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();

                    if (dt_fileatt.Rows.Count > 0)
                    {
                        for (var ii = 0; ii < dt_fileatt.Rows.Count; ii++)
                        {
                            string ls_name = "";
                            DataTable dt_user = Hyoa_user.Getuser(dt_fileatt.Rows[ii]["hy_userid"].ToString());
                            if (dt_user.Rows.Count > 0)
                            {
                                ls_name = dt_user.Rows[0]["hy_username"].ToString();
                            }
                            lsField += (ii + 1).ToString() + "、<a href=\"" + dt_fileatt.Rows[ii]["hy_filepath"].ToString() + "\" target=_blank>" + dt_fileatt.Rows[ii]["hy_filename"].ToString() + "</a>&nbsp;&nbsp;&nbsp;&nbsp;" + ls_name + "&nbsp;&nbsp;[" + dt_fileatt.Rows[ii]["hy_djsj"].ToString() + "]" + "<br />";
                        }
                    }
                    lsField += "<input type=button id=\"uploadfile1\" value='附件管理' class=btn3 onclick=\"window.open('/ggdy/main_fileatt.aspx?fatherid=" + docid + "','newwindow','height=350,width=600,top=100,left=200,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no');\" ";
                }
                //说明文字
                if (field_type == "说明文字")
                {
                    lsField = "<span id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\">" + field_value + "</span>";
                }
                //编辑器
                if (field_type == "编辑器")
                {
                    //lsField = "<textarea name=\"hy_content1_1\" id=\"hy_content1_1\" style=\"display:none\" runat="server">" + field_docvalue + "</textarea>";
                    lsField += "<iframe ID=\"eWebEditor1\" src=\"system/eWebEditor/ewebeditor.htm?id=" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "&style=Portal\" frameborder=\"0\" scrolling=\"no\" width=\"100%\" height=\"350\"></iframe>";
                }
                //痕迹保留
                //this.Response.Write("<script>alert('" + field_type + "');</script>");
                if (field_type == "痕迹保留")
                {
                    //判断是否为第一环节
                    HyoaClass.Hyoa_flowwork Hyoa_flowwork = new HyoaClass.Hyoa_flowwork();
                    DataTable dtflowwork = Hyoa_flowwork.Getflowworkbyflowidtacheid(this.hy_flowid.Text, "*");

                    if (dtflowwork.Rows.Count > 0)
                    {
                        if (dtflowwork.Rows[0]["hy_nexttacheid"].ToString() == this.hy_curtacheid.Text)
                        {
                            lsField += "<input type=button id=\"btn_zwxg\" value='正  文' class=btn3 onclick=\"window.open('ntko/editoffice.aspx?newofficetype=1&fatherid=" + docid + "&tacheByhj=1&jsxd=0','newwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" ";
                        }
                        else
                        {
                            //判断是否为最后一个环节
                            dtflowwork.Clear();
                            dtflowwork = Hyoa_flowwork.Getflowworkbyflowidtacheid(this.hy_flowid.Text, this.hy_curtacheid.Text);
                            if (dtflowwork.Rows.Count > 0)
                            {
                                if (dtflowwork.Rows[0]["hy_nexttacheid"].ToString() == "**")
                                {
                                    lsField += "<input type=button id=\"btn_zwxg\" value='正  文' class=btn3 onclick=\"window.open('ntko/editoffice.aspx?newofficetype=1&fatherid=" + docid + "&tacheByhj=0&jsxd=1','newwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" ";
                                }
                                else
                                {
                                    lsField += "<input type=button id=\"btn_zwxg\" value='正  文' class=btn3 onclick=\"window.open('ntko/editoffice.aspx?newofficetype=1&fatherid=" + docid + "&tacheByhj=0&jsxd=0','newwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" ";
                                }
                            }

                        }
                    }

                }
            }

            db.Close();
        }
        return lsField;
    }
示例#7
0
    //加载主表单    Written by xf 20110515
    private void DataPlay()
    {
        if (this.Request.QueryString["op"] != null)
        {
            this.txtop.Value = this.Request.QueryString["op"].ToString();           //新增还是修改

            //新文档
            if (this.Request.QueryString["op"] == "add")
            {
                HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
                //文档ID
                this.txtdocid.Value = Hyoa_global.GetRandom();

                this.hy_djrid.Text = this.Session["hyuid"].ToString();
                this.hy_djrname.Text = this.Session["hyuname"].ToString();
                this.hy_djrbmid.Text = this.Session["hydeptid"].ToString();
                this.hy_djrbmname.Text = this.Session["hydeptname"].ToString();
                this.hy_djsj.Text = System.DateTime.Now.ToString();

                if (this.txtifhaveflow.Value == "是")
                {
                    HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
                    DataTable dt_tableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.hy_mudelid.Text, this.hy_tableid.Text);
                    if (dt_tableconfig.Rows.Count > 0)
                    {
                        if (dt_tableconfig.Rows[0]["hy_ifflowdoc"].ToString() == "是")
                        {
                            //根据模块ID得到流程信息
                            HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
                            DataTable dt = Hyoa_flowinfor.Getfirsttacheinfobymudelid(this.hy_mudelid.Text);
                            //Response.Write("<script>alert('"+dt.Rows.Count.ToString()+"')</script>");
                            if (dt.Rows.Count > 0)
                            {
                                //判断当前用户是否有登记权限
                                //得到第一环节ID
                                string ls_firsttacheid = Hyoa_global.GetFirstTacheid(dt.Rows[0]["hy_flowid"].ToString());
                                if (Hyoa_global.IfHaveRegiRight_Lc(dt.Rows[0]["hy_flowid"].ToString(), ls_firsttacheid, this.Session["hyuid"].ToString()))
                                {
                                    this.hy_flowid.Text = dt.Rows[0]["hy_flowid"].ToString();
                                    this.hy_flowname.Text = dt.Rows[0]["hy_flowname"].ToString();
                                    this.hy_curtacheid.Text = dt.Rows[0]["hy_nexttacheid"].ToString();
                                    this.hy_curtachename.Text = dt.Rows[0]["hy_nexttachename"].ToString();
                                    this.hy_curclrid.Text = this.Session["hyuid"].ToString();
                                    this.hy_curclrname.Text = this.Session["hyuname"].ToString();
                                    this.lblcurtachenameshow.Text = dt.Rows[0]["hy_nexttachename"].ToString();
                                    this.txtSystemClRight.Value = "1";
                                }
                                else
                                {
                                    Response.Write("<script>alert('您无权进行此项操作,请联系管理员!');history.back();</script>");
                                }
                            }
                            dt.Clear();
                            this.td_nextstep.Visible = true; //提交
                        }
                    }
                    //加载页面
                    this.rptlist.DataSource = GetDataTableFieldHtml(this.hy_mudelid.Text, this.hy_tableid.Text, "0", "0", this.txtdocid.Value, this.txtSystemClRight.Value, "1", this.hy_curtacheid.Text);
                    this.rptlist.DataBind();
                    this.td_submit.Visible = true; //保存
                }
                else
                {
                    this.lblcurtachenameshow.Text = this.lbltablename.Text;
                    //如果非流程(授权用户统一管理)
                    if (this.txttablerole.Value == "0")
                    {
                        if (Hy_IfHaveRole(this.hy_mudelid.Text, Session["hyuid"].ToString()) == "1")
                            this.txtSystemClRight.Value = "1";
                    }
                    //如果非流程(每个人管理自己的信息)
                    if (this.txttablerole.Value == "1")
                    {
                        this.txtSystemClRight.Value = "1";
                    }
                    //如果非流程(每个人操作自己的信息、授权用户可管理所有信息)
                    if (this.txttablerole.Value == "2")
                    {
                        this.txtSystemClRight.Value = "1";
                    }

                    if (this.txtSystemClRight.Value == "1")
                        this.td_submit.Visible = true; //保存
                    else
                        this.td_submit.Visible = false; //保存

                    //加载页面
                    this.rptlist.DataSource = GetDataTableFieldHtml(this.hy_mudelid.Text, this.hy_tableid.Text, "0", "0", this.txtdocid.Value, this.txtSystemClRight.Value, "0", "");
                    this.rptlist.DataBind();
                }
                hywebopen_newdoc();     //新文档OPEN时的特殊处理
            }
            //旧文档
            if (this.Request.QueryString["op"] == "modify")
            {
                this.td_browseflow.Visible = true;  //查看流程

                if (this.Request.QueryString["docid"] != null)
                {
                    this.txtdocid.Value = this.Request.QueryString["docid"].ToString();

                    HyoaClass.Hyoa_flowmain flowmain = new HyoaClass.Hyoa_flowmain();
                    DataTable dt = flowmain.Getflowmain(this.txtdocid.Value);
                    if (dt.Rows.Count > 0)
                    {
                        this.hy_mudelid.Text = dt.Rows[0]["hy_mudelid"].ToString();
                        this.hy_tableid.Text = dt.Rows[0]["hy_tableid"].ToString();
                        this.hy_flowid.Text = dt.Rows[0]["hy_flowid"].ToString();
                        this.hy_flowname.Text = dt.Rows[0]["hy_flowname"].ToString();
                        this.hy_curtacheid.Text = dt.Rows[0]["hy_curtacheid"].ToString();
                        this.hy_curtachename.Text = dt.Rows[0]["hy_curtachename"].ToString();
                        this.lblcurtachenameshow.Text = dt.Rows[0]["hy_curtachename"].ToString();
                        this.hy_curclrid.Text = dt.Rows[0]["hy_curclrid"].ToString();
                        this.hy_curclrname.Text = dt.Rows[0]["hy_curclrname"].ToString();
                        this.hy_djrid.Text = dt.Rows[0]["hy_djrid"].ToString();
                        this.hy_djrname.Text = dt.Rows[0]["hy_djrname"].ToString();
                        this.hy_djrbmid.Text = dt.Rows[0]["hy_djrbmid"].ToString();
                        this.hy_djrbmname.Text = dt.Rows[0]["hy_djrbmname"].ToString();
                        this.hy_djsj.Text = dt.Rows[0]["hy_djsj"].ToString();
                        this.hy_bt.Text = dt.Rows[0]["hy_bt"].ToString();
                        this.hy_content1.Text = dt.Rows[0]["hy_content1"].ToString();
                        this.hy_content2.Text = dt.Rows[0]["hy_content2"].ToString();
                        this.hy_content3.Text = dt.Rows[0]["hy_content3"].ToString();
                        this.hy_content4.Text = dt.Rows[0]["hy_content4"].ToString();
                        this.hy_content5.Text = dt.Rows[0]["hy_content5"].ToString();
                        this.hy_content6.Text = dt.Rows[0]["hy_content6"].ToString();
                        this.hy_content7.Text = dt.Rows[0]["hy_content7"].ToString();
                        this.hy_content8.Text = dt.Rows[0]["hy_content8"].ToString();
                        this.hy_content9.Text = dt.Rows[0]["hy_content9"].ToString();
                        this.hy_content10.Text = dt.Rows[0]["hy_content10"].ToString();
                        this.hy_content11.Text = dt.Rows[0]["hy_content11"].ToString();
                        this.hy_content12.Text = dt.Rows[0]["hy_content12"].ToString();
                        this.hy_content13.Text = dt.Rows[0]["hy_content13"].ToString();
                        this.hy_content14.Text = dt.Rows[0]["hy_content14"].ToString();
                        this.hy_content15.Text = dt.Rows[0]["hy_content15"].ToString();
                        this.hy_field1.Text = dt.Rows[0]["hy_field1"].ToString();
                        this.hy_field2.Text = dt.Rows[0]["hy_field2"].ToString();
                        this.hy_field3.Text = dt.Rows[0]["hy_field3"].ToString();
                        this.hy_field4.Text = dt.Rows[0]["hy_field4"].ToString();
                        this.hy_field5.Text = dt.Rows[0]["hy_field5"].ToString();
                        this.hy_field6.Text = dt.Rows[0]["hy_field6"].ToString();
                        this.hy_field7.Text = dt.Rows[0]["hy_field7"].ToString();
                        this.hy_field8.Text = dt.Rows[0]["hy_field8"].ToString();
                        this.hy_field9.Text = dt.Rows[0]["hy_field9"].ToString();
                        this.hy_field10.Text = dt.Rows[0]["hy_field10"].ToString();
                        this.hy_field11.Text = dt.Rows[0]["hy_field11"].ToString();
                        this.hy_field12.Text = dt.Rows[0]["hy_field12"].ToString();
                        this.hy_field13.Text = dt.Rows[0]["hy_field13"].ToString();
                        this.hy_field14.Text = dt.Rows[0]["hy_field14"].ToString();
                        this.hy_field15.Text = dt.Rows[0]["hy_field15"].ToString();
                        this.hy_field16.Text = dt.Rows[0]["hy_field16"].ToString();
                        this.hy_field17.Text = dt.Rows[0]["hy_field17"].ToString();
                        this.hy_field18.Text = dt.Rows[0]["hy_field18"].ToString();
                        this.hy_field19.Text = dt.Rows[0]["hy_field19"].ToString();
                        this.hy_field20.Text = dt.Rows[0]["hy_field20"].ToString();
                        this.hy_field21.Text = dt.Rows[0]["hy_field21"].ToString();
                        this.hy_field22.Text = dt.Rows[0]["hy_field22"].ToString();
                        this.hy_field23.Text = dt.Rows[0]["hy_field23"].ToString();
                        this.hy_field24.Text = dt.Rows[0]["hy_field24"].ToString();
                        this.hy_field25.Text = dt.Rows[0]["hy_field25"].ToString();
                        this.hy_field26.Text = dt.Rows[0]["hy_field26"].ToString();
                        this.hy_field27.Text = dt.Rows[0]["hy_field27"].ToString();
                        this.hy_field28.Text = dt.Rows[0]["hy_field28"].ToString();
                        this.hy_field29.Text = dt.Rows[0]["hy_field29"].ToString();
                        this.hy_field30.Text = dt.Rows[0]["hy_field30"].ToString();
                        this.hy_field31.Text = dt.Rows[0]["hy_field31"].ToString();
                        this.hy_field32.Text = dt.Rows[0]["hy_field32"].ToString();
                        this.hy_field33.Text = dt.Rows[0]["hy_field33"].ToString();
                        this.hy_field34.Text = dt.Rows[0]["hy_field34"].ToString();
                        this.hy_field35.Text = dt.Rows[0]["hy_field35"].ToString();
                        this.hy_field36.Text = dt.Rows[0]["hy_field36"].ToString();
                        this.hy_field37.Text = dt.Rows[0]["hy_field37"].ToString();
                        this.hy_field38.Text = dt.Rows[0]["hy_field38"].ToString();
                        this.hy_field39.Text = dt.Rows[0]["hy_field39"].ToString();
                        this.hy_field40.Text = dt.Rows[0]["hy_field40"].ToString();
                        this.hy_field41.Text = dt.Rows[0]["hy_field41"].ToString();
                        this.hy_field42.Text = dt.Rows[0]["hy_field42"].ToString();
                        this.hy_field43.Text = dt.Rows[0]["hy_field43"].ToString();
                        this.hy_field44.Text = dt.Rows[0]["hy_field44"].ToString();
                        this.hy_field45.Text = dt.Rows[0]["hy_field45"].ToString();
                        this.hy_field46.Text = dt.Rows[0]["hy_field46"].ToString();
                        this.hy_field47.Text = dt.Rows[0]["hy_field47"].ToString();
                        this.hy_field48.Text = dt.Rows[0]["hy_field48"].ToString();
                        this.hy_field49.Text = dt.Rows[0]["hy_field49"].ToString();
                        this.hy_field50.Text = dt.Rows[0]["hy_field50"].ToString();
                        this.hy_field51.Text = dt.Rows[0]["hy_field51"].ToString();
                        this.hy_field52.Text = dt.Rows[0]["hy_field52"].ToString();
                        this.hy_field53.Text = dt.Rows[0]["hy_field53"].ToString();
                        this.hy_field54.Text = dt.Rows[0]["hy_field54"].ToString();
                        this.hy_field55.Text = dt.Rows[0]["hy_field55"].ToString();
                        this.hy_field56.Text = dt.Rows[0]["hy_field56"].ToString();
                        this.hy_field57.Text = dt.Rows[0]["hy_field57"].ToString();
                        this.hy_field58.Text = dt.Rows[0]["hy_field58"].ToString();
                        this.hy_field59.Text = dt.Rows[0]["hy_field59"].ToString();
                        this.hy_field60.Text = dt.Rows[0]["hy_field60"].ToString();
                        this.hy_field61.Text = dt.Rows[0]["hy_field61"].ToString();
                        this.hy_field62.Text = dt.Rows[0]["hy_field62"].ToString();
                        this.hy_field63.Text = dt.Rows[0]["hy_field63"].ToString();
                        this.hy_field64.Text = dt.Rows[0]["hy_field64"].ToString();
                        this.hy_field65.Text = dt.Rows[0]["hy_field65"].ToString();
                        this.hy_field66.Text = dt.Rows[0]["hy_field66"].ToString();
                        this.hy_field67.Text = dt.Rows[0]["hy_field67"].ToString();
                        this.hy_field68.Text = dt.Rows[0]["hy_field68"].ToString();
                        this.hy_field69.Text = dt.Rows[0]["hy_field69"].ToString();
                        this.hy_field70.Text = dt.Rows[0]["hy_field70"].ToString();
                        this.hy_field71.Text = dt.Rows[0]["hy_field71"].ToString();
                        this.hy_field72.Text = dt.Rows[0]["hy_field72"].ToString();
                        this.hy_field73.Text = dt.Rows[0]["hy_field73"].ToString();
                        this.hy_field74.Text = dt.Rows[0]["hy_field74"].ToString();
                        this.hy_field75.Text = dt.Rows[0]["hy_field75"].ToString();
                        this.hy_field76.Text = dt.Rows[0]["hy_field76"].ToString();
                        this.hy_field77.Text = dt.Rows[0]["hy_field77"].ToString();
                        this.hy_field78.Text = dt.Rows[0]["hy_field78"].ToString();
                        this.hy_field79.Text = dt.Rows[0]["hy_field79"].ToString();
                        this.hy_field80.Text = dt.Rows[0]["hy_field80"].ToString();

                        this.hy_field81.Text = dt.Rows[0]["hy_field81"].ToString();
                        this.hy_field82.Text = dt.Rows[0]["hy_field82"].ToString();
                        this.hy_field83.Text = dt.Rows[0]["hy_field83"].ToString();
                        this.hy_field84.Text = dt.Rows[0]["hy_field84"].ToString();
                        this.hy_field85.Text = dt.Rows[0]["hy_field85"].ToString();
                        this.hy_field86.Text = dt.Rows[0]["hy_field86"].ToString();
                        this.hy_field87.Text = dt.Rows[0]["hy_field87"].ToString();
                        this.hy_field88.Text = dt.Rows[0]["hy_field88"].ToString();
                        this.hy_field89.Text = dt.Rows[0]["hy_field89"].ToString();
                        this.hy_field90.Text = dt.Rows[0]["hy_field90"].ToString();

                        this.hy_field91.Text = dt.Rows[0]["hy_field91"].ToString();
                        this.hy_field92.Text = dt.Rows[0]["hy_field92"].ToString();
                        this.hy_field93.Text = dt.Rows[0]["hy_field93"].ToString();
                        this.hy_field94.Text = dt.Rows[0]["hy_field94"].ToString();
                        this.hy_field95.Text = dt.Rows[0]["hy_field95"].ToString();
                        this.hy_field96.Text = dt.Rows[0]["hy_field96"].ToString();
                        this.hy_field97.Text = dt.Rows[0]["hy_field97"].ToString();
                        this.hy_field98.Text = dt.Rows[0]["hy_field98"].ToString();
                        this.hy_field99.Text = dt.Rows[0]["hy_field99"].ToString();
                        this.hy_field100.Text = dt.Rows[0]["hy_field100"].ToString();

                        this.hy_iftx.Text = dt.Rows[0]["hy_iftx"].ToString();
                        this.hy_zhtxsj.Text = dt.Rows[0]["hy_zhtxsj"].ToString();
                        this.hy_readuserlist.Text = dt.Rows[0]["hy_readuserlist"].ToString();

                        //信息管理市局录用记录 特殊显示取消按钮用于删除复制的这条数据
                        if (this.hy_mudelid.Text == "xxgl" && this.hy_tableid.Text == "f1265875-5494-465f-ac33-6fa43d208c8f" && this.hy_field100.Text == "1")
                        {
                            //this.td_qx.Visible = true;
                            this.td_return.Visible = false;
                        }
                        HyoaClass.DAO DAO = new HyoaClass.DAO();
                        string sql_SelectCount = "select count(*) as num from hyp_flowhistoryinfo_cl where docid='" + this.txtdocid.Value + "'";
                        DataTable dt_Count = DAO.GetDataTable(sql_SelectCount);
                        if (dt_Count.Rows.Count > 0)
                        {
                            this.txtclts.Value = dt_Count.Rows[0]["num"].ToString();
                        }
                    }
                    dt.Clear();
                    //流程文档
                    if (this.txtifhaveflow.Value == "是")
                    {
                        //流程已结束
                        if (this.hy_curtacheid.Text == "**")
                        {
                            //////////////流程已结束///////////////////////
                            this.lblcurtachenameshow.Text = "流程已结束";

                            UpdateReadFlag();  //打开时置为已读
                            //////////////流程已结束///////////////////////
                        }
                        else
                        {
                            //////////////流程未结束///////////////////////
                            //判断是否为当前处理人
                            if (this.hy_curclrid.Text.IndexOf(this.Session["hyuid"].ToString()) >= 0)
                            {
                                this.txtSystemClRight.Value = "1";
                                this.td_submit.Visible = true; //保存
                                this.td_nextstep.Visible = true; //提交
                                this.td_returnsumbit.Visible = true; //退回

                            }
                            else
                            {
                                //判断是否为传阅人
                                HyoaClass.Hyoa_flowhistoryinfo_cy Hyoa_flowhistoryinfo_cy = new HyoaClass.Hyoa_flowhistoryinfo_cy();
                                dt = Hyoa_flowhistoryinfo_cy.Getifcyrybydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString());
                                if (dt.Rows.Count > 0)
                                {
                                    this.txtSystemYdRight.Value = "1";
                                }
                                //判断是否是上一环节处理人
                                HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
                                if (Hyoa_global.iflastclr(this.txtdocid.Value, this.Session["hyuid"].ToString()))
                                {
                                    this.txtiflastclr.Value = "1";
                                    this.txtSystemYdRight.Value = "1";
                                    this.td_withdraw.Visible = true; //收回
                                    this.td_press.Visible = true; //催办
                                }
                                else
                                {
                                    //判断是否是历史处理人员
                                    if (Hyoa_global.ifhistoryclr(this.txtdocid.Value, this.Session["hyuid"].ToString()))
                                    {
                                        this.txtifhistoryclr.Value = "1";
                                        this.txtSystemYdRight.Value = "1";
                                        this.td_press.Visible = true; //催办
                                    }
                                }
                            }
                            //判断是否为最后一个环节
                            HyoaClass.Hyoa_flowwork Hyoa_flowwork = new HyoaClass.Hyoa_flowwork();
                            DataTable dtflowwork = Hyoa_flowwork.Getflowworkbyflowidtacheid(this.hy_flowid.Text, this.hy_curtacheid.Text);
                            if (dtflowwork.Rows.Count > 0)
                            {
                                if (dtflowwork.Rows[0]["hy_nexttacheid"].ToString() == "**")
                                    this.txtiflasttache.Value = "1";
                            }
                            dtflowwork.Clear();
                            //既没有处理权限,又没有阅读权限的情况下
                            if (this.txtSystemClRight.Value == "0" && this.txtSystemYdRight.Value == "0")
                            {
                                Response.Write("<script>alert('您无权进行此项操作,请联系管理员!');history.back();</script>");
                            }
                            //////////////流程未结束///////////////////////
                        }
                        //加载页面
                        this.rptlist.DataSource = GetDataTableFieldHtml(this.hy_mudelid.Text, this.hy_tableid.Text, "1", "0", this.txtdocid.Value, this.txtSystemClRight.Value, "1", this.hy_curtacheid.Text);
                        this.rptlist.DataBind();

                        ////////补充意见s  只要是旧文档,且有流程的模块就能填写轮阅意见
                        this.tb_bctitle.Visible = true;
                        this.tb_bcbody.Visible = true;
                        //流程已结束
                        if (this.hy_curtacheid.Text == "**")
                        {
                            this.tr_bcyj.Visible = false;
                        }
                        else
                        {
                            this.tr_bcyj.Visible = true;
                        }
                        //得到已经补充意见内容
                        HyoaClass.Hyoa_bcyj Hyoa_bcyj = new HyoaClass.Hyoa_bcyj();
                        DataTable dt_bcyj = Hyoa_bcyj.GetdocsByfatherid(this.txtdocid.Value);
                        if (dt_bcyj.Rows.Count > 0)
                        {
                            //输出补充意见记录
                            this.lblbody_bcyj.Text = "";
                            for (var i = 0; i < dt_bcyj.Rows.Count; i++)
                            {
                                this.lblbody_bcyj.Text += dt_bcyj.Rows[i]["hy_bcbody"].ToString() + "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                                this.lblbody_bcyj.Text += "(轮阅人:" + dt_bcyj.Rows[i]["hy_bcusername"].ToString() + "&nbsp;&nbsp;&nbsp;所在部门:" + dt_bcyj.Rows[i]["hy_bcdeptname"].ToString();
                                this.lblbody_bcyj.Text += "&nbsp;&nbsp;&nbsp;填写时间:" + dt_bcyj.Rows[i]["hy_bctime"].ToString();
                                //+ "&nbsp;&nbsp;&nbsp;IP:" + dt_bcyj.Rows[i]["hy_bcip"].ToString();
                                this.lblbody_bcyj.Text += ")<br><hr height=1 color=#DEEEFE></hr>";
                            }
                        }
                        ////////补充意见e
                    }
                    else
                    {
                        this.lblcurtachenameshow.Text = this.lbltablename.Text;

                        //非流程表单
                        this.td_nextstep.Visible = false;
                        this.td_withdraw.Visible = false;
                        this.td_returnsumbit.Visible = false;
                        this.td_press.Visible = false;
                        this.td_browseflow.Visible = false;

                        ////////////判断当前表单是否为只显示个人
                        //////////HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
                        //////////DataTable dt_tableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.hy_mudelid.Text, this.hy_tableid.Text);
                        //////////if (dt_tableconfig.Rows.Count > 0)
                        //////////{
                        //////////    //不是流程文档,不显示所有记录
                        //////////    if (dt_tableconfig.Rows[0]["hy_ifflowdoc"].ToString() == "否" && dt_tableconfig.Rows[0]["hy_ifdisplayall"].ToString() == "否")
                        //////////    {
                        //////////        //判断是否为当前文档登记人
                        //////////        if(this.hy_djrid.Text==Session["hyuid"].ToString())
                        //////////            this.txtSystemClRight.Value = "1";
                        //////////    }
                        //////////    else
                        //////////    {
                        //////////        if (Hy_IfHaveRole(this.hy_mudelid.Text, Session["hyuid"].ToString()) == "1")
                        //////////            this.txtSystemClRight.Value = "1";
                        //////////    }
                        //////////}

                        //如果非流程(授权用户统一管理)
                        if (this.txttablerole.Value == "0")
                        {
                            if (Hy_IfHaveRole(this.hy_mudelid.Text, Session["hyuid"].ToString()) == "1")
                                this.txtSystemClRight.Value = "1";
                        }
                        //如果非流程(每个人管理自己的信息)
                        if (this.txttablerole.Value == "1")
                        {
                            //判断是否为当前文档登记人
                            if (this.hy_djrid.Text == Session["hyuid"].ToString())
                                this.txtSystemClRight.Value = "1";
                        }
                        //如果非流程(每个人操作自己的信息、授权用户可管理所有信息)
                        if (this.txttablerole.Value == "2")
                        {
                            if (Hy_IfHaveRole(this.hy_mudelid.Text, Session["hyuid"].ToString()) == "1")
                            {
                                this.txtSystemClRight.Value = "1";
                            }
                            else
                            {
                                if (this.hy_djrid.Text == Session["hyuid"].ToString())
                                    this.txtSystemClRight.Value = "1";
                            }
                        }

                        if (this.txtSystemClRight.Value == "1")
                        {
                            //只有登记人和管理员可以修改,有保存按钮
                            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
                            if (this.hy_djrid.Text == Session["hyuid"].ToString() || Hyoa_global.isHaveRole("Role9999", Session["hyuid"].ToString()))
                            {
                                this.td_submit.Visible = true; //保存

                                //信息管理市局录用记录
                                if (this.hy_mudelid.Text == "xxgl" && this.hy_tableid.Text == "f1265875-5494-465f-ac33-6fa43d208c8f")
                                {
                                    this.td_sc.Visible = false; //删除
                                }
                            }
                            else
                            {
                                this.td_submit.Visible = false; //保存
                            }
                        }
                        else
                        {
                            this.td_submit.Visible = false; //保存
                        }

                        //加载页面
                        this.rptlist.DataSource = GetDataTableFieldHtml(this.hy_mudelid.Text, this.hy_tableid.Text, "1", "0", this.txtdocid.Value, this.txtSystemClRight.Value, "0", "");
                        this.rptlist.DataBind();

                        UpdateReadFlag();  //打开时置为已读
                    }

                }
                hywebopen_olddoc(); //旧文档OPEN的特殊处理
            }
        }
    }
示例#8
0
    //得到表单的HTML pi_flag 0:不赋值  1:需赋值    Written by xf 20110515
    //docid:旧文档使用时,文档ID
    //ifhavarole:是否有权限  0:lable输出 1:input输出
    //ifflowdoc:是否流程表单 0:非流程 1:流程
    //curtacheid:当前环节ID,用于判断字段是否在当前环节有权限
    public DataTable GetDataTableFieldHtml(string hy_mudelid, string hy_tableid, string pi_flag, string ifsearch, string docid, string ifhavarole, string ifflowdoc, string curtacheid)
    {
        //加载表单
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        //根据模块ID和表单ID得到对应的配置字段
        DataTable dt_gettablecolumns = Hyoa_flowfield.GetflowfieldsbyMudelidAndTableid(hy_mudelid, hy_tableid);
        string ls_html = "";
        Int32 li_tdnums = 0;    //TDS数(colspan的值相加)

        DataTable tempTable = new DataTable();
        DataColumn col = new DataColumn("displaycol", typeof(String)); //定义新的一列  add
        tempTable.Columns.Add(col);  //追加一列  add

        if (dt_gettablecolumns.Rows.Count > 0)
        {
            //先从配置表中将配置的列数取出,如果配置表中找不到,则默认为4列,并且设置相应的宽度start
            HyoaClass.Hyoa_detail Hyoa_detail = new HyoaClass.Hyoa_detail();
            int li_col = 4;//一行显示几列
            string ls_leftwidth = "15";//左侧列宽
            string ls_rightwidth = "35";//右侧列宽
            DataTable detaildt = Hyoa_detail.Getdetail(hy_tableid);
            if (detaildt.Rows.Count > 0)
            {
                li_col = int.Parse(detaildt.Rows[0]["hy_colnum"].ToString());
                if (detaildt.Rows[0]["hy_colnum"].ToString() == "6")
                {
                    ls_leftwidth = "10";
                    ls_rightwidth = "23";
                }
                else
                {
                    if (detaildt.Rows[0]["hy_colnum"].ToString() == "8")
                    {
                        ls_leftwidth = "5";
                        ls_rightwidth = "7";
                    }
                    else
                    {
                        if (detaildt.Rows[0]["hy_colnum"].ToString() == "10")
                        {
                            ls_leftwidth = "4";
                            ls_rightwidth = "6";
                        }
                    }
                }
            }
            //先从配置表中将配置的列数取出,如果配置表中找不到,则默认为4列,并且设置相应的宽度end

            //开始加载字段信息到DT中,用于前台显示
            for (int i = 0; i < dt_gettablecolumns.Rows.Count; i++)
            {
                if (i == 0)
                {
                    ls_html += "<TR height=\"30\">";
                }
                //输出字段说明列(文字说明除外)
                if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() != "说明文字")
                {
                    //20120724
                    //如果是隐藏字段,则隐藏(增加display)   added by xf 20120217
                    if (dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                        ls_html += "<TD width=\"" + ls_leftwidth + "%\" align=\"center\" class=\"Tdcellleft\">" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "</TD>";
                    else
                        ls_html += "<div style=\"display:none\">" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "</div>";
                    //ls_html += "<TD width=\"" + ls_leftwidth + "%\" align=\"center\" class=\"Tdcellleft\">" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "</TD>";
                }
                //得到当前字段的值
                HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
                DataTable dt_flowmain = Hyoa_flowmain.Getflowmain(docid);
                string field_docvalue = "&nbsp;";
                if (dt_flowmain.Rows.Count > 0)
                {
                    if (dt_gettablecolumns.Rows[i]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                    {
                        field_docvalue = System.DateTime.Parse(dt_flowmain.Rows[0][dt_gettablecolumns.Rows[i]["hy_sqlfield"].ToString()].ToString()).ToShortDateString() + field_docvalue;
                    }
                    else
                    {
                        //如果SQL为数值的字段部分,则需要截取小数点后边两位
                        if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "数值")
                        {
                            if (dt_flowmain.Rows[0][dt_gettablecolumns.Rows[i]["hy_sqlfield"].ToString()].ToString().Contains(".") == true)
                                field_docvalue = float.Parse(dt_flowmain.Rows[0][dt_gettablecolumns.Rows[i]["hy_sqlfield"].ToString()].ToString()).ToString("F2") + field_docvalue;
                            else
                                field_docvalue = dt_flowmain.Rows[0][dt_gettablecolumns.Rows[i]["hy_sqlfield"].ToString()].ToString() + field_docvalue;
                        }
                        else
                        {
                            field_docvalue = dt_flowmain.Rows[0][dt_gettablecolumns.Rows[i]["hy_sqlfield"].ToString()].ToString() + field_docvalue;
                        }
                    }
                }
                //输出字段列
                //this.Response.Write("<script>alert('" + ifhavarole + "');</script>");
                if (ifhavarole == "0")  //无权限(当前表单来讲)
                {
                    //附件组件的值需要特定读取(附件需要特殊处理) Added by xf 20110607
                    if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "附件组件")
                    {

                        field_docvalue = "";
                        //根据docid得到目前已上传的附件信息
                        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                        HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
                        DataTable dt_fileatt = Hyoa_fileatt.GetfileattByFatherid(docid);
                        if (dt_fileatt.Rows.Count > 0)
                        {
                            for (var ii = 0; ii < dt_fileatt.Rows.Count; ii++)
                            {
                                string ls_name = "";
                                DataTable dt_user = Hyoa_user.Getuser(dt_fileatt.Rows[ii]["hy_userid"].ToString());
                                if (dt_user.Rows.Count > 0)
                                {
                                    ls_name = dt_user.Rows[0]["hy_username"].ToString();
                                }
                                field_docvalue += (ii + 1).ToString() + "、<a href=\"" + dt_fileatt.Rows[ii]["hy_filepath"].ToString() + "\" target=_blank>" + dt_fileatt.Rows[ii]["hy_filename"].ToString() + "&nbsp;&nbsp;&nbsp;&nbsp;" + ls_name + "&nbsp;&nbsp;[" + dt_fileatt.Rows[ii]["hy_djsj"].ToString() + "]" + "</a><br />";
                            }
                        }
                        if (field_docvalue == "")
                            field_docvalue = "&nbsp;";
                    }
                    //痕迹保留组件的值需要读取(需要特殊处理) Added by xf 20110705
                    if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "痕迹保留")
                    {
                        field_docvalue = "";
                        field_docvalue += "<input type=button id=\"btn_zwxg\" value='正  文' class=btn3 onclick=\"window.open('ntko/readoffice.aspx?newofficetype=1&fatherid=" + docid + "&tacheByhj=1&jsxd=1','newwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" ";
                        if (field_docvalue == "")
                            field_docvalue = "&nbsp;";
                    }
                    //ztmztmztmstart
                    //this.Response.Write("<script>alert('" + field_docvalue + "');</script>");
                    if (field_docvalue.Length > 7)
                    {

                        if (field_docvalue.Substring(0, 8) == "1900-1-1")
                        {
                            field_docvalue = "&nbsp;";
                        }
                    }
                    //ztmztmztmend
                    if (dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString() == "1")
                    {
                        //如果是隐藏字段,则隐藏(增加display)   added by xf 20120217
                        if (dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                            ls_html += "<TD width=\"" + ls_rightwidth + "%\" height=\"30px\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\">" + field_docvalue + "</TD>";
                        else
                            ls_html += "<div style=\"display:none\">" + field_docvalue + "</div>";
                        //ls_html += "<TD width=\"" + ls_rightwidth + "%\" height=\"30px\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\">" + field_docvalue + "</TD>";
                    }
                    else
                    {
                        //如果是隐藏字段,则隐藏(增加display)   added by xf 20120217
                        if (dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                            ls_html += "<TD width=\"" + ls_rightwidth + "%\" height=\"30px\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\" colspan=" + dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString() + ">" + field_docvalue + "</TD>";
                        else
                            ls_html += "<div style=\"display:none\">" + field_docvalue + "</div>";
                        //ls_html += "<TD width=\"" + ls_rightwidth + "%\" height=\"30px\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\" colspan=" + dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString() + ">" + field_docvalue + "</TD>";
                    }
                }
                else
                {
                    //有权限(当前表单来讲)时,判断当前流程+当前环节对于这个字段是否有权限操作
                    string ls_ifhavarole = "0";    //默认没有权限(当前字段来讲)---该功能仅对于流程模块起作用
                    //非流程直接就有权限了
                    //this.Response.Write("<script>alert('" + ifflowdoc + "');</script>");
                    if (ifflowdoc == "0")
                    {
                        ls_ifhavarole = "1";
                    }
                    else
                    {
                        //判断当前字段是否有权限
                        HyoaClass.Hyoa_flowtachefield Hyoa_flowtachefield = new HyoaClass.Hyoa_flowtachefield();
                        ls_ifhavarole = Hyoa_flowtachefield.IfHaveRolebyflowidandtacheidandfieldid(dt_gettablecolumns.Rows[i]["hy_flowid"].ToString(), curtacheid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString());
                    }

                    if (dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString() == "1")
                    {
                        //如果是隐藏字段,则隐藏(增加display)   added by xf 20120217
                        if (dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                            ls_html += "<TD width=\"" + ls_rightwidth + "%\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\">" + GetFieldHtml(hy_mudelid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString(), pi_flag, hy_tableid, ifsearch, docid, ls_ifhavarole) + "</TD>";
                        else
                            ls_html += "<div style=\"display:none\">" + GetFieldHtml(hy_mudelid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString(), pi_flag, hy_tableid, ifsearch, docid, ls_ifhavarole) + "</div>";
                        //ls_html += "<TD width=\"" + ls_rightwidth + "%\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\">" + GetFieldHtml(hy_mudelid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString(), pi_flag, hy_tableid, ifsearch, docid, ls_ifhavarole) + "</TD>";
                    }
                    else
                    {
                        //如果是隐藏字段,则隐藏(增加display)   added by xf 20120217
                        if (dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                            ls_html += "<TD width=\"" + ls_rightwidth + "%\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\" colspan=" + dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString() + ">" + GetFieldHtml(hy_mudelid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString(), pi_flag, hy_tableid, ifsearch, docid, ls_ifhavarole) + "</TD>";
                        else
                            ls_html += "<div style=\"display:none\">" + GetFieldHtml(hy_mudelid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString(), pi_flag, hy_tableid, ifsearch, docid, ls_ifhavarole) + "</div>";
                        //ls_html += "<TD width=\"" + ls_rightwidth + "%\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\" colspan=" + dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString() + ">" + GetFieldHtml(hy_mudelid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString(), pi_flag, hy_tableid, ifsearch, docid, ls_ifhavarole) + "</TD>";

                    }
                }
                //开始colspan值累加,如果是隐藏字段,不计算在内
                if (dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                {
                    if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "说明文字")
                        li_tdnums += System.Int32.Parse(dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString());
                    else
                        li_tdnums += System.Int32.Parse(dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString()) + 1;
                }
                //this.lbtest.Text += "," + li_tdnums;
                if (li_tdnums % li_col == 0 && dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                {
                    ls_html += "</tr>";
                    DataRow dr = tempTable.NewRow();
                    dr["displaycol"] = ls_html;  //将新值赋给相应的列  add
                    tempTable.Rows.Add(dr);
                    ls_html = "";
                    if (i != (dt_gettablecolumns.Rows.Count - 1))
                        ls_html += "<tr>";
                }
                //先从配置表中将配置的列数取出,如果配置表中找不到,则默认为4列end
            }
        }
        return tempTable;
    }
示例#9
0
    //发布
    protected void btnpubinfo_Click(object sender, EventArgs e)
    {
        //判断选中的投票项目是否一致
        HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
        HyoaClass.DAO db = new HyoaClass.DAO();
        string ls_tplb = "", ls_cyr = "";
        String[] v_uids = this.txtuids.Value.Split(',');

        //通过ID得到信息
        DataTable dt = Hyoa_flowmain.Getflowmain(v_uids[0]);
        if (dt.Rows.Count > 0)
        {
            ls_tplb = dt.Rows[0]["hy_field20"].ToString();
            ls_cyr = dt.Rows[0]["hy_field41"].ToString();
            if (ls_cyr != "" && ls_cyr.IndexOf('+') < 0)
            {
                Response.Write("<script>alert('多个可投票人员需要用加号分割,发布投票失败!');window.location = '/list_tpgl.aspx?mid=moduletpgl&tableid=bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd';</script>");
                return;
            }
        }

        //判断该投票类别是否已经发布过
        string ls_sql22 = "select * from hyp_flowmain where hy_field20='" + ls_tplb + "' and hy_field100=1 ";
        DataTable dtlb = db.GetDataTable(ls_sql22);
        if (dtlb.Rows.Count > 0)
        {
            Response.Write("<script>alert('该投票类别已发布,发布投票失败!');window.location = '/list_tpgl.aspx?mid=moduletpgl&tableid=bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd';</script>");
            return;
        }
        //for (var i = 0; i < v_uids.Length; i++)
        //{
        //    //通过ID得到信息
        //    DataTable dt1 = Hyoa_flowmain.Getflowmain(v_uids[i]);
        //    if (dt1.Rows.Count > 0)
        //    {
        //        if (ls_tpxm != dt1.Rows[0]["hy_field10"].ToString())
        //        {
        //            Response.Write("<script>alert('选择的投票项目不一致,发布投票失败!');window.location = '/list_tpgl.aspx?mid=moduletpgl&tableid=bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd';</script>");
        //            return;
        //        }
        //        if (dt.Rows[0]["hy_field100"].ToString() == "1")
        //        {
        //            Response.Write("<script>alert('选择的投票项目已发布,发布投票失败!');window.location = '/list_tpgl.aspx?mid=moduletpgl&tableid=bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd';</script>");
        //            return;
        //        }
        //    }
        //}
        //Response.Write("<script>alert('" + ls_tpxm + "');</script>");
        //return;
        //发布投票时发送邮件给参与投票人

        HyoaClass.Hyoa_mail Hyoa_mail = new HyoaClass.Hyoa_mail();
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();

        string ls_yqmlists = "";

        if (ls_cyr == "")
        {
            //从人员库中读取人员
            string sql2 = "select * from hyt_user order by hy_sort";
            DataTable dt2 = db.GetDataTable(sql2);
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt2.Rows.Count; i++)
                {
                    string ls_jsrid = dt2.Rows[i]["hy_userid"].ToString();
                    string ls_jsrname = dt2.Rows[i]["hy_username"].ToString();
                    string ls_yqm = "";
                    string ls_yqms = GetRandom3();
                    if (ls_jsrid == "admin")
                    {
                        ls_yqm = "000" + ls_yqms;
                    }
                    else
                    {
                        ls_yqm = ls_jsrid.Substring(ls_jsrid.Length - 3) + ls_yqms;  //获得6位数字的随机数
                    }
                    //string ls_dburl = "/wstp.aspx?yqm=" + ls_yqm + "&rnd=" + Hyoa_global.GetRandom();
                    string ls_dburl = "/wstp.aspx?rnd=" + Hyoa_global.GetRandom();
                    string ls_title = "[投票管理]-请参与" + ls_tplb + "的投票";
                    string ls_body = "您投票的邀请码为:" + ls_yqm + "。<a href=" + ls_dburl + " target=\"_blank\">请点击进入投票页面!</a>";
                    String ls_sql = "insert into hyt_mail(ID,DOCID,hy_type,hy_foldername,hy_fsrid,hy_fsrname,hy_jsrid,hy_wbjsrid,hy_jsrname,hy_title,hy_body,hy_datetime,hy_ifsavetofjx,hy_yxj,hy_yjbg,hy_zycd,hy_hz,hy_wbjszh) values ";
                    ls_sql += "('" + Hyoa_global.GetRandom() + "','" + Hyoa_global.GetRandom() + "','收件','收件箱','admin','管理员','" + ls_jsrid + "','','" + ls_jsrname + "','" + ls_title + "','" + ls_body + "','" + System.DateTime.Now.ToString() + "','','','','','','') ";

                    db.Execute(ls_sql);

                    //将邀请码
                    if (ls_yqmlists == "")
                    {
                        ls_yqmlists = ls_yqm;
                    }
                    else
                    {
                        ls_yqmlists = ls_yqmlists + "+" + ls_yqm;
                    }
                }
            }
        }
        else
        {

            string ls_jsrname = ls_cyr;
            string[] lv_jsrname = ls_jsrname.Split('+');
            for (var i = 0; i < lv_jsrname.Length; i++)
            {
                if (lv_jsrname[i] != "")
                {
                    string ls_jsrid = "";
                    string sqluser = "******" + lv_jsrname[i] + "'";
                    DataTable dtuser = db.GetDataTable(sqluser);
                    if (dtuser.Rows.Count > 0)
                    {
                        ls_jsrid = dtuser.Rows[0]["hy_userid"].ToString();
                    }

                    string ls_yqm = "";
                    string ls_yqms = GetRandom3();
                    if (lv_jsrname[i] == "管理员")
                    {
                        ls_yqm = "000" + ls_yqms;
                    }
                    else
                    {
                        //Response.Write("<script>alert('" + ls_jsrid + "')</script>");
                        //return;
                        if (ls_jsrid != "" && ls_jsrid.Length - 3 > 0)
                        {
                            ls_yqm = ls_jsrid.Substring(ls_jsrid.Length - 3) + ls_yqms;  //获得6位数字的随机数
                        }
                    }

                    ////发送待办
                    //string ls_dburl = "wstp.aspx?rnd=" + Hyoa_global.GetRandom();
                    //string ls_body = this.Session["hyuname"].ToString() + "发起投票,请您参与";
                    //Hyoa_global.Senddbsy_global(this.txtdocid.Value, lv_jsrid[i].ToString(), lv_jsrname[i].ToString(),
                    //    this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), ls_dburl, "待办", this.hy_mudelid.Text, "待办箱", "一般", ls_body, "请参与", 0, "", "");
                    //给参与的人发送邮件
                    //string ls_dburl = "/wstp.aspx?yqm=" + ls_yqm + "&rnd=" + Hyoa_global.GetRandom();
                    string ls_dburl = "/wstp.aspx?rnd=" + Hyoa_global.GetRandom();
                    string ls_title = "[投票管理]-请参与" + ls_tplb + "的投票";
                    string ls_body = "您投票的邀请码为:" + ls_yqm + "。<a href=" + ls_dburl + " target=\"_blank\">请点击进入投票页面!</a>";
                    String ls_sql = "insert into hyt_mail(ID,DOCID,hy_type,hy_foldername,hy_fsrid,hy_fsrname,hy_jsrid,hy_wbjsrid,hy_jsrname,hy_title,hy_body,hy_datetime,hy_ifsavetofjx,hy_yxj,hy_yjbg,hy_zycd,hy_hz,hy_wbjszh) values ";
                    ls_sql += "('" + Hyoa_global.GetRandom() + "','" + Hyoa_global.GetRandom() + "','收件','收件箱','admin','管理员','" + ls_jsrid + "','','" + lv_jsrname[i].ToString() + "','" + ls_title + "','" + ls_body + "','" + System.DateTime.Now.ToString() + "','','','','','','') ";

                    db.Execute(ls_sql);

                    //将邀请码
                    if (ls_yqmlists == "")
                    {
                        ls_yqmlists = ls_yqm;
                    }
                    else
                    {
                        ls_yqmlists = ls_yqmlists + "+" + ls_yqm;
                    }
                }
            }
        }

        //更新表
        string sql = "update hyp_flowmain set hy_field30='" + ls_yqmlists + "',hy_field100=1 where hy_field20='" + ls_tplb + "'";
        db.Execute(sql);
        db.Close();
        db.Dispose();

        this.txtuids.Value = "";
        //DataPlay(System.Int32.Parse(this.curpage.Text));
        Response.Write("<script>alert('发布投票成功!');window.location = '/list_tpgl.aspx?mid=moduletpgl&tableid=bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd';</script>");
    }
示例#10
0
    //加载主表单    Written by xf 20110515
    private void DataPlay()
    {
        if (this.Request.QueryString["op"] != null)
        {
            this.txtop.Value = this.Request.QueryString["op"].ToString();           //新增还是修改

            //新文档
            if (this.Request.QueryString["op"] == "add")
            {
                HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
                //文档ID
                this.txtdocid.Value = Hyoa_global.GetRandom();

                this.hy_djrid.Text = this.Session["hyuid"].ToString();
                this.hy_djrname.Text = this.Session["hyuname"].ToString();
                this.hy_djrbmid.Text = this.Session["hydeptid"].ToString();
                this.hy_djrbmname.Text = this.Session["hydeptname"].ToString();
                this.hy_djsj.Text = System.DateTime.Now.ToString();

                if (this.txtifhaveflow.Value == "是")
                {
                    HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
                    DataTable dt_tableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.hy_mudelid.Text, this.hy_tableid.Text);
                    if (dt_tableconfig.Rows.Count > 0)
                    {
                        if (dt_tableconfig.Rows[0]["hy_ifflowdoc"].ToString() == "是")
                        {
                            //根据模块ID得到流程信息
                            HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
                            DataTable dt = Hyoa_flowinfor.Getfirsttacheinfobymudelid(this.hy_mudelid.Text);
                            //Response.Write("<script>alert('"+dt.Rows.Count.ToString()+"')</script>");
                            if (dt.Rows.Count > 0)
                            {
                                //判断当前用户是否有登记权限
                                //得到第一环节ID
                                string ls_firsttacheid = Hyoa_global.GetFirstTacheid(dt.Rows[0]["hy_flowid"].ToString());
                                if (Hyoa_global.IfHaveRegiRight_Lc(dt.Rows[0]["hy_flowid"].ToString(), ls_firsttacheid, this.Session["hyuid"].ToString()))
                                {
                                    this.hy_flowid.Text = dt.Rows[0]["hy_flowid"].ToString();
                                    this.hy_flowname.Text = dt.Rows[0]["hy_flowname"].ToString();
                                    this.hy_curtacheid.Text = dt.Rows[0]["hy_nexttacheid"].ToString();
                                    this.hy_curtachename.Text = dt.Rows[0]["hy_nexttachename"].ToString();
                                    this.hy_curclrid.Text = this.Session["hyuid"].ToString();
                                    this.hy_curclrname.Text = this.Session["hyuname"].ToString();
                                    this.lblcurtachenameshow.Text = dt.Rows[0]["hy_nexttachename"].ToString();
                                    this.txtSystemClRight.Value = "1";
                                }
                                else
                                {
                                    Response.Write("<script>alert('您无权进行此项操作,请联系管理员!');history.back();</script>");
                                }
                            }
                            dt.Clear();
                            this.td_nextstep.Visible = true; //提交
                        }
                    }
                    //加载页面
                    this.rptlist.DataSource = GetDataTableFieldHtml(this.hy_mudelid.Text, this.hy_tableid.Text, "0", "0", this.txtdocid.Value, this.txtSystemClRight.Value, "1", this.hy_curtacheid.Text);
                    this.rptlist.DataBind();
                    this.td_submit.Visible = true; //保存
                }
                else
                {
                    this.lblcurtachenameshow.Text = this.lbltablename.Text;
                    //如果非流程(授权用户统一管理)
                    if (this.txttablerole.Value == "0")
                    {
                        if (Hy_IfHaveRole(this.hy_mudelid.Text, Session["hyuid"].ToString()) == "1")
                            this.txtSystemClRight.Value = "1";
                    }
                    //如果非流程(每个人管理自己的信息)
                    if (this.txttablerole.Value == "1")
                    {
                        this.txtSystemClRight.Value = "1";
                    }
                    //如果非流程(每个人操作自己的信息、授权用户可管理所有信息)
                    if (this.txttablerole.Value == "2")
                    {
                        this.txtSystemClRight.Value = "1";
                    }

                    if(this.txtSystemClRight.Value == "1")
                        this.td_submit.Visible = true; //保存
                    else
                        this.td_submit.Visible = false; //保存

                    //加载页面
                    this.rptlist.DataSource = GetDataTableFieldHtml(this.hy_mudelid.Text, this.hy_tableid.Text, "0", "0", this.txtdocid.Value, this.txtSystemClRight.Value, "0", "");
                    this.rptlist.DataBind();

                }
                hywebopen_newdoc();     //新文档OPEN时的特殊处理
            }
            //旧文档
            if (this.Request.QueryString["op"] == "modify")
            {
                this.td_browseflow.Visible = true;  //查看流程

                if (this.Request.QueryString["docid"] != null)
                {
                    this.txtdocid.Value = this.Request.QueryString["docid"].ToString();

                    HyoaClass.Hyoa_flowmain flowmain = new HyoaClass.Hyoa_flowmain();
                    DataTable dt = flowmain.Getflowmain(this.txtdocid.Value);
                    if (dt.Rows.Count > 0)
                    {
                        this.hy_mudelid.Text = dt.Rows[0]["hy_mudelid"].ToString();
                        this.hy_tableid.Text = dt.Rows[0]["hy_tableid"].ToString();
                        this.hy_flowid.Text = dt.Rows[0]["hy_flowid"].ToString();
                        this.hy_flowname.Text = dt.Rows[0]["hy_flowname"].ToString();
                        this.hy_curtacheid.Text = dt.Rows[0]["hy_curtacheid"].ToString();
                        this.hy_curtachename.Text = dt.Rows[0]["hy_curtachename"].ToString();
                        this.lblcurtachenameshow.Text = dt.Rows[0]["hy_curtachename"].ToString();
                        this.hy_curclrid.Text = dt.Rows[0]["hy_curclrid"].ToString();
                        this.hy_curclrname.Text = dt.Rows[0]["hy_curclrname"].ToString();
                        this.hy_djrid.Text = dt.Rows[0]["hy_djrid"].ToString();
                        this.hy_djrname.Text = dt.Rows[0]["hy_djrname"].ToString();
                        this.hy_djrbmid.Text = dt.Rows[0]["hy_djrbmid"].ToString();
                        this.hy_djrbmname.Text = dt.Rows[0]["hy_djrbmname"].ToString();
                        this.hy_djsj.Text = dt.Rows[0]["hy_djsj"].ToString();
                        this.hy_bt.Text = dt.Rows[0]["hy_bt"].ToString();
                        this.hy_content1.Text = dt.Rows[0]["hy_content1"].ToString();
                        this.hy_content2.Text = dt.Rows[0]["hy_content2"].ToString();
                        this.hy_content3.Text = dt.Rows[0]["hy_content3"].ToString();
                        this.hy_content4.Text = dt.Rows[0]["hy_content4"].ToString();
                        this.hy_content5.Text = dt.Rows[0]["hy_content5"].ToString();
                        this.hy_content6.Text = dt.Rows[0]["hy_content6"].ToString();
                        this.hy_content7.Text = dt.Rows[0]["hy_content7"].ToString();
                        this.hy_content8.Text = dt.Rows[0]["hy_content8"].ToString();
                        this.hy_content9.Text = dt.Rows[0]["hy_content9"].ToString();
                        this.hy_content10.Text = dt.Rows[0]["hy_content10"].ToString();
                        this.hy_content11.Text = dt.Rows[0]["hy_content11"].ToString();
                        this.hy_content12.Text = dt.Rows[0]["hy_content12"].ToString();
                        this.hy_content13.Text = dt.Rows[0]["hy_content13"].ToString();
                        this.hy_content14.Text = dt.Rows[0]["hy_content14"].ToString();
                        this.hy_content15.Text = dt.Rows[0]["hy_content15"].ToString();
                        this.hy_field1.Text = dt.Rows[0]["hy_field1"].ToString();
                        this.hy_field2.Text = dt.Rows[0]["hy_field2"].ToString();
                        this.hy_field3.Text = dt.Rows[0]["hy_field3"].ToString();
                        this.hy_field4.Text = dt.Rows[0]["hy_field4"].ToString();
                        this.hy_field5.Text = dt.Rows[0]["hy_field5"].ToString();
                        this.hy_field6.Text = dt.Rows[0]["hy_field6"].ToString();
                        this.hy_field7.Text = dt.Rows[0]["hy_field7"].ToString();
                        this.hy_field8.Text = dt.Rows[0]["hy_field8"].ToString();
                        this.hy_field9.Text = dt.Rows[0]["hy_field9"].ToString();
                        this.hy_field10.Text = dt.Rows[0]["hy_field10"].ToString();
                        this.hy_field11.Text = dt.Rows[0]["hy_field11"].ToString();
                        this.hy_field12.Text = dt.Rows[0]["hy_field12"].ToString();
                        this.hy_field13.Text = dt.Rows[0]["hy_field13"].ToString();
                        this.hy_field14.Text = dt.Rows[0]["hy_field14"].ToString();
                        this.hy_field15.Text = dt.Rows[0]["hy_field15"].ToString();
                        this.hy_field16.Text = dt.Rows[0]["hy_field16"].ToString();
                        this.hy_field17.Text = dt.Rows[0]["hy_field17"].ToString();
                        this.hy_field18.Text = dt.Rows[0]["hy_field18"].ToString();
                        this.hy_field19.Text = dt.Rows[0]["hy_field19"].ToString();
                        this.hy_field20.Text = dt.Rows[0]["hy_field20"].ToString();
                        this.hy_field21.Text = dt.Rows[0]["hy_field21"].ToString();
                        this.hy_field22.Text = dt.Rows[0]["hy_field22"].ToString();
                        this.hy_field23.Text = dt.Rows[0]["hy_field23"].ToString();
                        this.hy_field24.Text = dt.Rows[0]["hy_field24"].ToString();
                        this.hy_field25.Text = dt.Rows[0]["hy_field25"].ToString();
                        this.hy_field26.Text = dt.Rows[0]["hy_field26"].ToString();
                        this.hy_field27.Text = dt.Rows[0]["hy_field27"].ToString();
                        this.hy_field28.Text = dt.Rows[0]["hy_field28"].ToString();
                        this.hy_field29.Text = dt.Rows[0]["hy_field29"].ToString();
                        this.hy_field30.Text = dt.Rows[0]["hy_field30"].ToString();
                        this.hy_field31.Text = dt.Rows[0]["hy_field31"].ToString();
                        this.hy_field32.Text = dt.Rows[0]["hy_field32"].ToString();
                        this.hy_field33.Text = dt.Rows[0]["hy_field33"].ToString();
                        this.hy_field34.Text = dt.Rows[0]["hy_field34"].ToString();
                        this.hy_field35.Text = dt.Rows[0]["hy_field35"].ToString();
                        this.hy_field36.Text = dt.Rows[0]["hy_field36"].ToString();
                        this.hy_field37.Text = dt.Rows[0]["hy_field37"].ToString();
                        this.hy_field38.Text = dt.Rows[0]["hy_field38"].ToString();
                        this.hy_field39.Text = dt.Rows[0]["hy_field39"].ToString();
                        this.hy_field40.Text = dt.Rows[0]["hy_field40"].ToString();
                        this.hy_field41.Text = dt.Rows[0]["hy_field41"].ToString();
                        this.hy_field42.Text = dt.Rows[0]["hy_field42"].ToString();
                        this.hy_field43.Text = dt.Rows[0]["hy_field43"].ToString();
                        this.hy_field44.Text = dt.Rows[0]["hy_field44"].ToString();
                        this.hy_field45.Text = dt.Rows[0]["hy_field45"].ToString();
                        this.hy_field46.Text = dt.Rows[0]["hy_field46"].ToString();
                        this.hy_field47.Text = dt.Rows[0]["hy_field47"].ToString();
                        this.hy_field48.Text = dt.Rows[0]["hy_field48"].ToString();
                        this.hy_field49.Text = dt.Rows[0]["hy_field49"].ToString();
                        this.hy_field50.Text = dt.Rows[0]["hy_field50"].ToString();
                        this.hy_field51.Text = dt.Rows[0]["hy_field51"].ToString();
                        this.hy_field52.Text = dt.Rows[0]["hy_field52"].ToString();
                        this.hy_field53.Text = dt.Rows[0]["hy_field53"].ToString();
                        this.hy_field54.Text = dt.Rows[0]["hy_field54"].ToString();
                        this.hy_field55.Text = dt.Rows[0]["hy_field55"].ToString();
                        this.hy_field56.Text = dt.Rows[0]["hy_field56"].ToString();
                        this.hy_field57.Text = dt.Rows[0]["hy_field57"].ToString();
                        this.hy_field58.Text = dt.Rows[0]["hy_field58"].ToString();
                        this.hy_field59.Text = dt.Rows[0]["hy_field59"].ToString();
                        this.hy_field60.Text = dt.Rows[0]["hy_field60"].ToString();
                        this.hy_field61.Text = dt.Rows[0]["hy_field61"].ToString();
                        this.hy_field62.Text = dt.Rows[0]["hy_field62"].ToString();
                        this.hy_field63.Text = dt.Rows[0]["hy_field63"].ToString();
                        this.hy_field64.Text = dt.Rows[0]["hy_field64"].ToString();
                        this.hy_field65.Text = dt.Rows[0]["hy_field65"].ToString();
                        this.hy_field66.Text = dt.Rows[0]["hy_field66"].ToString();
                        this.hy_field67.Text = dt.Rows[0]["hy_field67"].ToString();
                        this.hy_field68.Text = dt.Rows[0]["hy_field68"].ToString();
                        this.hy_field69.Text = dt.Rows[0]["hy_field69"].ToString();
                        this.hy_field70.Text = dt.Rows[0]["hy_field70"].ToString();
                        this.hy_field71.Text = dt.Rows[0]["hy_field71"].ToString();
                        this.hy_field72.Text = dt.Rows[0]["hy_field72"].ToString();
                        this.hy_field73.Text = dt.Rows[0]["hy_field73"].ToString();
                        this.hy_field74.Text = dt.Rows[0]["hy_field74"].ToString();
                        this.hy_field75.Text = dt.Rows[0]["hy_field75"].ToString();
                        this.hy_field76.Text = dt.Rows[0]["hy_field76"].ToString();
                        this.hy_field77.Text = dt.Rows[0]["hy_field77"].ToString();
                        this.hy_field78.Text = dt.Rows[0]["hy_field78"].ToString();
                        this.hy_field79.Text = dt.Rows[0]["hy_field79"].ToString();
                        this.hy_field80.Text = dt.Rows[0]["hy_field80"].ToString();

                        this.hy_field81.Text = dt.Rows[0]["hy_field81"].ToString();
                        this.hy_field82.Text = dt.Rows[0]["hy_field82"].ToString();
                        this.hy_field83.Text = dt.Rows[0]["hy_field83"].ToString();
                        this.hy_field84.Text = dt.Rows[0]["hy_field84"].ToString();
                        this.hy_field85.Text = dt.Rows[0]["hy_field85"].ToString();
                        this.hy_field86.Text = dt.Rows[0]["hy_field86"].ToString();
                        this.hy_field87.Text = dt.Rows[0]["hy_field87"].ToString();
                        this.hy_field88.Text = dt.Rows[0]["hy_field88"].ToString();
                        this.hy_field89.Text = dt.Rows[0]["hy_field89"].ToString();
                        this.hy_field90.Text = dt.Rows[0]["hy_field90"].ToString();

                        this.hy_field91.Text = dt.Rows[0]["hy_field91"].ToString();
                        this.hy_field92.Text = dt.Rows[0]["hy_field92"].ToString();
                        this.hy_field93.Text = dt.Rows[0]["hy_field93"].ToString();
                        this.hy_field94.Text = dt.Rows[0]["hy_field94"].ToString();
                        this.hy_field95.Text = dt.Rows[0]["hy_field95"].ToString();
                        this.hy_field96.Text = dt.Rows[0]["hy_field96"].ToString();
                        this.hy_field97.Text = dt.Rows[0]["hy_field97"].ToString();
                        this.hy_field98.Text = dt.Rows[0]["hy_field98"].ToString();
                        this.hy_field99.Text = dt.Rows[0]["hy_field99"].ToString();
                        this.hy_field100.Text = dt.Rows[0]["hy_field100"].ToString();

                        this.hy_iftx.Text = dt.Rows[0]["hy_iftx"].ToString();
                        this.hy_zhtxsj.Text = dt.Rows[0]["hy_zhtxsj"].ToString();
                        this.hy_readuserlist.Text = dt.Rows[0]["hy_readuserlist"].ToString();
                    }
                    dt.Clear();
                    //流程文档
                    if (this.txtifhaveflow.Value == "是")
                    {
                        //流程已结束
                        if (this.hy_curtacheid.Text == "**")
                        {
                            //////////////流程已结束///////////////////////
                            this.lblcurtachenameshow.Text = "流程已结束";

                            UpdateReadFlag();  //打开时置为已读
                            //////////////流程已结束///////////////////////
                        }
                        else
                        {
                            //////////////流程未结束///////////////////////
                            //判断是否为当前处理人
                            if (this.hy_curclrid.Text.IndexOf(this.Session["hyuid"].ToString()) >= 0)
                            {
                                this.txtSystemClRight.Value = "1";
                                this.td_submit.Visible = true; //保存
                                this.td_nextstep.Visible = true; //提交
                                this.td_returnsumbit.Visible = true; //退回
                            }
                            else
                            {
                                //判断是否为传阅人
                                HyoaClass.Hyoa_flowhistoryinfo_cy Hyoa_flowhistoryinfo_cy = new HyoaClass.Hyoa_flowhistoryinfo_cy();
                                dt = Hyoa_flowhistoryinfo_cy.Getifcyrybydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString());
                                if (dt.Rows.Count > 0)
                                {
                                    this.txtSystemYdRight.Value = "1";
                                }
                                //判断是否是上一环节处理人
                                HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
                                if (Hyoa_global.iflastclr(this.txtdocid.Value, this.Session["hyuid"].ToString()))
                                {
                                    this.txtiflastclr.Value = "1";
                                    this.txtSystemYdRight.Value = "1";
                                    this.td_withdraw.Visible = true; //收回
                                    this.td_press.Visible = true; //催办
                                }
                                else
                                {
                                    //判断是否是历史处理人员
                                    if (Hyoa_global.ifhistoryclr(this.txtdocid.Value, this.Session["hyuid"].ToString()))
                                    {
                                        this.txtifhistoryclr.Value = "1";
                                        this.txtSystemYdRight.Value = "1";
                                        this.td_press.Visible = true; //催办
                                    }
                                }
                            }
                            //判断是否为最后一个环节
                            HyoaClass.Hyoa_flowwork Hyoa_flowwork = new HyoaClass.Hyoa_flowwork();
                            DataTable dtflowwork = Hyoa_flowwork.Getflowworkbyflowidtacheid(this.hy_flowid.Text, this.hy_curtacheid.Text);
                            if (dtflowwork.Rows.Count > 0)
                            {
                                if (dtflowwork.Rows[0]["hy_nexttacheid"].ToString() == "**")
                                    this.txtiflasttache.Value = "1";
                            }
                            dtflowwork.Clear();
                            //既没有处理权限,又没有阅读权限的情况下
                            if (this.txtSystemClRight.Value == "0" && this.txtSystemYdRight.Value == "0")
                            {
                                Response.Write("<script>alert('您无权进行此项操作,请联系管理员!');history.back();</script>");
                            }
                            //////////////流程未结束///////////////////////
                        }
                        //加载页面
                        this.rptlist.DataSource = GetDataTableFieldHtml(this.hy_mudelid.Text, this.hy_tableid.Text, "1", "0", this.txtdocid.Value, this.txtSystemClRight.Value, "1", this.hy_curtacheid.Text);
                        this.rptlist.DataBind();
                    }
                    else
                    {
                        this.lblcurtachenameshow.Text = this.lbltablename.Text;

                        //非流程表单
                        this.td_nextstep.Visible = false;
                        this.td_withdraw.Visible = false;
                        this.td_returnsumbit.Visible = false;
                        this.td_press.Visible = false;
                        this.td_browseflow.Visible = false;

                        ////////////判断当前表单是否为只显示个人
                        //////////HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
                        //////////DataTable dt_tableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.hy_mudelid.Text, this.hy_tableid.Text);
                        //////////if (dt_tableconfig.Rows.Count > 0)
                        //////////{
                        //////////    //不是流程文档,不显示所有记录
                        //////////    if (dt_tableconfig.Rows[0]["hy_ifflowdoc"].ToString() == "否" && dt_tableconfig.Rows[0]["hy_ifdisplayall"].ToString() == "否")
                        //////////    {
                        //////////        //判断是否为当前文档登记人
                        //////////        if(this.hy_djrid.Text==Session["hyuid"].ToString())
                        //////////            this.txtSystemClRight.Value = "1";
                        //////////    }
                        //////////    else
                        //////////    {
                        //////////        if (Hy_IfHaveRole(this.hy_mudelid.Text, Session["hyuid"].ToString()) == "1")
                        //////////            this.txtSystemClRight.Value = "1";
                        //////////    }
                        //////////}

                        //如果非流程(授权用户统一管理)
                        if (this.txttablerole.Value == "0")
                        {
                            if (Hy_IfHaveRole(this.hy_mudelid.Text, Session["hyuid"].ToString()) == "1")
                                this.txtSystemClRight.Value = "1";
                        }
                        //如果非流程(每个人管理自己的信息)
                        if (this.txttablerole.Value == "1")
                        {
                            //判断是否为当前文档登记人
                            if (this.hy_djrid.Text == Session["hyuid"].ToString())
                                this.txtSystemClRight.Value = "1";
                        }
                        //如果非流程(每个人操作自己的信息、授权用户可管理所有信息)
                        if (this.txttablerole.Value == "2")
                        {
                            if (Hy_IfHaveRole(this.hy_mudelid.Text, Session["hyuid"].ToString()) == "1")
                            {
                                this.txtSystemClRight.Value = "1";
                            }
                            else
                            {
                                if (this.hy_djrid.Text == Session["hyuid"].ToString())
                                    this.txtSystemClRight.Value = "1";
                            }
                        }

                        if (this.txtSystemClRight.Value == "1")
                            this.td_submit.Visible = true; //保存
                        else
                            this.td_submit.Visible = false; //保存

                        //加载页面
                        this.rptlist.DataSource = GetDataTableFieldHtml(this.hy_mudelid.Text, this.hy_tableid.Text, "1", "0", this.txtdocid.Value, this.txtSystemClRight.Value, "0","");
                        this.rptlist.DataBind();

                        UpdateReadFlag();  //打开时置为已读
                    }

                }
                hywebopen_olddoc(); //旧文档OPEN的特殊处理
            }
        }
    }
示例#11
0
    /// <summary>
    /// 将Web控件导出
    /// </summary>
    /// <param name="source">控件实例</param>
    /// <param name="type">类型:Excel或Word</param>
    public void ExpertControl(string ls_ids, DocumentType type)
    {
        //设置Http的头信息,编码格式
        if (type == DocumentType.Excel)
        {
            //Excel
            Response.AppendHeader("Content-Disposition", "attachment;filename=result.xls");
            Response.ContentType = "application/ms-excel";
        }
        else if (type == DocumentType.Word)
        {
            //Word
            Response.AppendHeader("Content-Disposition", "attachment;filename=result.doc");
            Response.ContentType = "application/ms-word97";
        }
        Response.Charset = "Default";
        Response.ContentEncoding = System.Text.Encoding.Default;

        //关闭控件的视图状态
        //source.Page.EnableViewState = false;

        //初始化HtmlWriter
        //System.IO.StringWriter writer = new System.IO.StringWriter();
        //System.Web.UI.HtmlTextWriter htmlWriter = new System.Web.UI.HtmlTextWriter(writer);
        //source.RenderControl(htmlWriter);

        string ls_mid = "";
        if (this.Request.QueryString["mid"] != null)
        {
            ls_mid = this.Request.QueryString["mid"].ToString();
        }
        string ls_tableid = "";
        if (this.Request.QueryString["tableid"] != null)
        {
            ls_tableid = this.Request.QueryString["tableid"].ToString();
        }

        //根据模块ID+表单ID得到对应的域
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dt_flowfield = Hyoa_flowfield.GetflowfieldsbyMudelidAndTableid(ls_mid, ls_tableid);

        string[] lv_left = new string[dt_flowfield.Rows.Count];
        double[] lv_tatal = new double[dt_flowfield.Rows.Count];
        string[] lv_right = new string[dt_flowfield.Rows.Count];
        for (int i = 0; i < dt_flowfield.Rows.Count; i++)
        {
            if (dt_flowfield.Rows[i]["hy_sqlfield"].ToString().Contains("hy_field"))
            {
                if (dt_flowfield.Rows[i]["hy_fieldname"].ToString().IndexOf('(') >= 0 && dt_flowfield.Rows[i]["hy_fieldname"].ToString().IndexOf(')') >= 0)
                {
                    lv_left[i] = dt_flowfield.Rows[i]["hy_fieldname"].ToString().Substring(0, dt_flowfield.Rows[i]["hy_fieldname"].ToString().LastIndexOf('('));
                    lv_tatal[i] = 0;
                    lv_right[i] = dt_flowfield.Rows[i]["hy_fieldname"].ToString().Substring(dt_flowfield.Rows[i]["hy_fieldname"].ToString().LastIndexOf('(') + 1, dt_flowfield.Rows[i]["hy_fieldname"].ToString().Length - dt_flowfield.Rows[i]["hy_fieldname"].ToString().LastIndexOf('(') - 2);
                }
                else
                {
                    lv_left[i] = dt_flowfield.Rows[i]["hy_fieldname"].ToString();
                    lv_tatal[i] = 0;
                    lv_right[i] = "";
                }
            }
        }

        //得到数据
        HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
        string[] lv_ids = ls_ids.Split(',');
        for (var i = 0; i < lv_ids.Length; i++)
        {
            if (lv_ids[i] != "")
            {
                DataTable dt = Hyoa_flowmain.Getflowmain(lv_ids[i]);
                if (dt.Rows.Count > 0)
                {
                    if (dt_flowfield.Rows.Count > 0)
                    {
                        for (var j = 0; j < dt_flowfield.Rows.Count; j++)
                        {
                            if (dt_flowfield.Rows[j]["hy_sqlfield"].ToString().Contains("hy_field"))
                            {
                                if (dt.Rows[0][dt_flowfield.Rows[j]["hy_sqlfield"].ToString()].ToString() == "")
                                    lv_tatal[j] = lv_tatal[j];
                                else
                                    lv_tatal[j] = lv_tatal[j] + double.Parse(dt.Rows[0][dt_flowfield.Rows[j]["hy_sqlfield"].ToString()].ToString());

                                //if (j < dt_flowfield.Rows.Count - 1)
                                //{
                                //    Response.Write(dt_flowfield.Rows[j]["hy_fieldname"].ToString() + ":");
                                //    Response.Write(dt.Rows[0][dt_flowfield.Rows[j]["hy_sqlfield"].ToString()].ToString() + ",");
                                //}
                            }
                        }
                        //Response.Write("\n");
                        //Response.Write("\n");
                    }
                }
            }
        }
        Int32 li_xh = 1;
        //第一次"其中不合格"不让换行
        string ls_flag = "0";
        Response.Write(li_xh.ToString() + ".");
        for (var i = 0; i < lv_tatal.Length; i++)
        {
            if (lv_left[i] != null)
            {

                //如果是其中受理进出境保税区货物的时候,加“。”换行
                if (lv_left[i].ToString() == "检疫查验船舶")
                {
                    Response.Write("。");
                    Response.Write("\n");
                    Response.Write("\n");
                    li_xh += 1;
                    Response.Write(li_xh.ToString() + ".");
                }
                else
                {
                    if (lv_left[i].ToString() == "查验进境废物原料")
                    {
                            Response.Write("。");
                            Response.Write("\n");
                            Response.Write("\n");
                            li_xh += 1;
                            Response.Write(li_xh.ToString() + ".");

                    }
                    else
                    {
                        if (lv_left[i].ToString() == "规费收入(不包含国航数据)")
                        {
                            Response.Write("。");
                            Response.Write("\n");
                            Response.Write("\n");
                            li_xh += 1;
                            Response.Write(li_xh.ToString() + ".");
                        }
                        else
                        {
                            if (lv_left[i].ToString() == "行政处罚")
                            {
                                Response.Write("。");
                                Response.Write("\n");
                                Response.Write("\n");
                                li_xh += 1;
                                Response.Write(li_xh.ToString() + ".");
                            }
                            else
                            {
                                if (lv_left[i].ToString() == "罚没")
                                {
                                    Response.Write("。");
                                }
                                else
                                {
                                    //Response.Write(i.ToString());
                                    if (i != 4)
                                    {
                                        Response.Write(",");
                                    }

                                }
                            }

                        }
                    }
                }
                Response.Write(lv_left[i].ToString());
                Response.Write(lv_tatal[i].ToString());
                Response.Write(lv_right[i].ToString());

            }
        }
        Response.Write("。");

        Response.End();
    }
示例#12
0
    //复制
    protected void btncopyinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        //String[] v_uids = this.txtuids.Value.Split(',');
        string ls_doc = Hyoa_global.GetRandom();
        //得到记录 复制一条记录==20140224 by fy==
        DataTable dt = Hyoa_flowmain.Getflowmain(this.txtuids.Value);
        if (dt.Rows.Count > 0)
        {
            //开始复制
            Hyoa_flowmain.DOCID = ls_doc;
            Hyoa_flowmain.hy_mudelid = dt.Rows[0]["hy_mudelid"].ToString();
            Hyoa_flowmain.hy_tableid = dt.Rows[0]["hy_tableid"].ToString();
            Hyoa_flowmain.hy_flowid = dt.Rows[0]["hy_flowid"].ToString();
            Hyoa_flowmain.hy_flowname = dt.Rows[0]["hy_flowname"].ToString();
            Hyoa_flowmain.hy_curtacheid = "";
            Hyoa_flowmain.hy_curtachename = "";
            Hyoa_flowmain.hy_curclrid = "";
            Hyoa_flowmain.hy_curclrname = "";
            //Hyoa_flowmain.hy_djrid = dt.Rows[0]["hy_djrid"].ToString();
            //Hyoa_flowmain.hy_djrname = dt.Rows[0]["hy_djrname"].ToString();
            //Hyoa_flowmain.hy_djrbmid = dt.Rows[0]["hy_djrbmid"].ToString();
            //Hyoa_flowmain.hy_djrbmname = dt.Rows[0]["hy_djrbmname"].ToString();
            //Hyoa_flowmain.hy_djsj = dt.Rows[0]["hy_djsj"].ToString();
            Hyoa_flowmain.hy_djrid = Session["hyuid"].ToString();
            Hyoa_flowmain.hy_djrname = Session["hyuname"].ToString();
            Hyoa_flowmain.hy_djrbmid = Session["hydeptid"].ToString();
            Hyoa_flowmain.hy_djrbmname = Session["hydeptname"].ToString();
            Hyoa_flowmain.hy_djsj = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

            Hyoa_flowmain.hy_bt = dt.Rows[0]["hy_bt"].ToString();

            Hyoa_flowmain.hy_content1 = dt.Rows[0]["hy_content1"].ToString();
            Hyoa_flowmain.hy_content2 = dt.Rows[0]["hy_content2"].ToString();
            Hyoa_flowmain.hy_content3 = dt.Rows[0]["hy_content3"].ToString();
            Hyoa_flowmain.hy_content4 = dt.Rows[0]["hy_content4"].ToString();
            Hyoa_flowmain.hy_content5 = dt.Rows[0]["hy_content5"].ToString();

            Hyoa_flowmain.hy_field1 = dt.Rows[0]["hy_field1"].ToString();
            Hyoa_flowmain.hy_field2 = dt.Rows[0]["hy_field2"].ToString();
            Hyoa_flowmain.hy_field3 = dt.Rows[0]["hy_field3"].ToString();
            Hyoa_flowmain.hy_field4 = dt.Rows[0]["hy_field4"].ToString();
            Hyoa_flowmain.hy_field5 = dt.Rows[0]["hy_field5"].ToString();
            Hyoa_flowmain.hy_field6 = dt.Rows[0]["hy_field6"].ToString();
            Hyoa_flowmain.hy_field7 = dt.Rows[0]["hy_field7"].ToString();
            Hyoa_flowmain.hy_field8 = dt.Rows[0]["hy_field8"].ToString();
            Hyoa_flowmain.hy_field9 = dt.Rows[0]["hy_field9"].ToString();
            Hyoa_flowmain.hy_field10 = dt.Rows[0]["hy_field10"].ToString();
            Hyoa_flowmain.hy_field11 = dt.Rows[0]["hy_field11"].ToString();
            Hyoa_flowmain.hy_field12 = dt.Rows[0]["hy_field12"].ToString();
            Hyoa_flowmain.hy_field13 = dt.Rows[0]["hy_field13"].ToString();
            Hyoa_flowmain.hy_field14 = dt.Rows[0]["hy_field14"].ToString();
            Hyoa_flowmain.hy_field15 = dt.Rows[0]["hy_field15"].ToString();
            Hyoa_flowmain.hy_field16 = dt.Rows[0]["hy_field16"].ToString();
            Hyoa_flowmain.hy_field17 = dt.Rows[0]["hy_field17"].ToString();
            Hyoa_flowmain.hy_field18 = dt.Rows[0]["hy_field18"].ToString();
            Hyoa_flowmain.hy_field19 = dt.Rows[0]["hy_field19"].ToString();
            Hyoa_flowmain.hy_field20 = dt.Rows[0]["hy_field20"].ToString();
            Hyoa_flowmain.hy_field21 = dt.Rows[0]["hy_field21"].ToString();
            Hyoa_flowmain.hy_field22 = dt.Rows[0]["hy_field22"].ToString();
            Hyoa_flowmain.hy_field23 = dt.Rows[0]["hy_field23"].ToString();
            Hyoa_flowmain.hy_field24 = dt.Rows[0]["hy_field24"].ToString();
            Hyoa_flowmain.hy_field25 = dt.Rows[0]["hy_field25"].ToString();
            Hyoa_flowmain.hy_field26 = dt.Rows[0]["hy_field26"].ToString();
            Hyoa_flowmain.hy_field27 = dt.Rows[0]["hy_field27"].ToString();
            Hyoa_flowmain.hy_field28 = dt.Rows[0]["hy_field28"].ToString();
            Hyoa_flowmain.hy_field29 = dt.Rows[0]["hy_field29"].ToString();
            Hyoa_flowmain.hy_field30 = dt.Rows[0]["hy_field30"].ToString();
            Hyoa_flowmain.hy_field31 = System.DateTime.Now.ToString("yyyy-MM-dd");
            Hyoa_flowmain.hy_field32 = dt.Rows[0]["hy_field32"].ToString();
            Hyoa_flowmain.hy_field33 = dt.Rows[0]["hy_field33"].ToString();
            Hyoa_flowmain.hy_field34 = dt.Rows[0]["hy_field34"].ToString();
            Hyoa_flowmain.hy_field35 = dt.Rows[0]["hy_field35"].ToString();

            Hyoa_flowmain.hy_field36 = float.Parse(dt.Rows[0]["hy_field36"].ToString());
            Hyoa_flowmain.hy_field37 = float.Parse(dt.Rows[0]["hy_field37"].ToString());
            Hyoa_flowmain.hy_field38 = float.Parse(dt.Rows[0]["hy_field38"].ToString());
            Hyoa_flowmain.hy_field39 = float.Parse(dt.Rows[0]["hy_field39"].ToString());
            Hyoa_flowmain.hy_field40 = float.Parse(dt.Rows[0]["hy_field40"].ToString());

            Hyoa_flowmain.hy_field41 = dt.Rows[0]["hy_field41"].ToString();
            Hyoa_flowmain.hy_field42 = dt.Rows[0]["hy_field42"].ToString();
            Hyoa_flowmain.hy_field43 = dt.Rows[0]["hy_field43"].ToString();
            Hyoa_flowmain.hy_field44 = dt.Rows[0]["hy_field44"].ToString();
            Hyoa_flowmain.hy_field45 = dt.Rows[0]["hy_field45"].ToString();
            Hyoa_flowmain.hy_field46 = dt.Rows[0]["hy_field46"].ToString();
            Hyoa_flowmain.hy_field47 = dt.Rows[0]["hy_field47"].ToString();
            Hyoa_flowmain.hy_field48 = dt.Rows[0]["hy_field48"].ToString();
            Hyoa_flowmain.hy_field49 = dt.Rows[0]["hy_field49"].ToString();
            Hyoa_flowmain.hy_field50 = dt.Rows[0]["hy_field50"].ToString();
            Hyoa_flowmain.hy_field51 = dt.Rows[0]["hy_field51"].ToString();
            Hyoa_flowmain.hy_field52 = dt.Rows[0]["hy_field52"].ToString();
            Hyoa_flowmain.hy_field53 = dt.Rows[0]["hy_field53"].ToString();
            Hyoa_flowmain.hy_field54 = dt.Rows[0]["hy_field54"].ToString();
            Hyoa_flowmain.hy_field55 = dt.Rows[0]["hy_field55"].ToString();
            Hyoa_flowmain.hy_field56 = dt.Rows[0]["hy_field56"].ToString();
            Hyoa_flowmain.hy_field57 = dt.Rows[0]["hy_field57"].ToString();
            Hyoa_flowmain.hy_field58 = dt.Rows[0]["hy_field58"].ToString();
            Hyoa_flowmain.hy_field59 = dt.Rows[0]["hy_field59"].ToString();
            Hyoa_flowmain.hy_field60 = dt.Rows[0]["hy_field60"].ToString();

            Hyoa_flowmain.hy_field61 = dt.Rows[0]["hy_field61"].ToString();
            Hyoa_flowmain.hy_field62 = dt.Rows[0]["hy_field62"].ToString();
            Hyoa_flowmain.hy_field63 = dt.Rows[0]["hy_field63"].ToString();
            Hyoa_flowmain.hy_field64 = dt.Rows[0]["hy_field64"].ToString();
            Hyoa_flowmain.hy_field65 = dt.Rows[0]["hy_field65"].ToString();
            Hyoa_flowmain.hy_field66 = dt.Rows[0]["hy_field66"].ToString();
            Hyoa_flowmain.hy_field67 = dt.Rows[0]["hy_field67"].ToString();
            Hyoa_flowmain.hy_field68 = dt.Rows[0]["hy_field68"].ToString();
            Hyoa_flowmain.hy_field69 = dt.Rows[0]["hy_field69"].ToString();
            Hyoa_flowmain.hy_field70 = dt.Rows[0]["hy_field70"].ToString();

            Hyoa_flowmain.hy_field71 = float.Parse(dt.Rows[0]["hy_field71"].ToString());
            Hyoa_flowmain.hy_field72 = float.Parse(dt.Rows[0]["hy_field72"].ToString());
            Hyoa_flowmain.hy_field73 = float.Parse(dt.Rows[0]["hy_field73"].ToString());
            Hyoa_flowmain.hy_field74 = float.Parse(dt.Rows[0]["hy_field74"].ToString());
            Hyoa_flowmain.hy_field75 = float.Parse(dt.Rows[0]["hy_field75"].ToString());
            Hyoa_flowmain.hy_field76 = float.Parse(dt.Rows[0]["hy_field76"].ToString());
            Hyoa_flowmain.hy_field77 = float.Parse(dt.Rows[0]["hy_field77"].ToString());
            Hyoa_flowmain.hy_field78 = float.Parse(dt.Rows[0]["hy_field78"].ToString());
            Hyoa_flowmain.hy_field79 = float.Parse(dt.Rows[0]["hy_field79"].ToString());
            Hyoa_flowmain.hy_field80 = float.Parse(dt.Rows[0]["hy_field80"].ToString());
            Hyoa_flowmain.hy_field81 = float.Parse(dt.Rows[0]["hy_field81"].ToString());
            Hyoa_flowmain.hy_field82 = float.Parse(dt.Rows[0]["hy_field82"].ToString());
            Hyoa_flowmain.hy_field83 = float.Parse(dt.Rows[0]["hy_field83"].ToString());
            Hyoa_flowmain.hy_field84 = float.Parse(dt.Rows[0]["hy_field84"].ToString());
            Hyoa_flowmain.hy_field85 = float.Parse(dt.Rows[0]["hy_field85"].ToString());
            Hyoa_flowmain.hy_field86 = float.Parse(dt.Rows[0]["hy_field86"].ToString());
            Hyoa_flowmain.hy_field87 = float.Parse(dt.Rows[0]["hy_field87"].ToString());
            Hyoa_flowmain.hy_field88 = float.Parse(dt.Rows[0]["hy_field88"].ToString());
            Hyoa_flowmain.hy_field89 = float.Parse(dt.Rows[0]["hy_field89"].ToString());
            Hyoa_flowmain.hy_field90 = float.Parse(dt.Rows[0]["hy_field90"].ToString());
            Hyoa_flowmain.hy_field91 = float.Parse(dt.Rows[0]["hy_field91"].ToString());
            Hyoa_flowmain.hy_field92 = float.Parse(dt.Rows[0]["hy_field92"].ToString());
            Hyoa_flowmain.hy_field93 = float.Parse(dt.Rows[0]["hy_field93"].ToString());
            Hyoa_flowmain.hy_field94 = float.Parse(dt.Rows[0]["hy_field94"].ToString());
            Hyoa_flowmain.hy_field95 = float.Parse(dt.Rows[0]["hy_field95"].ToString());
            Hyoa_flowmain.hy_field96 = float.Parse(dt.Rows[0]["hy_field96"].ToString());
            Hyoa_flowmain.hy_field97 = float.Parse(dt.Rows[0]["hy_field97"].ToString());
            Hyoa_flowmain.hy_field98 = float.Parse(dt.Rows[0]["hy_field98"].ToString());
            Hyoa_flowmain.hy_field99 = float.Parse(dt.Rows[0]["hy_field99"].ToString());
            //Hyoa_flowmain.hy_field100 = float.Parse(dt.Rows[0]["hy_field100"].ToString());
            //特殊,标志为1表示是复制的数据
            Hyoa_flowmain.hy_field100 = 1;

            Hyoa_flowmain.hy_iftx = dt.Rows[0]["hy_iftx"].ToString();
            Hyoa_flowmain.hy_zhtxsj = dt.Rows[0]["hy_zhtxsj"].ToString();
            Hyoa_flowmain.hy_readuserlist = dt.Rows[0]["hy_readuserlist"].ToString();

            Hyoa_flowmain.hy_content6 = dt.Rows[0]["hy_content6"].ToString();
            Hyoa_flowmain.hy_content7 = dt.Rows[0]["hy_content7"].ToString();
            Hyoa_flowmain.hy_content8 = dt.Rows[0]["hy_content8"].ToString();
            Hyoa_flowmain.hy_content9 = dt.Rows[0]["hy_content9"].ToString();
            Hyoa_flowmain.hy_content10 = dt.Rows[0]["hy_content10"].ToString();
            Hyoa_flowmain.hy_content11 = dt.Rows[0]["hy_content11"].ToString();
            Hyoa_flowmain.hy_content12 = dt.Rows[0]["hy_content12"].ToString();
            Hyoa_flowmain.hy_content13 = dt.Rows[0]["hy_content13"].ToString();
            Hyoa_flowmain.hy_content14 = dt.Rows[0]["hy_content14"].ToString();
            Hyoa_flowmain.hy_content15 = dt.Rows[0]["hy_content15"].ToString();

            Hyoa_flowmain.Insert();
        }
        //for (var i = 0; i < v_uids.Length; i++)
        //{
        //    if (v_uids[i] != "")
        //    {

        //    }
        //}
        this.txtuids.Value = "";
        //DataPlay(System.Int32.Parse(this.curpage.Text));
        string ls_url = "main.aspx?op=modify&mid=" + txtmudelid.Value + "&tableid=" + txttableid.Value + "&docid=" + ls_doc;
        Response.Write("<script>window.location = '" + ls_url + "';</script>");
    }