예제 #1
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        string ls_tip = "保存成功!";
        try
        {
            string[] lv_jsrsysname, lv_jsrcnname;//接收人系统名、中文名

            lv_jsrsysname = this.f_ReceivesysNameList.Value.ToString().Split('+');
            lv_jsrcnname = this.f_ReceiveChNameList.Value.ToString().Split('+');
            HyoaClass.Hyoa_sms Hyoa_sms = new HyoaClass.Hyoa_sms();
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            DataTable dt;
            for (int i = 0; i < lv_jsrsysname.Length; i++)
            {
                Hyoa_sms.ID = Hyoa_global.GetRandom();
                Hyoa_sms.DOCID = Hyoa_global.GetRandom();
                Hyoa_sms.hy_fsrid = this.txtdjrid.Value;
                Hyoa_sms.hy_fsrname = this.f_SendChName.Text;
                Hyoa_sms.hy_fsrsjh = this.f_SendMobileNo.Text;
                Hyoa_sms.hy_jsrid = lv_jsrsysname[i];
                Hyoa_sms.hy_jsrname = lv_jsrcnname[i];
                dt = Hyoa_user.Getuserallinfobyloginid(lv_jsrsysname[i]);
                if (dt.Rows.Count > 0)
                {
                    Hyoa_sms.hy_jsrsjh = dt.Rows[0]["hy_mobile"].ToString();
                }
                else
                {
                    Hyoa_sms.hy_jsrsjh = lv_jsrsysname[i];
                }
                Hyoa_sms.hy_createtime = System.DateTime.Now.ToString();
                Hyoa_sms.hy_from = "";
                Hyoa_sms.hy_content = this.f_smsContents.Text;
                Hyoa_sms.hy_isnowsend = 1;
                Hyoa_sms.hy_takedate = "";
                Hyoa_sms.hy_taketime = "";
                Hyoa_sms.hy_state = 0;
                Hyoa_sms.hy_tableid = "Mudelsms";
                Hyoa_sms.Insert();
            }
        }
        catch
        {

        }
        finally
        {
            //处理完成后的提示及跳转
            if (this.txtifpop.Value == "")
            {
                Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
            }
            else
            {
                Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
            }
        }
    }
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_roleuser Hyoa_roleuser = new HyoaClass.Hyoa_roleuser();
        ////---增加模块权限-------
        if (this.fdAddRoleid.Value != "")
        {
            string[] v_AddRoleid = this.fdAddRoleid.Value.Split(',');
            for (var i = 0; i < v_AddRoleid.Length; i++)
            {
                Hyoa_roleuser.ID = Hyoa_global.GetRandom();
                Hyoa_roleuser.hy_roleid = v_AddRoleid[i].ToString();
                Hyoa_roleuser.hy_userid = this.txtuserid.Value;
                Hyoa_roleuser.Insert();
            }
        }
        ////---删除模块权限-------
        if (this.fdDelRoleid.Value != "")
        {
            string[] v_DelRoleid = this.fdDelRoleid.Value.Split(',');
            for (var i = 0; i < v_DelRoleid.Length; i++)
            {
                Hyoa_roleuser.Deletebyroleidanduserid(v_DelRoleid[i].ToString(), this.txtuserid.Value);
            }
        }
        HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
        ////---增加流程权限-------
        if (this.fdAddFlowTacheid.Value != "")
        {
            string[] v_AddFlowTacheid = this.fdAddFlowTacheid.Value.Split(',');
            for (var i = 0; i < v_AddFlowTacheid.Length; i++)
            {
                Hyoa_flowtacheuser.ID = Hyoa_global.GetRandom();
                Hyoa_flowtacheuser.hy_flowid = v_AddFlowTacheid[i].ToString().Substring(0,v_AddFlowTacheid[i].ToString().IndexOf('^'));
                Hyoa_flowtacheuser.hy_tacheid = v_AddFlowTacheid[i].ToString().Substring(v_AddFlowTacheid[i].ToString().IndexOf('^')+1, (v_AddFlowTacheid[i].ToString().Length - v_AddFlowTacheid[i].ToString().IndexOf('^')-1));
                Hyoa_flowtacheuser.hy_userid = this.txtuserid.Value;
                Hyoa_flowtacheuser.Insert();
            }
        }
        //---删除流程权限-------
        if (this.fdDelFlowTacheid.Value != "")
        {
            string[] v_DelFlowTacheid = this.fdDelFlowTacheid.Value.Split(',');
            string ls_flowid;
            string ls_tacheid;
            for (var i = 0; i < v_DelFlowTacheid.Length; i++)
            {
                ls_flowid = v_DelFlowTacheid[i].ToString().Substring(0, v_DelFlowTacheid[i].ToString().IndexOf('^'));
                ls_tacheid = v_DelFlowTacheid[i].ToString().Substring(v_DelFlowTacheid[i].ToString().IndexOf('^') + 1, (v_DelFlowTacheid[i].ToString().Length - v_DelFlowTacheid[i].ToString().IndexOf('^') - 1));
                Hyoa_flowtacheuser.Deletebyroleidtacheiduserid(ls_flowid, ls_tacheid, this.txtuserid.Value);
            }
        }

        Response.Write("<script>alert('保存成功!');self.close();</script>");
    }
예제 #3
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "保存成功!";
        string ls_attsize = "";
        string str_path = "";
        string lspath = "";
        string lsguid = "";
        string lsurl = "";
        string lsfilename = "";
        string lshy_fatherfield = "";

        lsfilename = FileUpload1.FileName;
        HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (lsfilename != "")  //attsize
        {
            lshy_fatherfield = "";
            ls_attsize = System.Convert.ToString(System.Convert.ToDouble(System.Convert.ToInt32(System.Convert.ToDouble(FileUpload1.PostedFile.ContentLength.ToString()) / 1024 / 1024 * 1000)) / 1000);//附件的大小
            lsguid = Hyoa_global.GetRandom();
            System.Console.WriteLine(lsguid);
            //SaveCommon(ls_path, ls_attsize, lsguid);
            //将附件上传到服务器目录下
            lspath = Server.MapPath("~/");//虚拟目录的位置
            lsurl = "fileatt\\" + lsguid; //存放的文件夹

            Directory.CreateDirectory(lspath + "\\" + lsurl);
            str_path = lspath + "\\" + lsurl + "\\" + lsfilename;
            FileUpload1.SaveAs(str_path);
            Hyoa_fileatt.ID = lsguid;
            Hyoa_fileatt.hy_fatherid = this.txtfatherid.Value;
            if (this.txtfilename.Text == "")
            {
                Hyoa_fileatt.hy_filename = lsfilename;
            }
            else
            {
                Hyoa_fileatt.hy_filename = this.txtfilename.Text;
            }
            Hyoa_fileatt.hy_filepath = lsurl + "\\" + lsfilename;
            Hyoa_fileatt.hy_filesize = ls_attsize;
            Hyoa_fileatt.hy_userid = this.Session["hyuid"].ToString();
            Hyoa_fileatt.hy_djsj = System.DateTime.Now.ToString();
            if (this.Request.QueryString["fatherfield"] != null)
            {
                lshy_fatherfield = this.Request.QueryString["fatherfield"].ToString();   ////父文档配置的域名
            }
            Hyoa_fileatt.hy_fatherfield = lshy_fatherfield;
            Hyoa_fileatt.Insert();

        }
        else
        {
            this.Response.Write("<script>alert('请选择要上传的文件!');</script>");
        }

        Response.Write("<script>alert('" + ls_tip + "');var lsurl = window.location.href;window.location = lsurl;window.opener.document.getElementById('btn_sxfj').onclick(); </script>");
    }
예제 #4
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_publicidea Hyoa_publicidea = new HyoaClass.Hyoa_publicidea();
        if (this.txtop.Value == "add")
        {
            Hyoa_publicidea.ID = Hyoa_global.GetRandom();
            Hyoa_publicidea.hy_idea = this.txtname.Value;
            Hyoa_publicidea.hy_sort = System.Int32.Parse(this.txtsort.Value);
            Hyoa_publicidea.Insert();
        }
        else
        {
            Hyoa_publicidea.ID = this.txtdocid.Value;
            Hyoa_publicidea.hy_idea = this.txtname.Value;
            Hyoa_publicidea.hy_sort = System.Int32.Parse(this.txtsort.Value);
            Hyoa_publicidea.Update();
        }

        //处理完成后的提示及跳转
        if (this.txtifpop.Value == "")
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
        }
        else
        {
            Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
        }
    }
예제 #5
0
    ////保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "发表文章成功!";

        HyoaClass.Hyoa_boke_main Hyoa_boke_main = new HyoaClass.Hyoa_boke_main();
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        Hyoa_boke_main.DOCID = Hyoa_global.GetRandom();
        Hyoa_boke_main.hy_djrid = this.Session["hyuid"].ToString();
        Hyoa_boke_main.hy_djrname = this.Session["hyuname"].ToString();
        Hyoa_boke_main.hy_djsj = System.DateTime.Now.ToString();
        Hyoa_boke_main.hy_bt = this.txtbt.Text;
        Hyoa_boke_main.hy_content = this.Content.Value;
        Hyoa_boke_main.hy_visits = 0;

        if (Hyoa_boke_main.Insert() == true)
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
        }
        else
        {
            this.Response.Write("<script>alert('发表文章失败,请联系管理员!')</script>");
        }
    }
예제 #6
0
    ////保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "评论成功!";

        HyoaClass.Hyoa_boke_reback Hyoa_boke_reback = new HyoaClass.Hyoa_boke_reback();
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        Hyoa_boke_reback.DOCID = Hyoa_global.GetRandom();
        Hyoa_boke_reback.hy_fatherid = this.txtfatherid.Value;
        Hyoa_boke_reback.hy_content = this.Content.Value;
        Hyoa_boke_reback.hy_djsj = System.DateTime.Now.ToString();
        Hyoa_boke_reback.hy_djrid = this.Session["hyuid"].ToString();
        Hyoa_boke_reback.hy_djrname = this.Session["hyuname"].ToString();
        string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (userip == null || userip == "")
        {
            userip = Request.ServerVariables["REMOTE_ADDR"];  //得到客户端IP
        }
        Hyoa_boke_reback.hy_ip = userip;
        if (Hyoa_boke_reback.Insert() == true)
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
        }
        else
        {
            this.Response.Write("<script>alert('发表评论失败,请联系管理员!')</script>");
        }
    }
예제 #7
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "设置成功,系统将自动转至首页!";

        //新文档时
        HyoaClass.Hyoa_mystyle Hyoa_mystyle = new HyoaClass.Hyoa_mystyle();
        if (this.txtdocid.Value == "")
        {
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            Hyoa_mystyle.ID = Hyoa_global.GetRandom();
            Hyoa_mystyle.hy_userid = this.txtuserid.Text;
            Hyoa_mystyle.hy_style = this.ddlhy_style.SelectedValue.ToString();
            Hyoa_mystyle.Insert();
        }
        else
        {
            Hyoa_mystyle.ID = this.txtdocid.Value;
            Hyoa_mystyle.hy_userid = this.txtuserid.Text;
            Hyoa_mystyle.hy_style = this.ddlhy_style.SelectedValue.ToString();
            Hyoa_mystyle.Update();
        }

        Session["mystyle"] = ddlhy_style.SelectedValue.ToString();
        Response.Write("<script>alert('" + ls_tip + "');window.top.location='/'</script>");
    }
예제 #8
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "提交成功!";

        string ls_insert = "";
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();

        ls_insert = "insert into hyp_gzlxdhf (id,hy_jsrdocid,hy_fsrdocid,hy_userid,hy_username,hy_deptid,hy_deptname,hy_time,hy_body,hy_ip,hy_ifshow)";
        ls_insert += " values ('" + Hyoa_global.GetRandom() + "','" + this.txtid.Value + "','" + this.txtdocid.Value + "','" + this.Session["hyuid"].ToString() + "'";
        ls_insert += ",'" + this.Session["hyuname"].ToString() + "','" + this.Session["hydeptid"].ToString() + "','" + this.Session["hydeptname"].ToString() + "'";
        ls_insert += ",'" + System.DateTime.Now.ToString() + "','" + this.txthfnr.Text + "','" + HttpContext.Current.Request.UserHostAddress + "','')";

        Hyoa_global.ExcuteSQL(ls_insert);

        //收件中置为已回复
        string ls_update;
        ls_update = "update hyp_wjcd set hy_ifyhf='1' where ID='" + this.txtid.Value + "' ";
        Hyoa_global.ExcuteSQL(ls_update);

        //处理完成后的提示及跳转
        Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
    }
예제 #9
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("/login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        string lscolunid = "", sql = "";
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.DAO db = new HyoaClass.DAO();

        if (this.txtselcolid.Value =="")
        {
            Response.Write("<script>alert('请选择查询的字段!');window.location.href = window.location.href;</script>");
            return;
        }

        if (this.txtop.Value == "add")
        {
            //判断是否重复
            string sql1 = "select * from hyt_searchconfig where hy_mudelid='" + this.ddlmudelid.SelectedValue + "' and hy_tableid='" + this.ddltableid.SelectedValue + "'";
            DataTable dt = db.GetDataTable(sql1);
            if (dt.Rows.Count > 0)
            {
                Response.Write("<script>alert('该模块已添加,请修改!');window.location.href = window.location.href;</script>");
                return;
            }

            lscolunid = Hyoa_global.GetRandom();
            sql = "insert into hyt_searchconfig (ID,hy_mudelid,hy_tableid,hy_sort,hy_columnshowid,hy_columnshow,hy_ifsearch,hy_xszdid,hy_xszd,hy_kckry,hy_kckryid) values (";
            sql += "'" + lscolunid + "','" + this.ddlmudelid.SelectedValue + "','" + this.ddltableid.SelectedValue + "'," + float.Parse(this.txtsort.Text) + "";
            sql += ",'" + this.txtselcolid.Value + "','" + this.txtselcol.Value + "','" + this.ddlifsearch.SelectedValue + "'";
            sql += ",'" + this.txtselsearchid.Value + "','" + this.txtselsearch.Value + "','" + this.hy_field41_1.Value + "','" + this.hy_field43_1.Value + "')";
            db.Execute(sql);
        }
        else
        {
            sql = "update hyt_searchconfig  set hy_mudelid='" + this.ddlmudelid.SelectedValue + "', hy_tableid='" + this.ddltableid.SelectedValue + "',";
            sql += "hy_sort=" + float.Parse(this.txtsort.Text) + ",hy_columnshowid='" + this.txtselcolid.Value + "',hy_columnshow='" + this.txtselcol.Value + "',";
            sql += " hy_ifsearch='" + this.ddlifsearch.SelectedValue + "',hy_xszdid='" + this.txtselsearchid.Value + "',hy_xszd='" + this.txtselsearch.Value + "', ";
            sql += " hy_kckry='" + this.hy_field41_1.Value + "',hy_kckryid='" + this.hy_field43_1.Value + "' where ID='" + this.txtdocid.Value + "'";
            db.Execute(sql);
        }
        db.Close();
        //处理完成后的提示及跳转
        if (this.txtifpop.Value == "")
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
        }
        else
        {
            Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
        }
    }
예제 #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            if (this.Request.QueryString["pop"] != null)
            {
                this.txtifpop.Value = this.Request.QueryString["pop"].ToString();   //是否弹出窗口
            }
            //esppath = Server.MapPath("esp");
            //if (this.Session["hyuid"].ToString() == "")
            //    this.Response.Redirect("../login.aspx");
            if (Request.QueryString["url"] != null)
            {
                this.url.Value = Request.QueryString["url"].ToString();
            }
            if (Request.QueryString["espid"] != null)
            {
                this.txtdocid.Value = Request.QueryString["espid"].ToString();
            }
            //按钮控制
            this.tdCreateNew.Visible = false;
            this.tdSave.Visible = false;

            //判断当前用户是否有新建删除权限
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            string ls_mudelid = "Mudelfwgl";
            string ls_role = "";
            HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
            DataTable dt_mudel = Hyoa_mudel.Getmudel(ls_mudelid);
            if (dt_mudel.Rows.Count > 0)
            {
                ls_role = dt_mudel.Rows[0]["hy_roleid"].ToString();
            }
            if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
            {
                if (Request.QueryString["op"] != null)
                {
                    string ls_op = Request.QueryString["op"].ToString();
                    txtop.Value = ls_op;
                    if (ls_op == "add")
                    {
                        this.tdCreateNew.Visible = true;
                        this.tdSave.Visible = true;
                        this.txtdocid.Value = Hyoa_global.GetRandom();
                    }
                }
            }

        }
    }
예제 #11
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("/login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_iplimit Hyoa_iplimit = new HyoaClass.Hyoa_iplimit();
        if (this.txtop.Value == "add")
        {
            //先判断这个模块编号是否已经存在
            DataTable dt = Hyoa_iplimit.Getiplimitsbymudelid(this.ddlmudelid.SelectedValue);
            if (dt.Rows.Count > 0)
            {
                Response.Write("<script>alert('该模块的IP限制已存在,请重新填写!');history.back();</script>");
                return;
            }
            else
            {
                Hyoa_iplimit.ID = Hyoa_global.GetRandom();
                Hyoa_iplimit.hy_mudelid = this.ddlmudelid.SelectedValue;
                Hyoa_iplimit.hy_iplists = this.txtiplists.Value;
                Hyoa_iplimit.hy_createtime = System.DateTime.Now.ToString();
                Hyoa_iplimit.hy_isenabled = this.ddlisenabled.SelectedValue;
                Hyoa_iplimit.Insert();
            }
        }
        else
        {
            Hyoa_iplimit.ID = this.txtdocid.Value;
            Hyoa_iplimit.hy_mudelid = this.ddlmudelid.SelectedValue;
            Hyoa_iplimit.hy_iplists = this.txtiplists.Value;
            Hyoa_iplimit.hy_createtime = System.DateTime.Now.ToString();
            Hyoa_iplimit.hy_isenabled = this.ddlisenabled.SelectedValue;
            Hyoa_iplimit.Update();
        }

        //处理完成后的提示及跳转
        if (this.txtifpop.Value == "")
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
        }
        else
        {
            Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
        }
    }
예제 #12
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "上传成功!";
        string ls_attsize = "";
        string str_path = "";
        string lspath = "";
        string lsguid = "";
        string lsurl = "";
        string lsfilename = "";
        string lshy_fatherfield = "";

        lsfilename = FileUpload1.FileName;
        HyoaClass.Hyoa_boke_headpic Hyoa_boke_headpic = new HyoaClass.Hyoa_boke_headpic();
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (lsfilename != "")  //attsize
        {
            //先删除再插入
            Hyoa_boke_headpic.Delete(this.Session["hyuid"].ToString());  //删除

            //插入
            lshy_fatherfield = "";
            ls_attsize = System.Convert.ToString(System.Convert.ToDouble(System.Convert.ToInt32(System.Convert.ToDouble(FileUpload1.PostedFile.ContentLength.ToString()) / 1024 / 1024 * 1000)) / 1000);//附件的大小
            lsguid = Hyoa_global.GetRandom();
            System.Console.WriteLine(lsguid);
            //SaveCommon(ls_path, ls_attsize, lsguid);
            //将附件上传到服务器目录下
            lspath = Server.MapPath("~/");//虚拟目录的位置
            lsurl = "fileatt\\" + lsguid; //存放的文件夹

            Directory.CreateDirectory(lspath + "\\" + lsurl);
            str_path = lspath + "\\" + lsurl + "\\" + lsfilename;
            FileUpload1.SaveAs(str_path);
            Hyoa_boke_headpic.DOCID = lsguid;
            Hyoa_boke_headpic.hy_picpath = lsurl + "\\" + lsfilename;
            Hyoa_boke_headpic.hy_userid = this.Session["hyuid"].ToString();
            Hyoa_boke_headpic.Insert();

        }
        else
        {
            this.Response.Write("<script>alert('请选择要上传的头像!');</script>");
        }

        Response.Write("<script>alert('" + ls_tip + "');window.close(); </script>");
    }
예제 #13
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("/login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_license Hyoa_license = new HyoaClass.Hyoa_license();
        if (this.txtop.Value == "add")
        {
            Hyoa_license.ID = Hyoa_global.GetRandom();
            Hyoa_license.hy_sqrid = this.txthy_sqrid.Value;
            Hyoa_license.hy_sqrname = this.txthy_sqrname.Text;

            Hyoa_license.hy_starttime = this.txthy_starttime.Value;
            Hyoa_license.hy_endtime = this.txthy_endtime.Value;
            Hyoa_license.hy_bsqrid = this.txthy_bsqrid.Value;
            Hyoa_license.hy_bsqrname = this.txthy_bsqrname.Value;
            Hyoa_license.hy_isenabled = this.ddlisenabled.SelectedValue;
            Hyoa_license.hy_createtime = System.DateTime.Now.ToString();
            Hyoa_license.Insert();
        }
        else
        {
            Hyoa_license.ID = this.txtdocid.Value;
            Hyoa_license.hy_isenabled = this.ddlisenabled.SelectedValue;

            Hyoa_license.Update();
        }

        //处理完成后的提示及跳转
        if (this.txtifpop.Value == "")
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
        }
        else
        {
            Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
        }
    }
예제 #14
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("/login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_post Hyoa_post = new HyoaClass.Hyoa_post();
        if (this.txtop.Value == "add")
        {

            Hyoa_post.ID = Hyoa_global.GetRandom();
            Hyoa_post.hy_userid = this.Session["hyuid"].ToString();
            Hyoa_post.userid = this.txtuserid.Value;
            Hyoa_post.pwd = Hyoa_post.Encrypt(this.txtpwd.Value);
            Hyoa_post.hy_type = this.ddltypename.SelectedValue;
            Hyoa_post.Insert();

        }
        else
        {
            Hyoa_post.ID = this.txtdocid.Value;
            Hyoa_post.hy_userid = this.Session["hyuid"].ToString();
            Hyoa_post.userid = this.txtuserid.Value;
            Hyoa_post.pwd = Hyoa_post.Encrypt(this.txtpwd.Value);
            Hyoa_post.hy_type = this.ddltypename.SelectedValue;
            Hyoa_post.Update();
        }

        //处理完成后的提示及跳转
        if (this.txtifpop.Value == "")
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
        }
        else
        {
            Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
        }
    }
예제 #15
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_site Hyoa_site = new HyoaClass.Hyoa_site();
        if (this.txtop.Value == "add")
        {
            Hyoa_site.id = Hyoa_global.GetRandom();
            Hyoa_site.hy_version = this.txtversion.Value;
            Hyoa_site.hy_copyright = this.txtcopyright.Value;
            Hyoa_site.hy_copyrightinfo = this.Content.Value;
            Hyoa_site.hy_indexpath = this.ddlhy_indexpath.SelectedValue;
            Hyoa_site.hy_imagepath = "";
            Hyoa_site.Insert();
        }
        else
        {
            Hyoa_site.id = this.txtdocid.Value;
            Hyoa_site.hy_version = this.txtversion.Value;
            Hyoa_site.hy_copyright = this.txtcopyright.Value;
            Hyoa_site.hy_copyrightinfo = this.Content.Value;
            Hyoa_site.hy_indexpath = this.ddlhy_indexpath.SelectedValue;
            Hyoa_site.hy_imagepath = "";
            Hyoa_site.Update();
        }

        //处理完成后的提示及跳转
        if (this.txtifpop.Value == "")
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
        }
        else
        {
            Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
        }
    }
예제 #16
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        //先删除当前权限ID下边所有的用户
        HyoaClass.Hyoa_groupuser Hyoa_groupuser = new HyoaClass.Hyoa_groupuser();
        Hyoa_groupuser.DeleteAllbygroupid(this.txtgroupid.Value);

        //添加选中的用户
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        string[] v_uids = this.txtuserids.Value.Split('+');

        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                Hyoa_groupuser.ID = Hyoa_global.GetRandom();
                Hyoa_groupuser.hy_groupid = this.txtgroupid.Value;
                Hyoa_groupuser.hy_userid = v_uids[i];
                Hyoa_groupuser.Insert();
            }
        }
        Response.Write("<script>alert('保存成功!');self.close();</script>");
    }
예제 #17
0
    protected void btnImport_Click(object sender, EventArgs e)
    {
        String sql;
        sql = "";

        if (this.lblDisplay.Text == "")
        {
            this.lblReturnInformation.Text = "请先保存Excel文件!";
        }
        else
        {

            sql = "";
            sql = " select  姓名,日期,签到时间,签退时间,是否旷工,例外情况,部门  from OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source=''" + this.lblDisplay.Text + "'';User ID=admin;Password=;Extended properties=Excel 5.0')...Sheet1$ ";

            HyoaClass.DAO db = new HyoaClass.DAO();
            HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();

            DataTable dt = db.GetDataTable(sql);
            
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            DataTable dtuser;

            for (int j = 0; j < dt.Rows.Count; j++)
            {
                HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
                //文档ID
                Hyoa_flowmain.DOCID = Hyoa_global.GetRandom();
                Hyoa_flowmain.hy_mudelid = "kqgl";
                Hyoa_flowmain.hy_tableid = "74e7e280-4fc5-4ccb-be3d-0f995ac2c934";
                Hyoa_flowmain.hy_flowid = "";
                Hyoa_flowmain.hy_flowname = "";
                Hyoa_flowmain.hy_curtacheid = "";
                Hyoa_flowmain.hy_curtachename = "";
                Hyoa_flowmain.hy_curclrid = "";
                Hyoa_flowmain.hy_curclrname = "";

                dtuser = Hyoa_user.GetusersbynameforCX(dt.Rows[j]["姓名"].ToString());
                if (dtuser.Rows.Count > 0)
                {
                    Hyoa_flowmain.hy_djrid = dtuser.Rows[0]["hy_userid"].ToString();
                    Hyoa_flowmain.hy_djrbmid = dtuser.Rows[0]["hy_deptid"].ToString();
                }
                else
                {
                    Hyoa_flowmain.hy_djrid = "";
                    Hyoa_flowmain.hy_djrbmid = "";
                }
                Hyoa_flowmain.hy_djrname = dt.Rows[j]["姓名"].ToString();                
                Hyoa_flowmain.hy_djrbmname = dt.Rows[j]["部门"].ToString();
                Hyoa_flowmain.hy_djsj = System.DateTime.Now.ToString();

                Hyoa_flowmain.hy_bt = "";
                Hyoa_flowmain.hy_content1 = "";
                Hyoa_flowmain.hy_content2 = "";
                Hyoa_flowmain.hy_content3 = "";
                Hyoa_flowmain.hy_content4 = "";
                Hyoa_flowmain.hy_content5 = "";
                Hyoa_flowmain.hy_content6 = "";
                Hyoa_flowmain.hy_content7 = "";
                Hyoa_flowmain.hy_content8 = "";
                Hyoa_flowmain.hy_content9 = "";
                Hyoa_flowmain.hy_content10 = "";
                Hyoa_flowmain.hy_content11 = "";
                Hyoa_flowmain.hy_content12 = "";
                Hyoa_flowmain.hy_content13 = "";
                Hyoa_flowmain.hy_content14 = "";
                Hyoa_flowmain.hy_content15 = "";

                Hyoa_flowmain.hy_field1 = dt.Rows[j]["签到时间"].ToString();
                Hyoa_flowmain.hy_field2 = dt.Rows[j]["签退时间"].ToString();
                if (dt.Rows[j]["是否旷工"].ToString() == "True")
                {
                    Hyoa_flowmain.hy_field3 = "是";
                }
                else
                {
                    Hyoa_flowmain.hy_field3 = "";
                }

                Hyoa_flowmain.hy_field4 = dt.Rows[j]["例外情况"].ToString();
                Hyoa_flowmain.hy_field5 = "";
                Hyoa_flowmain.hy_field6 = "";
                Hyoa_flowmain.hy_field7 = "";
                Hyoa_flowmain.hy_field8 = "";
                Hyoa_flowmain.hy_field9 = "";
                Hyoa_flowmain.hy_field10 = "";
                Hyoa_flowmain.hy_field11 = "";
                Hyoa_flowmain.hy_field12 = "";
                Hyoa_flowmain.hy_field13 = "";
                Hyoa_flowmain.hy_field14 = "";
                Hyoa_flowmain.hy_field15 = "";
                Hyoa_flowmain.hy_field16 = "";
                Hyoa_flowmain.hy_field17 = "";
                Hyoa_flowmain.hy_field18 = "";
                Hyoa_flowmain.hy_field19 = "";
                Hyoa_flowmain.hy_field20 = "";
                Hyoa_flowmain.hy_field21 = "";
                Hyoa_flowmain.hy_field22 = "";
                Hyoa_flowmain.hy_field23 = "";
                Hyoa_flowmain.hy_field24 = "";
                Hyoa_flowmain.hy_field25 = "";
                Hyoa_flowmain.hy_field26 = "";
                Hyoa_flowmain.hy_field27 = "";
                Hyoa_flowmain.hy_field28 = "";
                Hyoa_flowmain.hy_field29 = "";
                Hyoa_flowmain.hy_field30 = "";
                Hyoa_flowmain.hy_field31 = dt.Rows[j]["日期"].ToString(); ;
                Hyoa_flowmain.hy_field32 = "";
                Hyoa_flowmain.hy_field33 = "";
                Hyoa_flowmain.hy_field34 = "";
                Hyoa_flowmain.hy_field35 = "";
                Hyoa_flowmain.hy_field36 = 0;  
                Hyoa_flowmain.hy_field37 = 0;
                Hyoa_flowmain.hy_field38 = 0;
                Hyoa_flowmain.hy_field39 = 0;
                Hyoa_flowmain.hy_field40 = 0;
                Hyoa_flowmain.hy_field41 = "";
                Hyoa_flowmain.hy_field42 = "";
                Hyoa_flowmain.hy_field43 = "";
                Hyoa_flowmain.hy_field44 = "";
                Hyoa_flowmain.hy_field45 = "";
                Hyoa_flowmain.hy_field46 = "";
                Hyoa_flowmain.hy_field47 = "";
                Hyoa_flowmain.hy_field48 = "";
                Hyoa_flowmain.hy_field49 = "";
                Hyoa_flowmain.hy_field50 = "";
                Hyoa_flowmain.hy_field51 = "";
                Hyoa_flowmain.hy_field52 = "";
                Hyoa_flowmain.hy_field53 = "";
                Hyoa_flowmain.hy_field54 = "";
                Hyoa_flowmain.hy_field55 = "";
                Hyoa_flowmain.hy_field56 = "";
                Hyoa_flowmain.hy_field57 = "";
                Hyoa_flowmain.hy_field58 = "";
                Hyoa_flowmain.hy_field59 = "";
                Hyoa_flowmain.hy_field60 = "";

                Hyoa_flowmain.hy_field61 = "";
                Hyoa_flowmain.hy_field62 = "";
                Hyoa_flowmain.hy_field63 = "";
                Hyoa_flowmain.hy_field64 = "";
                Hyoa_flowmain.hy_field65 = "";
                Hyoa_flowmain.hy_field66 = "";
                Hyoa_flowmain.hy_field67 = "";
                Hyoa_flowmain.hy_field68 = "";
                Hyoa_flowmain.hy_field69 = "";
                Hyoa_flowmain.hy_field70 = "";


                Hyoa_flowmain.hy_field71 = 0;
                Hyoa_flowmain.hy_field72 = 0;
                Hyoa_flowmain.hy_field73 = 0;
                Hyoa_flowmain.hy_field74 = 0;
                Hyoa_flowmain.hy_field75 = 0;
                Hyoa_flowmain.hy_field76 = 0;
                Hyoa_flowmain.hy_field77 = 0;
                Hyoa_flowmain.hy_field78 = 0;
                Hyoa_flowmain.hy_field79 = 0;
                Hyoa_flowmain.hy_field80 = 0;

                Hyoa_flowmain.hy_field81 = 0;
                Hyoa_flowmain.hy_field82 = 0;
                Hyoa_flowmain.hy_field83 = 0;
                Hyoa_flowmain.hy_field84 = 0;
                Hyoa_flowmain.hy_field85 = 0;
                Hyoa_flowmain.hy_field86 = 0;
                Hyoa_flowmain.hy_field87 = 0;
                Hyoa_flowmain.hy_field88 = 0;
                Hyoa_flowmain.hy_field89 = 0;
                Hyoa_flowmain.hy_field90 = 0;

                Hyoa_flowmain.hy_field91 = 0;
                Hyoa_flowmain.hy_field92 = 0;
                Hyoa_flowmain.hy_field93 = 0;
                Hyoa_flowmain.hy_field94 = 0;
                Hyoa_flowmain.hy_field95 = 0;
                Hyoa_flowmain.hy_field96 = 0;
                Hyoa_flowmain.hy_field97 = 0;
                Hyoa_flowmain.hy_field98 = 0;
                Hyoa_flowmain.hy_field99 = 0;
                Hyoa_flowmain.hy_field100 = 0;

                Hyoa_flowmain.hy_iftx = "";
                Hyoa_flowmain.hy_zhtxsj = "";
                Hyoa_flowmain.hy_readuserlist = "";

                Hyoa_flowmain.Insert();
                   
            }
            db.Close();
            this.lblReturnInformation.Text = "导入成功";

            if (File.Exists(this.lblDisplay.Text))
            {
                System.IO.File.Delete(this.lblDisplay.Text);
            }

        }
    }
예제 #18
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));
    }
예제 #19
0
    public void display()
    {
        //需要首先设置这些信息
        HyoaClass.Hyoa_mail_config Hyoa_mail_config = new HyoaClass.Hyoa_mail_config();
        DataTable dtconfig = Hyoa_mail_config.Getmailconfigbyuserid(this.Session["hyuid"].ToString());
        if (dtconfig.Rows.Count > 0)
        {
            string pop3Server = dtconfig.Rows[0]["hy_pop3url"].ToString();// "pop.163.com";    //邮箱服务器 如:"pop.sina.com.cn";或 "pop.qq.com" 好像sina的比较快
            int pop3Port = System.Int32.Parse(dtconfig.Rows[0]["hy_pop3port"].ToString()); //110;          //端口号码   用"110"好使。最好看一下你的邮箱服务器用的是什么端口号
            bool pop3UseSsl = false;
            string lsmailid = dtconfig.Rows[0]["hy_mailid"].ToString();
            string username = lsmailid.Substring(0, lsmailid.IndexOf("@"));//"ztmfang2008";        //你的邮箱用户名
            string password = Decrypt(dtconfig.Rows[0]["hy_mailpwd"].ToString()); //"20120328";      //你的邮箱密码
            List<string> gotEmailIds = new List<string>();
            List<Mime> result = new List<Mime>();
            using (POP3_Client pop3 = new POP3_Client())
            {
                //与Pop3服务器建立连接
                pop3.Connect(pop3Server, pop3Port, pop3UseSsl);
                //验证身份
                pop3.Authenticate(username, password, false);
                //获取邮件信息列表
                POP3_ClientMessageCollection infos = pop3.Messages;
                foreach (POP3_ClientMessage info in infos)
                {
                    //每封Email会有一个在Pop3服务器范围内唯一的Id,检查这个Id是否存在就可以知道以前有没有接收过这封邮件
                    if (gotEmailIds.Contains(info.UID))
                        continue;
                    //获取这封邮件的内容
                    byte[] bytes = info.MessageToByte();
                    //记录这封邮件的Id
                    gotEmailIds.Add(info.UID);
                    //this.Response.Write("<script>alert('" + info.UID + "');</script>");
                    //解析从Pop3服务器发送过来的邮件信息
                    Mime m = Mime.Parse(bytes);

                    HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
                    HyoaClass.Hyoa_mail Hyoa_mail = new HyoaClass.Hyoa_mail();
                    HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
                    //this.Response.Write("<script>alert('aaa');</script>");
                    string lsid = Hyoa_global.GetRandom();
                    string lsdocid = info.UID.ToString();

                    DataTable dtmail = Hyoa_mail.Getmailbydocid(lsdocid);
                    if (dtmail.Rows.Count > 0)
                    { }
                    else
                    {
                        Hyoa_mail.ID = lsid;
                        Hyoa_mail.DOCID = lsdocid;
                        Hyoa_mail.hy_type = "收件";
                        Hyoa_mail.hy_foldername = "收件箱";
                        Hyoa_mail.hy_fsrid = m.MainEntity.From.ToAddressListString().ToString();
                        Hyoa_mail.hy_fsrname = m.MainEntity.From.ToAddressListString().ToString();
                        Hyoa_mail.hy_jsrid = this.Session["hyuid"].ToString();
                        Hyoa_mail.hy_wbjsrid = m.MainEntity.To.ToAddressListString().ToString();
                        Hyoa_mail.hy_jsrname = this.Session["hyuname"].ToString();
                        Hyoa_mail.hy_title = m.MainEntity.Subject.ToString();
                        Hyoa_mail.hy_body = m.BodyHtml.ToString();
                        Hyoa_mail.hy_datetime = m.MainEntity.Date.ToString();
                        Hyoa_mail.hy_ifsavetofjx = "";
                        Hyoa_mail.hy_yxj = "";
                        Hyoa_mail.hy_yjbg = "";
                        Hyoa_mail.hy_zycd = "";
                        Hyoa_mail.hy_hz = "";

                        Hyoa_mail.Insert();
                        //this.Response.Write("<script>alert('bbb');</script>");

                        //获取附件
                        foreach (MimeEntity entry in m.Attachments)
                        {
                            string lsfileattid = Hyoa_global.GetRandom();
                            string fileName = entry.ContentDisposition_FileName; //获取文件名称
                            string path = Server.MapPath("~\\fileatt\\" + lsfileattid);
                            Directory.CreateDirectory(path);
                            path += "\\" + fileName;
                            if (File.Exists(path))
                            {
                                Random random = new Random();
                                int newfile = random.Next(1, 100000);
                                path = Server.MapPath("~\\fileatt\\" + lsfileattid + "\\" + newfile.ToString());
                                Directory.CreateDirectory(path);
                                path += "\\" + fileName;
                            }
                            byte[] data = entry.Data;
                            FileStream pFileStream = null;
                            pFileStream = new FileStream(path, FileMode.Create);
                            pFileStream.Write(data, 0, data.Length);
                            pFileStream.Close();

                            //向附件表插入记录
                            Hyoa_fileatt.ID = lsfileattid;
                            Hyoa_fileatt.hy_fatherid = lsdocid;
                            Hyoa_fileatt.hy_filename = fileName;
                            Hyoa_fileatt.hy_filepath = path.Substring(path.IndexOf("fileatt\\"));
                            Hyoa_fileatt.hy_filesize = data.Length.ToString();
                            Hyoa_fileatt.hy_userid = this.Session["hyuid"].ToString();
                            Hyoa_fileatt.hy_djsj = m.MainEntity.Date.ToString();
                            Hyoa_fileatt.hy_fatherfield = "";
                            Hyoa_fileatt.Insert();

                            //this.Response.Write("<script>alert('ccc');</script>");
                        }
                    }
                    //Response.Write("<br>From:" + m.MainEntity.From.ToAddressListString());
                    //Response.Write("<br>To:" + m.MainEntity.To.ToAddressListString());
                    //Response.Write("<br>Time:" + m.MainEntity.Date);            //发送时间
                    //Response.Write("<br>Subject:" + m.MainEntity.Subject);      //主题
                    //Response.Write("<br>Plain Body:" + m.BodyText);             //内容
                    //Response.Write("<br>Html Body:" + m.BodyHtml);              //HTML格式内容
                }
                this.Response.Write("<script>alert('邮件接收完成!');window.opener.location.reload();window.close();</script>");
            }
        }
        else
        {
            this.Response.Write("<script>alert('请先配置外网邮件信息!');</script>");
        }
    }
예제 #20
0
 //评论add by xf 2011-11-19
 protected void Button_PinglunSave_Click(object sender, EventArgs e)
 {
     if (this.txtpinglun.Text.Trim() == "")
     {
         Response.Write("<script>alert('评论内容不能为空!');</script>");
         return;
     }
     else
     {
         //保存评论记录
         HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
         HyoaClass.Hyoa_pinglun Hyoa_pinglun = new HyoaClass.Hyoa_pinglun();
         Hyoa_pinglun.plid = Hyoa_global.GetRandom();
         Hyoa_pinglun.hy_tableid = this.hy_tableid.Text;
         Hyoa_pinglun.hy_fatherid = this.txtdocid.Value;
         Hyoa_pinglun.hy_pluserid = Session["hyuid"].ToString();
         Hyoa_pinglun.hy_plusername = Session["hyuname"].ToString();
         Hyoa_pinglun.hy_pldeptid = Session["hydeptid"].ToString();
         Hyoa_pinglun.hy_pldeptname = Session["hydeptname"].ToString();
         Hyoa_pinglun.hy_pltime = System.DateTime.Now.ToString();
         Hyoa_pinglun.hy_plbody = this.txtpinglun_hidden.Text;
         Hyoa_pinglun.hy_plip = HttpContext.Current.Request.UserHostAddress;
         Hyoa_pinglun.hy_plifshow = "";
         Hyoa_pinglun.Insert();
         Response.Write("<script>alert('评论成功!');window.location='" + this.Request.Url.ToString() + "'</script>");
     }
 }
예제 #21
0
파일: main.aspx.cs 프로젝트: wjszxli/Webapp
    //发布投票add by fy 2014-02-23
    protected void Button_Pub_Click(object sender, EventArgs e)
    {
        //发布投票时发送邮件给参与投票人
        HyoaClass.DAO db = new HyoaClass.DAO();
        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 (this.hy_field43.Text == "")
        {
            //从人员库中读取人员
            DataTable dt = Hyoa_user.GetusersOrderbydeptsortandusersort();
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    string ls_jsrid = dt.Rows[i]["hy_userid"].ToString();
                    string ls_jsrname = dt.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_body = this.Session["hyuname"].ToString() + "发起投票,您的投票邀请码为:" + 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() + "','收件','收件箱','" + this.hy_djrid.Text + "','" + this.hy_djrname.Text + "','" + ls_jsrid + "','','" + ls_jsrname + "','" + this.hy_field23.Text + "','" + 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_jsrid = this.hy_field43.Text;
            string ls_jsrname = this.hy_field41.Text;

            string[] lv_jsrid = ls_jsrid.Split('+');
            string[] lv_jsrname = ls_jsrname.Split('+');
            for (var i = 0; i < lv_jsrid.Length; i++)
            {
                if (lv_jsrid[i] != "")
                {
                    string ls_yqm = "";
                    string ls_yqms = GetRandom3();
                    if (lv_jsrid[i] == "admin")
                    {
                        ls_yqm = "000" + ls_yqms;
                    }
                    else
                    {
                        ls_yqm = lv_jsrid[i].Substring(lv_jsrid[i].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_body = this.Session["hyuname"].ToString() + "发起投票,您的投票邀请码为:" + 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() + "','收件','收件箱','" + this.hy_djrid.Text + "','" + this.hy_djrname.Text + "','" + lv_jsrid[i].ToString() + "','','" + lv_jsrname[i].ToString() + "','" + this.hy_field23.Text + "','" + 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 docid='" + this.txtdocid.Value + "'";
        db.Execute(sql);
        db.Close();
        db.Dispose();

        Response.Write("<script>alert('发布投票成功!');window.location = '/list_tpgl.aspx?mid=moduletpgl&tableid=bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd';</script>");
    }
예제 #22
0
    //加载主表单    Written by xf 20110515
    private void DataPlay()
    {
        txtsavefields.Text = "";
        txtsavefields_sx.Text = "";

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

            #region 新文档
            if (this.Request.QueryString["op"] == "add")
            {
                this.td_ydry.Visible = false; //新文档时,“已读人员”按钮隐藏
                this.txtiffirsttache.Value = "1"; //新文档时,“是否第一环节”置为1

                //文档ID(保存POST到当前页面时,DOCID不重新加载)
                if (!this.IsPostBack)
                {
                    this.txtdocid.Value = Hyoa_global.GetRandom();
                    this.hy_djsj.Text = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                }
                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();

                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);
                        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";

                                //-------条件流程start-------
                                HyoaClass.Hyoa_flowtache Hyoa_flowtache = new HyoaClass.Hyoa_flowtache();
                                DataTable dt_firsttache = Hyoa_flowtache.Getflowtachebyflowidtacheid(dt.Rows[0]["hy_flowid"].ToString(), ls_firsttacheid);
                                if (dt_firsttache.Rows.Count > 0)
                                {
                                    if (dt_firsttache.Rows[0]["hy_enablecondition"].ToString() == "是")
                                        ConditionFlow(dt.Rows[0]["hy_flowid"].ToString(), ls_firsttacheid);
                                }
                                //-------条件流程end-------
                            }
                            else
                            {
                                if (this.txtifpop.Value == "")
                                {
                                    this.td_submit.Visible = false;
                                    this.td_nextstep.Visible = false;
                                    Response.Write("<script>alert('您无权进行此项操作,请联系管理员!');window.location='" + this.txturl.Value + "';</script>");
                                    return;
                                }
                                else
                                {
                                    this.td_submit.Visible = false;
                                    this.td_nextstep.Visible = false;
                                    Response.Write("<script>alert('您无权进行此项操作,请联系管理员!');self.close();</script>");
                                    return;
                                }
                            }
                        }
                        dt.Clear();
                        this.td_nextstep.Visible = true; //提交
                    }
                }
                //加载页面
                if (this.hy_tableid.Text == "Tablefpbd")
                {
                        this.td_dc.Visible = true;
                }
                GetMainTableHtml("0", this.txtSystemClRight.Value, "1", this.hy_curtacheid.Text);
                this.td_submit.Visible = true; //保存
                hywebopen_newdoc();     //新文档OPEN时的特殊处理

            }
            #endregion

            #region 旧文档
            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();
                    string sql = "select * from hyc_" + this.hy_tableid.Text + " where DOCID='" + this.txtdocid.Value + "' ";

                    DataTable dt = Hyoa_global.GetDataTable(sql);
                    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();
                        if (!this.IsPostBack)
                        {
                            this.hy_bt.Text = dt.Rows[0]["hy_bt"].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();
                        this.hy_readdatelist.Text = dt.Rows[0]["hy_readdatelist"].ToString();
                        this.hy_clrylist.Text = dt.Rows[0]["hy_clrylist"].ToString();
                        this.hy_cyrylist.Text = dt.Rows[0]["hy_cyrylist"].ToString();
                        this.hy_motherid.Text = dt.Rows[0]["hy_motherid"].ToString();
                        this.hy_ifconfirm.Text = dt.Rows[0]["hy_ifconfirm"].ToString();
                        UpdateReadFlag();  //打开时添加阅读情况
                    }
                    dt.Clear();

                    //流程已结束
                    if (this.hy_curtacheid.Text == "**")
                    {
                        this.lblcurtachenameshow.Text = "流程已结束";

                        //20111216 add start
                        if (this.hy_mudelid.Text == "Mudelfwgl" || this.hy_mudelid.Text == "Mudelswgl")
                        {
                            //有发布权限
                            if (Hy_IfHaveRole(this.hy_mudelid.Text, Session["hyuid"].ToString()) == "1")
                            {
                                this.td_fabu.Visible = true;  //收发文模块流程结束后显示发布按钮
                                //收发文流程结束后分发轮阅  20140809 hjadd start
                                this.td_ffly.Visible = true;  //收发文模块流程结束后显示分发按钮
                                //收发文流程结束后分发轮阅  20140809 hjadd start
                            }
                        }
                        //20111216 add end

                        //判断是否为传阅人
                        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.txtSystemClRight.Value = "0";
                            this.txtSystemYdRight.Value = "1";
                        }
                        //判断是否历史处理人
                        //判断是否是历史处理人员
                        if (Hyoa_global.ifhistoryclr(this.txtdocid.Value, this.Session["hyuid"].ToString()))
                        {
                            this.txtifhistoryclr.Value = "1";
                            this.txtSystemClRight.Value = "0";
                            this.txtSystemYdRight.Value = "1";
                        }
                    }
                    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; //提交
                            if (this.hy_curtacheid.Text != "tache0001")
                            {
                                this.td_returnsumbit.Visible = true; //退回
                            }

                            //-------条件流程start-------
                            HyoaClass.Hyoa_flowtache Hyoa_flowtache = new HyoaClass.Hyoa_flowtache();
                            DataTable dt_firsttache = Hyoa_flowtache.Getflowtachebyflowidtacheid(this.hy_flowid.Text, this.hy_curtacheid.Text);
                            if (dt_firsttache.Rows.Count > 0)
                            {
                                if (dt_firsttache.Rows[0]["hy_enablecondition"].ToString() == "是")
                                    ConditionFlow(this.hy_flowid.Text, this.hy_curtacheid.Text);
                            }
                            //-------条件流程end-------
                        }
                        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";
                            }
                            //判断是否是上一环节处理人
                            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_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
                        DataTable dt_flowhistoryinfo_cl = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value);
                        if (dt_flowhistoryinfo_cl.Rows.Count == 1)
                        {
                            this.txtiffirsttache.Value = "1"; //旧文档时,如果历史处理环节中只有一条记录,“是否第一环节”置为1
                        }
                        dt_flowhistoryinfo_cl.Clear();

                        //判断是否为最后一个环节
                        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.hy_curtacheid.Text == "**")
                    {
                        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
                        DataTable dt_tableconfig = Hyoa_tableconfig.GetTable(this.hy_tableid.Text);
                        if (dt_tableconfig.Rows.Count > 0)
                        {
                            if (dt_tableconfig.Rows[0]["hy_ispuballByflowYB"].ToString() == "是")
                            {
                                this.txtSystemYdRight.Value = "1";
                            }
                        }
                    }
                    //没有操作权限的用户,如果是全权用户,则置为阅读权限    ADD BY XF 2011-11-17
                    if (this.txtSystemClRight.Value == "0" && this.txtSystemYdRight.Value == "0")
                    {
                        //得到当前模块对应的全权用户组
                        HyoaClass.Hyoa_mudel Hyoa_mudel_forqqyh = new HyoaClass.Hyoa_mudel();
                        DataTable dt_mudel_forqqyh = Hyoa_mudel_forqqyh.Getmudel(this.hy_mudelid.Text);
                        if (dt_mudel_forqqyh.Rows.Count > 0)
                        {
                            if (dt_mudel_forqqyh.Rows[0]["hy_qqroleid"] != null)
                            {
                                if (dt_mudel_forqqyh.Rows[0]["hy_qqroleid"] != "")
                                {
                                    string ls_role_forqqyh = dt_mudel_forqqyh.Rows[0]["hy_qqroleid"].ToString();
                                    HyoaClass.Hyoa_global Hyoa_global_forqqyh = new HyoaClass.Hyoa_global();
                                    if (Hyoa_global_forqqyh.isHaveRole(ls_role_forqqyh, this.Session["hyuid"].ToString()))
                                    {
                                        this.txtSystemYdRight.Value = "1";  //阅读权限
                                    }
                                }
                            }
                        }
                    }

                    //指定的特殊模块,流转过程中,所有人员可以浏览该文档
                    hySetYdRight_TS();

                    //如果是“可修改所有文档的权限人员”,则可以修改所有的,可以把已办文件转在办
                    if (Hyoa_global.isHaveRole("Role9995", Session["hyuid"].ToString()))
                    {
                        this.txtSystemYdRight.Value = "1";
                        this.td_submit.Visible = true; //保存
                        if (this.hy_curtacheid.Text == "**")
                            this.td_ybtozb.Visible = true; //已办转在办
                    }

                    //既没有处理权限,又没有阅读权限的情况下
                    if (this.txtSystemClRight.Value == "0" && this.txtSystemYdRight.Value == "0")
                    {
                        if (this.txtifpop.Value == "")
                        {
                            this.td_submit.Visible = false;
                            this.td_nextstep.Visible = false;
                            Response.Write("<script>alert('您无权进行此项操作,请联系管理员!');window.location='" + this.txturl.Value + "';</script>");
                            return;
                        }
                        else
                        {
                            this.td_submit.Visible = false;
                            this.td_nextstep.Visible = false;
                            Response.Write("<script>alert('您无权进行此项操作,请联系管理员!');self.close();</script>");
                            return;
                        }
                    }

                    //加载页面
                    if (this.hy_tableid.Text == "Tablefpbd")
                    {
                            this.td_dc.Visible = true;

                    }
                    GetMainTableHtml("1", this.txtSystemClRight.Value, "1", this.hy_curtacheid.Text);

                    //----加载补充意见页面 s add by xf 2013-6-24-----
                    HyoaClass.Hyoa_tableconfig Hyoa_tableconfig_forbcyj = new HyoaClass.Hyoa_tableconfig();
                    DataTable dt_tableconfig_forbcyj = Hyoa_tableconfig_forbcyj.GetTablesbymudelidandtableid(this.hy_mudelid.Text, this.hy_tableid.Text);
                    if (dt_tableconfig_forbcyj.Rows.Count > 0)
                    {
                        if (dt_tableconfig_forbcyj.Rows[0]["hy_ifcomment"] != null)
                        {
                            if (dt_tableconfig_forbcyj.Rows[0]["hy_ifcomment"].ToString() == "是")
                            {
                                this.tb_nbsp.Visible = true;
                                this.tb_bctitle.Visible = true;
                                this.tb_bcbody.Visible = true;
                                if (this.txtSystemClRight.Value == "0")
                                {
                                    this.td_bcyj.Visible = true;
                                    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-----
                }
                hywebopen_olddoc(); //旧文档OPEN的特殊处理
            }
            #endregion
        }
    }
예제 #23
0
    //流程提交时的特殊处理
    private string hylctjtscl()
    {
        string sql = "";

        #region 收文管理(更新流水号)(登记环节)
        if (hy_curtacheid.Text == "tache0001" & hy_mudelid.Text == "Mudelswgl" & this.hy_tableid.Text == "Tableswgl")
        {
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            string random = Hyoa_global.GetRandom();
            string sqlswwh;
            string sqlinsertswwh;
            string sqlupdateswwh;
            sqlswwh = "select * from hyc_Tableswlsh where hyc_lb='" + Request.Form["swlx"].ToString() + "' and hyc_nf='" + Request.Form["swnf"].ToString() + "' ";
            sqlinsertswwh = "insert into hyc_Tableswlsh (DOCID,hy_mudelid,hy_tableid,hy_djrid,hy_djrname";
            sqlinsertswwh += ",hy_djrbmid,hy_djrbmname,hy_djsj,hy_bt,hy_iftx";
            sqlinsertswwh += ",hy_readuserlist,hy_readdatelist,hy_motherid,hy_ifconfirm";
            sqlinsertswwh += ",hyc_lb,hyc_nf,hyc_pxh,hyc_lsh) values(";
            sqlinsertswwh += "'" + random + "','Mudelfwlsh','Tablefwlsh','" + Session["hyuid"].ToString() + "','" + Session["hyuname"].ToString() + "'";
            sqlinsertswwh += ",'" + Session["hydeptid"].ToString() + "','" + Session["hydeptname"].ToString() + "','" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','',''";
            sqlinsertswwh += ",'','','',''";
            sqlinsertswwh += ",'" + Request.Form["swlx"].ToString() + "','" + Request.Form["swnf"].ToString() + "',1,1)";
            sqlupdateswwh = "update hyc_Tableswlsh set hyc_lsh = " + (System.Int32.Parse(Request.Form["swbh"].ToString()) + 1).ToString() + " where hyc_lb='" + Request.Form["swlx"].ToString() + "' and hyc_nf='" + Request.Form["swnf"].ToString() + "' ";

            DataTable swdt = Hyoa_global.GetDataTable(sqlswwh);
            if (swdt.Rows.Count > 0)
            {
                Hyoa_global.ExcuteSQL(sqlupdateswwh);
            }
            else
            {
                Hyoa_global.ExcuteSQL(sqlinsertswwh);
                Hyoa_global.ExcuteSQL(sqlupdateswwh);
            }
        }
        #endregion

        #region 发文管理(更新流水号)(办公室编号环节)
        if (hy_curtacheid.Text == "tache0007" & hy_mudelid.Text == "Mudelfwgl" & this.hy_tableid.Text == "Tablefwgl")
        {
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            string random = Hyoa_global.GetRandom();
            string sqlfwwh;
            string sqlinsertfwwh;
            string sqlupdatefwwh;
            sqlfwwh = "select * from hyc_Tablefwlsh where hyc_lb='" + Request.Form["fwlb"].ToString() + "' and hyc_nf='" + Request.Form["nf"].ToString() + "' ";
            sqlinsertfwwh = "insert into hyc_Tablefwlsh (DOCID,hy_mudelid,hy_tableid,hy_djrid,hy_djrname";
            sqlinsertfwwh += ",hy_djrbmid,hy_djrbmname,hy_djsj,hy_bt,hy_iftx";
            sqlinsertfwwh += ",hy_readuserlist,hy_readdatelist,hy_motherid,hy_ifconfirm";
            sqlinsertfwwh += ",hyc_lb,hyc_nf,hyc_pxh,hyc_lsh) values(";
            sqlinsertfwwh += "'" + random + "','Mudelfwlsh','Tablefwlsh','" + Session["hyuid"].ToString() + "','" + Session["hyuname"].ToString() + "'";
            sqlinsertfwwh += ",'" + Session["hydeptid"].ToString() + "','" + Session["hydeptname"].ToString() + "','" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','',''";
            sqlinsertfwwh += ",'','','',''";
            sqlinsertfwwh += ",'" + Request.Form["fwlb"].ToString() + "','" + Request.Form["nf"].ToString() + "',1,1)";
            sqlupdatefwwh = "update hyc_Tablefwlsh set hyc_lsh = " + (System.Int32.Parse(Request.Form["fwbh"].ToString()) + 1).ToString() + " where hyc_lb='" + Request.Form["fwlb"].ToString() + "' and hyc_nf='" + Request.Form["nf"].ToString() + "' ";

            DataTable fwdt = Hyoa_global.GetDataTable(sqlfwwh);
            if (fwdt.Rows.Count > 0)
            {
                Hyoa_global.ExcuteSQL(sqlupdatefwwh);
            }
            else
            {
                Hyoa_global.ExcuteSQL(sqlinsertfwwh);
                Hyoa_global.ExcuteSQL(sqlupdatefwwh);
            }
        }
        #endregion

        return sql;
    }
예제 #24
0
    protected void Button_Fabu_Click(object sender, EventArgs e)
    {
        //收发文发布,将主文档的信息复制到公文库中

        if (this.Request.QueryString["docid"] != null)
        {
            string lssqlgwk;
            lssqlgwk = "select * from hyp_gwk where hy_fatherid = '" + this.Request.QueryString["docid"].ToString() + "'";
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            DataTable dtgwk = Hyoa_global.GetDataTable(lssqlgwk);

            if (dtgwk.Rows.Count > 0)
            {
                Response.Write("<script>alert('此文档已发布到公文库,无法重复发布,若要再次发布,请先删除公文库中的文档!')</script>");
                return;
            }
            else
            {
                //根据主文档ID得到记录
                string sql = "select * from hyc_" + this.hy_tableid.Text + " where DOCID='" + this.Request.QueryString["docid"].ToString() + "'";
                DataTable dt = Hyoa_global.GetDataTable(sql);

                string gwkid;
                string gwkmudelid;
                string gwktableid;
                string gwkdjrid;
                string gwkdjrname;
                string gwkdjbmid;
                string gwkdjbmname;
                string gwkbt;
                string gwkfatherid;
                string gwkwh = "";
                string gwklwwh = "";

                gwkid = Hyoa_global.GetRandom();
                gwkmudelid = this.hy_mudelid.Text;
                gwktableid = this.hy_tableid.Text;
                gwkdjrid = this.hy_djrid.Text;
                gwkdjrname = this.hy_djrname.Text;
                gwkdjbmid = this.hy_djrbmid.Text;
                gwkdjbmname = this.hy_djrbmname.Text;
                gwkbt = this.hy_bt.Text;
                gwkfatherid = this.txtdocid.Value;

                string lsinsertgwk;
                if (this.hy_mudelid.Text == "Mudelfwgl")
                {
                    //发文
                    gwkwh = dt.Rows[0]["hyc_fwlb"].ToString() + "[" + dt.Rows[0]["hyc_nf"].ToString() + "]" + dt.Rows[0]["hyc_fwbh"].ToString() + "号";
                    gwklwwh = "";

                }
                else
                {
                    //收文
                    gwkwh = dt.Rows[0]["hyc_swlx"].ToString() + "[" + dt.Rows[0]["hyc_swnf"].ToString() + "]" + dt.Rows[0]["hyc_swbh"].ToString() + "号";
                    gwklwwh = dt.Rows[0]["hyc_lwwh"].ToString();
                }

                lsinsertgwk = "insert into hyp_gwk (ID,hy_mudelid,hy_tableid,hy_djrid,hy_djrname,hy_djbmid,hy_djbmname,hy_bt,hy_wh,hy_lwwh,hy_djsj,hy_fatherid,hy_typeid,hy_typename)  ";
                if (Session["conntype"].ToString() == "SQL")
                {
                    lsinsertgwk += "values('" + gwkid + "','" + gwkmudelid + "','" + gwktableid + "','" + gwkdjrid + "','" + gwkdjrname + "','" + gwkdjbmid + "','" + gwkdjbmname + "','" + gwkbt + "','" + gwkwh + "','" + gwklwwh + "','" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + gwkfatherid + "','" + this.txttypeid.Value + "','" + this.txttypename.Value + "')";
                }
                if (Session["conntype"].ToString() == "ORACLE")
                {
                    lsinsertgwk += "values('" + gwkid + "','" + gwkmudelid + "','" + gwktableid + "','" + gwkdjrid + "','" + gwkdjrname + "','" + gwkdjbmid + "','" + gwkdjbmname + "','" + gwkbt + "','" + gwkwh + "','" + gwklwwh + "',to_date('" + System.DateTime.Now.ToString() + "','YYYY-MM-DD HH24:MI:SS'),'" + gwkfatherid + "','" + this.txttypeid.Value + "','" + this.txttypename.Value + "')";
                }
                Hyoa_global.ExcuteSQL(lsinsertgwk);

                Response.Write("<script>alert('文档发布成功!')</script>");

            }

        }
    }
예제 #25
0
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("login.aspx");

        string ls_tip = "保存成功!";

        #region 新建时先进行一次保存
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        string sql = "";
        if (this.txtop.Value == "add")
        {
            //处理特殊字符
            this.hy_bt.Text = ReplaceString_Tszf(this.hy_bt.Text);
            if (Session["conntype"].ToString() == "SQL")
            {
                //edited by xf 20140625
                sql = "insert into hyc_" + this.hy_tableid.Text + " (DOCID,hy_mudelid,hy_tableid,hy_flowid,hy_flowname,hy_curtacheid,hy_curtachename,hy_curclrid,hy_curclrname,hy_djrid,hy_djrname,hy_djrbmid,hy_djrbmname,hy_djsj,hy_bt,hy_readuserlist,hy_readdatelist,hy_clrylist,hy_cyrylist) values (";
                sql += "'" + this.txtdocid.Value + "','" + this.hy_mudelid.Text + "','" + this.hy_tableid.Text + "','" + this.hy_flowid.Text + "','" + this.hy_flowname.Text + "'";
                sql += ",'" + this.hy_curtacheid.Text + "','" + this.hy_curtachename.Text + "','" + this.hy_curclrid.Text + "','" + this.hy_curclrname.Text + "','" + this.hy_djrid.Text + "'";
                sql += ",'" + this.hy_djrname.Text + "','" + this.hy_djrbmid.Text + "','" + this.hy_djrbmname.Text + "','" + this.hy_djsj.Text + "','" + this.hy_bt.Text + "'";
                sql += ",'','','," + Session["hyuid"].ToString() + ",',',') ";
            }
            if (Session["conntype"].ToString() == "ORACLE")
            {
                //edited by xf 20140625
                sql = "insert into hyc_" + this.hy_tableid.Text + " (DOCID,hy_mudelid,hy_tableid,hy_flowid,hy_flowname,hy_curtacheid,hy_curtachename,hy_curclrid,hy_curclrname,hy_djrid,hy_djrname,hy_djrbmid,hy_djrbmname,hy_djsj,hy_bt,hy_readuserlist,hy_readdatelist,hy_clrylist,hy_cyrylist) values (";
                sql += "'" + this.txtdocid.Value + "','" + this.hy_mudelid.Text + "','" + this.hy_tableid.Text + "','" + this.hy_flowid.Text + "','" + this.hy_flowname.Text + "'";
                sql += ",'" + this.hy_curtacheid.Text + "','" + this.hy_curtachename.Text + "','" + this.hy_curclrid.Text + "','" + this.hy_curclrname.Text + "','" + this.hy_djrid.Text + "'";
                sql += ",'" + this.hy_djrname.Text + "','" + this.hy_djrbmid.Text + "','" + this.hy_djrbmname.Text + "',to_date('" + this.hy_djsj.Text + "','YYYY-MM-DD HH24:MI:SS'),'" + this.hy_bt.Text + "'";
                sql += ",'','','," + Session["hyuid"].ToString() + ",',',') ";
            }
            Hyoa_global.ExcuteSQL(sql);

            //插入历史处理表
            Hyoa_global.Saveflowhistoryinfo_cl_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.hy_curtacheid.Text, this.hy_curtachename.Text, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "", "", "", this.hy_djsj.Text, "");
        }
        #endregion

        //更新内容
        sql = "update hyc_" + this.hy_tableid.Text + " set hy_tableid='" + hy_tableid.Text + "',hy_bt='" + hy_bt.Text + "' ";

        #region 根据“需要保存的字段”来进行保存
        if (txtsavefields.Text != "")
        {
            string[] lv_savefields = txtsavefields.Text.Split(',');
            string[] lv_savefields_sx = txtsavefields_sx.Text.Split(',');
            string fielddocvalue = "";
            for (int i = 0; i < lv_savefields.Length; i++)
            {
                if (lv_savefields_sx[i].ToString() == "0")  //文本
                {
                    if (this.Request.Form[lv_savefields[i].ToString()] != null)
                    {
                        fielddocvalue = this.Request.Form[lv_savefields[i].ToString()].ToString();
                        fielddocvalue = ReplaceString_Tszf(fielddocvalue);
                        sql += ",hyc_" + lv_savefields[i].ToString() + "='" + fielddocvalue + "'";
                    }
                }
                if (lv_savefields_sx[i].ToString() == "1")  //日期
                {
                    if (this.Request.Form[lv_savefields[i].ToString()] != null)
                    {
                        fielddocvalue = this.Request.Form[lv_savefields[i].ToString()].ToString();
                        if (Session["conntype"].ToString() == "SQL")
                        {
                            if (fielddocvalue == "")
                                sql += ",hyc_" + lv_savefields[i].ToString() + "=null";
                            else
                                sql += ",hyc_" + lv_savefields[i].ToString() + "='" + fielddocvalue + "'";
                        }
                        if (Session["conntype"].ToString() == "ORACLE")
                        {
                            if (fielddocvalue == "")
                                sql += ",hyc_" + lv_savefields[i].ToString() + "=null";
                            else
                                sql += ",hyc_" + lv_savefields[i].ToString() + "=to_date('" + fielddocvalue + "','YYYY-MM-DD HH24:MI:SS')";
                        }
                    }
                }
                if (lv_savefields_sx[i].ToString() == "3")  //数值
                {
                    if (this.Request.Form[lv_savefields[i].ToString()] != null)
                    {
                        fielddocvalue = this.Request.Form[lv_savefields[i].ToString()].ToString();
                        if (fielddocvalue == "")
                            sql += ",hyc_" + lv_savefields[i].ToString() + "=0";
                        else
                            sql += ",hyc_" + lv_savefields[i].ToString() + "=" + fielddocvalue;
                    }
                }
                if (lv_savefields_sx[i].ToString() == "5")  //口令
                {
                    if (this.Request.Form[lv_savefields[i].ToString()] != null)
                    {
                        fielddocvalue = this.Request.Form[lv_savefields[i].ToString()].ToString();
                        fielddocvalue = ReplaceString_Tszf(fielddocvalue);
                        sql += ",hyc_" + lv_savefields[i].ToString() + "='" + fielddocvalue + "'";
                    }
                }
                if (lv_savefields_sx[i].ToString() == "6")  //编辑器
                {
                    if (this.Request.Form[lv_savefields[i].ToString()] != null)
                    {
                        fielddocvalue = this.Request.Form[lv_savefields[i].ToString()].ToString();
                        fielddocvalue = ReplaceString_Tszf(fielddocvalue);
                        sql += ",hyc_" + lv_savefields[i].ToString() + "='" + fielddocvalue + "'";
                    }
                }
                if (lv_savefields_sx[i].ToString() == "7")  //复选框
                {
                    string s = "";
                    CheckBoxList txfs = (CheckBoxList)this.FindControl(lv_savefields[i].ToString());
                    foreach (ListItem li in txfs.Items)
                    {
                        if (li.Selected)
                        {
                            if (li.Selected) s += li.Value + ",";
                        }
                    }
                    s = s.TrimEnd(',');
                    s = ReplaceString_Tszf(s);
                    sql += ",hyc_" + lv_savefields[i].ToString() + "='" + s + "'";
                }
                if (lv_savefields_sx[i].ToString() == "8")  //单选框
                {
                    string s = "";
                    RadioButtonList txfs = (RadioButtonList)this.FindControl(lv_savefields[i].ToString());
                    foreach (ListItem li in txfs.Items)
                    {
                        if (li.Selected)
                        {
                            if (li.Selected) s += li.Value + ",";
                        }
                    }
                    s = s.TrimEnd(',');
                    s = ReplaceString_Tszf(s);
                    sql += ",hyc_" + lv_savefields[i].ToString() + "='" + s + "'";
                }
                if (lv_savefields_sx[i].ToString() == "9")  //意见
                {
                    if (this.Request.Form[lv_savefields[i].ToString()] != null)
                    {
                        fielddocvalue = this.Request.Form[lv_savefields[i].ToString()].ToString();
                        fielddocvalue = ReplaceString_Tszf(fielddocvalue);
                        if (fielddocvalue != "")
                        {
                            HyoaClass.Hyoa_yj Hyoa_yj = new HyoaClass.Hyoa_yj();
                            Hyoa_yj.yjid = Hyoa_global.GetRandom();
                            Hyoa_yj.hy_tableid = this.hy_tableid.Text;
                            Hyoa_yj.hy_fatherid = this.txtdocid.Value;
                            Hyoa_yj.hy_fieldid = lv_savefields[i].ToString();
                            Hyoa_yj.hy_yjuserid = Session["hyuid"].ToString();
                            Hyoa_yj.hy_yjusername = Session["hyuname"].ToString();
                            Hyoa_yj.hy_yjdeptid = Session["hydeptid"].ToString();
                            Hyoa_yj.hy_yjdeptname = Session["hydeptname"].ToString();
                            Hyoa_yj.hy_yjtime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                            Hyoa_yj.hy_yjbody = fielddocvalue;
                            Hyoa_yj.hy_yjip = HttpContext.Current.Request.UserHostAddress;
                            Hyoa_yj.hy_yjifshow = "";
                            Hyoa_yj.Insert();
                        }
                    }
                }
            }
        }
        #endregion

        #region 保存
        if (this.txtwhichoperation.Value == "1")
        {
            sql += hylcbctscl();  //特殊处理
        }
        #endregion

        #region 提交
        if (this.txtwhichoperation.Value == "2")
        {
            //更新主文档
            sql += ",hy_curtacheid='" + this.txtnexttacheid.Value + "'";
            sql += ",hy_curtachename='" + this.txtnexttachename.Value + "'";
            sql += ",hy_curclrid='" + this.txtnextclrid.Value + "'";
            sql += ",hy_curclrname='" + this.txtnextclrname.Value + "'";

            //---- 添加当前环节的处理时间 ---- start
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocidtacheid(this.txtdocid.Value, this.hy_curtacheid.Text);
            if (dt_clinfo.Rows.Count > 0)
            {
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "")
                {
                    Hyoa_flowhistoryinfo_cl.hy_clsj = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                }
                else
                {
                    Hyoa_flowhistoryinfo_cl.hy_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                }
                Hyoa_flowhistoryinfo_cl.Update();
            }
            //---- 添加当前环节的处理时间 ---- end

            ////////////////////如果后续环节选择了“结束”,则不需要发待办事宜和短消息 start//////////////////////
            HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            if (this.txtnexttacheid.Value != "**")
            {
                //---  创建后续处理的处理记录+建立处理人待办事宜 ---- start
                Hyoa_global.Saveflowhistoryinfo_cl_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.txtnexttacheid.Value, this.txtnexttachename.Value, this.txtnextclrid.Value, this.txtnextclrname.Value, "", this.txtnextcyrid.Value, this.txtnextcyrname.Value, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "");

                //待办事宜、短信、即时消息
                string[] lv_dbrid = this.txtnextclrid.Value.Split(new Char[] { ',' });
                string[] lv_dbrname = this.txtnextclrname.Value.Split(new Char[] { ',' });
                for (var i = 0; i < lv_dbrid.Length; i++)
                {
                    if (lv_dbrid[i].ToString() != "")
                    {
                        //得到当前用户手机号
                        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                        string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());
                        //得到后续处理人手机号
                        string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(lv_dbrid[i].ToString());

                        //给后续处理人发送一个新的待办事宜(提醒)
                        Hyoa_global.Senddbsy_global(this.txtdocid.Value, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1", "待办", this.hy_mudelid.Text, "待办箱", "一般", this.hy_bt.Text, "请办理", 0, this.hy_flowid.Text, this.txtnexttacheid.Value, this.hy_tableid.Text);
                        //给后续处理人发送即时消息(提醒)
                        if (this.txtisSendjstx_clr.Value == "1")
                        {
                            Hyoa_global.Sendjstx_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.hy_mudelid.Text, this.hy_bt.Text, 0, this.hy_tableid.Text);
                        }
                        //给后续处理人发送短信(提醒)
                        if (this.txtisSendsms_clr.Value == "1")
                        {
                            Hyoa_global.Sendsms_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), cb_fsrsjh, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_jsrsjh, this.hy_mudelid.Text, this.hy_bt.Text, 1, "", "", 0, this.hy_tableid.Text);
                        }
                    }

                }
                //--- 创建后续处理的处理记录+建立处理人待办事宜 ---- end

                //--- 创建后续传阅记录+建立待办事宜 ---- start
                string[] lv_cyrid = this.txtnextcyrid.Value.Split(new Char[] { ',' });
                string[] lv_cyrname = this.txtnextcyrname.Value.Split(new Char[] { ',' });
                for (var i = 0; i < lv_cyrid.Length; i++)
                {
                    if (lv_cyrid[i].ToString() != "")
                    {
                        //建立传阅数据
                        Hyoa_global.Saveflowhistoryinfo_cy_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.txtnexttacheid.Value, this.txtnexttachename.Value, lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), "", System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));

                        //待办事宜、短信、即时消息
                        //得到当前用户手机号
                        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                        string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());
                        //得到后续传阅人手机号
                        string cb_cyrsjh = Hyoa_user.GetMobilebyuserid(lv_cyrid[i].ToString());

                        //给后续处理人发送一个新的待办事宜(提醒)
                        Hyoa_global.Senddbsy_global(this.txtdocid.Value, lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1", "待阅", this.hy_mudelid.Text, "待办箱", "一般", this.hy_bt.Text, "请阅读", 0, this.hy_flowid.Text, this.txtnexttacheid.Value, this.hy_tableid.Text);
                        //给后续处理人发送即时消息(提醒)
                        if (this.txtisSendjstx_cyr.Value == "1")
                        {
                            Hyoa_global.Sendjstx_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), this.hy_mudelid.Text, this.hy_bt.Text, 0, this.hy_tableid.Text);
                        }
                        //给后续处理人发送短信(提醒)
                        if (this.txtisSendsms_cyr.Value == "1")
                        {
                            Hyoa_global.Sendsms_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), cb_fsrsjh, lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), cb_cyrsjh, this.hy_mudelid.Text, this.hy_bt.Text, 1, "", "", 0, this.hy_tableid.Text);
                        }

                    }
                }
                //--- 创建后续传阅记录+建立待办事宜 ---- end
            }
            ////////////////////如果后续环节选择了“结束”,则不需要发待办事宜和短消息 start//////////////////////

            //--- 当前处理人的待办事宜转已办 ---- start
            Hyoa_dbsy.Dbsytoybbydocidtacheiduserid(this.txtdocid.Value, this.hy_curtacheid.Text, this.Session["hyuid"].ToString());
            //--- 当前处理人的待办事宜转已办 ---- end
            ls_tip = "文档已成功发送到[" + this.txtnexttachename.Value + "]环节";
            sql += hylcclcylist();  //更新hy_clrylist hy_cyrylist edited by xf 20140625
            sql += hylctjtscl();//特殊处理

            //调用添加客户名称的方法
            if (this.hy_mudelid.Text == "MudelVODfwxy" && this.hy_tableid.Text == "TableVODfwxy" || this.hy_mudelid.Text == "Mudelffpdfwht" && this.hy_tableid.Text == "Tableffpdfwht"
             || this.hy_mudelid.Text == "Mudeljdhazfwht" && this.hy_tableid.Text == "Tablejdhazfwht" || this.hy_mudelid.Text == "Mudelsyyhfwxy" && this.hy_tableid.Text == "Tablesyyhfwxy"
             || this.hy_mudelid.Text == "MudelDVBazfwdght" && this.hy_tableid.Text == "TableDVBazfwdght" || this.hy_mudelid.Text == "MudelDVBazfwdght" && this.hy_tableid.Text == "TableDVBazfwdght"
             || this.hy_mudelid.Text == "Mudeljwdsjsxy" && this.hy_tableid.Text == "Tablejwdsjsxy" || this.hy_mudelid.Text == "Mudeljwdscsxy" && this.hy_tableid.Text == "Tablejwdscsxy"
             || this.hy_mudelid.Text == "Mudelkdjrht" && this.hy_tableid.Text == "Tablekdjrht" || this.hy_mudelid.Text == "Mudelsjcsfwht" && this.hy_tableid.Text == "Tablesjcsfwht"
             || this.hy_mudelid.Text == "Mudelsjgdcsfwht" && this.hy_tableid.Text == "Tablesjgdcsfwht" || this.hy_mudelid.Text == "Mudelsjtxyyhzxy" && this.hy_tableid.Text == "Tablesjtxyyhzxy"
             || this.hy_mudelid.Text == "Mudelzdyht" && this.hy_tableid.Text == "Tablezdyht")
            {
                if (this.txtop.Value == "add")
                {
                    Khdaxx();
                }
            }
        }
        #endregion

        #region 收回
        if (this.txtwhichoperation.Value == "3")
        {
            //得到上个环节处理人
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value);
            if (dt_clinfo.Rows.Count > 1)
            {
                //删除当前处理人员的待办事宜
                HyoaClass.Hyoa_dbsy Hyoa_dbsy_sh = new HyoaClass.Hyoa_dbsy();
                //edited by xf 20140625
                string[] lv_temp = dt_clinfo.Rows[0]["hy_clrid"].ToString().Split(',');
                for (int xf = 0; xf < lv_temp.Length; xf++)
                {
                    Hyoa_dbsy_sh.DeleteByDocid_flowid_tacheid_userid(this.txtdocid.Value, dt_clinfo.Rows[0]["hy_flowid"].ToString(), dt_clinfo.Rows[0]["hy_tacheid"].ToString(), lv_temp[xf]);
                }

                string ls_lastclrid = dt_clinfo.Rows[1]["hy_clrid"].ToString();         //上个环节处理人ID
                string ls_lastclrname = dt_clinfo.Rows[1]["hy_clrname"].ToString();     //上个环节处理人中文名
                string ls_lastcldoc = dt_clinfo.Rows[1]["ID"].ToString();               //上个环节处理的记录ID
                string ls_lasttacheid = dt_clinfo.Rows[1]["hy_tacheid"].ToString();     //上个环节处理环节ID
                string ls_lasttachename = dt_clinfo.Rows[1]["hy_tachename"].ToString(); //上个环节处理环节名称
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                dt_clinfo.Clear();

                //删除当前处理的记录
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                Hyoa_flowhistoryinfo_cl.Delete();
                //清空上个环节处理时间,更新创建时间
                Hyoa_flowhistoryinfo_cl.ID = ls_lastcldoc;
                Hyoa_flowhistoryinfo_cl.hy_clsj = "";
                Hyoa_flowhistoryinfo_cl.hy_createtime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                Hyoa_flowhistoryinfo_cl.Update_sh();
                //更新主文档中的当前环节ID、当前环节名称、当前处理人ID和中文名
                sql += ",hy_curtacheid='" + ls_lasttacheid + "'";
                sql += ",hy_curtachename='" + ls_lasttachename + "'";
                sql += ",hy_curclrid='" + ls_lastclrid + "'";
                sql += ",hy_curclrname='" + ls_lastclrname + "'";
                ls_tip = "文档已成功收回到[" + ls_lasttachename + "]环节";
                sql += hylcclcylist();  //更新hy_clrylist hy_cyrylist edited by xf 20140625
                sql += hylcshtscl();//特殊处理
            }
        }
        #endregion

        #region 退回
        if (this.txtwhichoperation.Value == "4")
        {
            //更新主文档
            sql += ",hy_curtacheid='" + this.txtnexttacheid.Value + "'";
            sql += ",hy_curtachename='" + this.txtnexttachename.Value + "'";
            sql += ",hy_curclrid='" + this.txtnextclrid.Value + "'";
            sql += ",hy_curclrname='" + this.txtnextclrname.Value + "'";

            //处理历史处理记录
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value);
            if (dt_clinfo.Rows.Count > 0)
            {
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                string ls_clsj = "";                                                    //当前处理的记录处理时间
                if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "")
                    ls_clsj = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                else
                    ls_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                dt_clinfo.Clear();
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                Hyoa_flowhistoryinfo_cl.hy_clsj = ls_clsj;
                Hyoa_flowhistoryinfo_cl.Update();
            }
            //新建一条处理记录
            Hyoa_global.Saveflowhistoryinfo_cl_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.txtnexttacheid.Value, this.txtnexttachename.Value, this.txtnextclrid.Value, this.txtnextclrname.Value, "", "", "", System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "是");

            //处理待办事宜
            //转已办-当前处理人的待办事宜
            HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            Hyoa_dbsy.Dbsytoybbydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString());

            //得到发送人手机号
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());

            //(考虑多人的情况)
            string[] lv_dbrid = this.txtnextclrid.Value.Split(new Char[] { ',' });
            string[] lv_dbrname = this.txtnextclrname.Value.Split(new Char[] { ',' });

            for (var i = 0; i < lv_dbrid.Length; i++)
            {
                if (lv_dbrid[i].ToString() != "")
                {
                    //得到接收人手机号
                    string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(lv_dbrid[i].ToString());
                    HyoaClass.Hyoa_global Hyoa_global2 = new HyoaClass.Hyoa_global();

                    //给退回到的处理人发送一个新的待办事宜(提醒)
                    Hyoa_global2.Senddbsy_global(this.txtdocid.Value, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1", "待办", this.hy_mudelid.Text, "待办箱", "一般", this.hy_bt.Text, "请办理", 0, this.hy_flowid.Text, this.txtnexttacheid.Value, this.hy_tableid.Text);
                    //给退回到的处理人发送即时消息(提醒)
                    if (this.txtisSendjstx.Value == "1")
                    {
                        Hyoa_global.Sendjstx_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.hy_mudelid.Text, this.hy_bt.Text, 0, this.hy_tableid.Text);
                    }
                    //给退回到的处理人发送短信(提醒)
                    if (this.txtisSendsms.Value == "1")
                    {
                        Hyoa_global.Sendsms_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), cb_fsrsjh, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_jsrsjh, this.hy_mudelid.Text, this.hy_bt.Text, 1, "", "", 0, this.hy_tableid.Text);
                    }
                }
            }
            ls_tip = "已成功退回到[" + this.txtnexttachename.Value + "]环节";
            sql += hylcthtscl();//特殊处理
        }
        #endregion

        #region 多人处理
        if (this.txtwhichoperation.Value == "5")
        {
            //更新主文档
            string ls_newclrid = Hyoa_global.MoveOneString_dh(this.hy_curclrid.Text, this.Session["hyuid"].ToString());
            string ls_newclrname = Hyoa_global.MoveOneString_dh(this.hy_curclrname.Text, this.Session["hyuname"].ToString());
            sql += ",hy_curclrid='" + ls_newclrid + "'";
            sql += ",hy_curclrname='" + ls_newclrname + "'";
            //处理当前记录
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = new DataTable();
            dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value);
            if (dt_clinfo.Rows.Count > 0)
            {
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                string ls_clsj = "";                                                    //当前处理的记录处理时间
                if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "")
                    ls_clsj = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                else
                    ls_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                dt_clinfo.Clear();
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                Hyoa_flowhistoryinfo_cl.hy_clsj = ls_clsj;
                Hyoa_flowhistoryinfo_cl.Update();
            }
            //处理待办事宜
            //转已办-当前处理人的待办事宜
            HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            Hyoa_dbsy.Dbsytoybbydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString());
            ls_tip = "提交成功,当前环节还需要[" + ls_newclrname + "]进行办理";
            sql += hylcdrcltscl();//特殊处理
        }
        #endregion

        #region 催办
        if (this.txtwhichoperation.Value == "6")
        {
            string cb_docid = this.txtdocid.Value;
            string cb_dbrid = this.hy_curclrid.Text;
            string cb_dbrname = this.hy_curclrname.Text;
            string cb_fsrid = this.Session["hyuid"].ToString();
            string cb_fsrname = this.Session["hyuname"].ToString();
            string cb_url = "main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1";
            string cb_property = "催办";
            string cb_mudelid = this.hy_mudelid.Text;
            string cb_foldername = "待办箱";
            string cb_hj = "一般";
            string cb_bt = this.txtcbideas.Value + "-" + this.hy_bt.Text;
            string cb_subbt = "请阅读";
            float cb_ifyb = 0;
            string cb_flowid = this.hy_flowid.Text;
            string cb_tacheid = this.hy_curtacheid.Text;
            string cb_from = this.hy_mudelid.Text;

            //得到发送人手机号
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(cb_fsrid);
            //得到接收人手机号
            string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(cb_dbrid);

            //给当前处理人发送一个新的待办事宜(提醒)
            Hyoa_global.Senddbsy_global(cb_docid, cb_dbrid, cb_dbrname, cb_fsrid, cb_fsrname, cb_url, cb_property, cb_mudelid, cb_foldername, cb_hj, cb_bt, cb_subbt, cb_ifyb, cb_flowid, cb_tacheid, this.hy_tableid.Text);
            //给当前处理人发送即时消息(提醒)
            if (this.txtisSendjstx.Value == "1")
            {
                Hyoa_global.Sendjstx_global(cb_docid, cb_fsrid, cb_fsrname, cb_dbrid, cb_dbrname, cb_from, cb_bt, 0, this.hy_tableid.Text);
            }
            //给当前处理人发送短信(提醒)
            if (this.txtisSendsms.Value == "1")
            {
                Hyoa_global.Sendsms_global(cb_docid, cb_fsrid, cb_fsrname, cb_fsrsjh, cb_dbrid, cb_dbrname, cb_jsrsjh, cb_from, cb_bt, 1, "", "", 0, this.hy_tableid.Text);
            }

            ls_tip = "催办成功!";
            sql += hylccbtscl();//特殊处理
        }
        #endregion

        #region 流程结束时的提交
        if (this.txtwhichoperation.Value == "7")
        {
            //更新主文档
            sql += ",hy_curtacheid='**'";
            sql += ",hy_curtachename='结束'";
            sql += ",hy_curclrid=''";
            sql += ",hy_curclrname=''";
            //更新处理表
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value);
            if (dt_clinfo.Rows.Count > 0)
            {
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                string ls_clsj = "";                                                    //当前处理的记录处理时间
                if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "")
                    ls_clsj = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                else
                    ls_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                dt_clinfo.Clear();
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                Hyoa_flowhistoryinfo_cl.hy_clsj = ls_clsj;
                Hyoa_flowhistoryinfo_cl.Update();

                //开票流程中开票在流程结束时付款处理。
                if (this.hy_tableid.Text == "Tablefpbd")
                {
                    htfk();
                }
            }
            ////流程结束时删除所有该文档对应的待办事宜
            //HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            //Hyoa_dbsy.Deletebydocid(this.txtdocid.Value);

            //处理待办事宜
            //转已办-当前处理人的待办事宜
            HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            Hyoa_dbsy.Dbsytoybbydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString());

            ls_tip = "流程结束!";
            sql += hylcjstscl();//特殊处理
        }

        #endregion

        #region 收文阅件分发
        if (this.txtwhichoperation.Value == "8")
        {
            string cb_docid = this.txtdocid.Value;
            string cb_dbrid = this.hy_curclrid.Text;
            string cb_dbrname = this.hy_curclrname.Text;
            string cb_fsrid = this.Session["hyuid"].ToString();
            string cb_fsrname = this.Session["hyuname"].ToString();
            string cb_url = "main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1";
            string cb_property = "待阅";
            string cb_mudelid = this.hy_mudelid.Text;
            string cb_foldername = "待办箱";
            string cb_hj = "一般";
            string cb_bt = this.hy_bt.Text;
            string cb_subbt = "请阅读";
            float cb_ifyb = 0;
            string cb_flowid = this.hy_flowid.Text;
            string cb_tacheid = this.hy_curtacheid.Text;
            string cb_from = this.hy_mudelid.Text;

            string[] lv_dbrid = this.txtswly_dbsy_userids.Text.Split(new Char[] { '+' });
            string[] lv_dbrname = this.txtswly_dbsy_usernames.Text.Split(new Char[] { '+' });
            for (var i = 0; i < lv_dbrid.Length; i++)
            {
                if (lv_dbrid[i].ToString() != "")
                {
                    //得到当前用户手机号
                    HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                    string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());
                    //得到后续处理人手机号
                    string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(lv_dbrid[i].ToString());

                    //给后续处理人发送一个新的待办事宜(提醒)
                    Hyoa_global.Senddbsy_global(cb_docid, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_fsrid, cb_fsrname, cb_url, cb_property, cb_mudelid, cb_foldername, cb_hj, cb_bt, cb_subbt, 0, cb_flowid, cb_tacheid, this.hy_tableid.Text);
                    //给后续处理人发送即时消息(提醒)
                    Hyoa_global.Sendjstx_global(cb_docid, cb_fsrid, cb_fsrname, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_mudelid, cb_bt, 0, this.hy_tableid.Text);
                    //给后续处理人发送短信(提醒)
                    Hyoa_global.Sendsms_global(cb_docid, cb_fsrid, cb_fsrname, cb_fsrsjh, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_jsrsjh, cb_mudelid, cb_bt, 1, "", "", 0, this.hy_tableid.Text);

                    //在hyp_flowhistoryinfo_cy中添加传阅信息
                    string sql_cy = "select * from hyp_flowhistoryinfo_cy where DOCID='" + this.txtdocid.Value + "' and hy_cyrid='" + lv_dbrid[i] + "' order by hy_createtime DESC ";
                    DataTable dt_cy = Hyoa_global.GetDataTable(sql_cy);
                    if (dt_cy.Rows.Count > 0)
                    {
                    }
                    else
                    {
                        HyoaClass.Hyoa_flowhistoryinfo_cy Hyoa_flowhistoryinfo_cy = new HyoaClass.Hyoa_flowhistoryinfo_cy();
                        Hyoa_flowhistoryinfo_cy.ID = Hyoa_global.GetRandom();
                        Hyoa_flowhistoryinfo_cy.DOCID = this.txtdocid.Value;
                        Hyoa_flowhistoryinfo_cy.hy_flowid = this.hy_flowid.Text;
                        Hyoa_flowhistoryinfo_cy.hy_flowname = this.hy_flowname.Text;
                        Hyoa_flowhistoryinfo_cy.hy_tacheid = this.hy_curtacheid.Text;
                        Hyoa_flowhistoryinfo_cy.hy_tachename = this.hy_curtachename.Text;
                        Hyoa_flowhistoryinfo_cy.hy_cyrid = lv_dbrid[i];
                        Hyoa_flowhistoryinfo_cy.hy_cyrname = lv_dbrname[i];
                        Hyoa_flowhistoryinfo_cy.hy_ydsj = "";
                        Hyoa_flowhistoryinfo_cy.hy_createtime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                        Hyoa_flowhistoryinfo_cy.Insert();
                    }
                }
            }
            //在当前环节处理的记录中添加传阅信息,主要用于列表的显示控制
            string sql_cl = "select * from hyp_flowhistoryinfo_cl where DOCID='" + this.txtdocid.Value + "' order by hy_createtime DESC ";
            DataTable dt_cl = Hyoa_global.GetDataTable(sql_cl);
            if (dt_cl.Rows.Count > 0)
            {
                if (dt_cl.Rows[0]["hy_cyrid"].ToString() == "")
                {
                    sql_cl = "update hyp_flowhistoryinfo_cl set hy_cyrid='" + this.txtswly_dbsy_userids.Text.Replace("+", ",") + "',hy_cyrname='" + this.txtswly_dbsy_usernames.Text.Replace("+", ",") + "' where ID='" + dt_cl.Rows[0]["ID"].ToString() + "'";
                    Hyoa_global.ExcuteSQL(sql_cl);
                }
                else
                {
                    if (Session["conntype"].ToString() == "SQL")
                    {
                        sql_cl = "update hyp_flowhistoryinfo_cl set hy_cyrid=hy_cyrid+'," + this.txtswly_dbsy_userids.Text.Replace("+", ",") + "',hy_cyrname=hy_cyrname+'," + this.txtswly_dbsy_usernames.Text.Replace("+", ",") + "' where ID='" + dt_cl.Rows[0]["ID"].ToString() + "'";
                    }
                    if (Session["conntype"].ToString() == "ORACLE")
                    {
                        sql_cl = "update hyp_flowhistoryinfo_cl set hy_cyrid=CONCAT(hy_cyrid,'," + this.txtswly_dbsy_userids.Text.Replace("+", ",") + "'),hy_cyrname=CONCAT(hy_cyrname,'," + this.txtswly_dbsy_usernames.Text.Replace("+", ",") + ")' where ID='" + dt_cl.Rows[0]["ID"].ToString() + "'";
                    }
                    Hyoa_global.ExcuteSQL(sql_cl);
                }
            }
            ls_tip = "阅件分发成功!";
            sql += hylcclcylist();  //更新hy_clrylist hy_cyrylist edited by xf 20140625
        }
        #endregion

        //20140809 hjadd start
        #region 收发文分发
        if (this.txtwhichoperation.Value == "11")
        {
            string cb_docid = this.txtdocid.Value;
            string cb_dbrid = this.hy_curclrid.Text;
            string cb_dbrname = this.hy_curclrname.Text;
            string cb_fsrid = this.Session["hyuid"].ToString();
            string cb_fsrname = this.Session["hyuname"].ToString();
            string cb_url = "main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1";
            string cb_property = "待阅";
            string cb_mudelid = this.hy_mudelid.Text;
            string cb_foldername = "待办箱";
            string cb_hj = "一般";
            string cb_bt = this.hy_bt.Text;
            string cb_subbt = "请阅读";
            float cb_ifyb = 0;
            string cb_flowid = this.hy_flowid.Text;
            string cb_tacheid = this.hy_curtacheid.Text;
            string cb_from = this.hy_mudelid.Text;

            string[] lv_dbrid = this.txtffly_dbsy_userids.Text.Split(new Char[] { '+' });
            string[] lv_dbrname = this.txtffly_dbsy_usernames.Text.Split(new Char[] { '+' });
            for (var i = 0; i < lv_dbrid.Length; i++)
            {
                if (lv_dbrid[i].ToString() != "")
                {
                    //得到当前用户手机号
                    HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                    string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());
                    //得到后续处理人手机号
                    string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(lv_dbrid[i].ToString());

                    //给后续处理人发送一个新的待办事宜(提醒)
                    Hyoa_global.Senddbsy_global(cb_docid, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_fsrid, cb_fsrname, cb_url, cb_property, cb_mudelid, cb_foldername, cb_hj, cb_bt, cb_subbt, 0, cb_flowid, cb_tacheid, this.hy_tableid.Text);
                    //给后续处理人发送即时消息(提醒)
                    Hyoa_global.Sendjstx_global(cb_docid, cb_fsrid, cb_fsrname, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_mudelid, cb_bt, 0, this.hy_tableid.Text);
                    //给后续处理人发送短信(提醒)
                    Hyoa_global.Sendsms_global(cb_docid, cb_fsrid, cb_fsrname, cb_fsrsjh, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_jsrsjh, cb_mudelid, cb_bt, 1, "", "", 0, this.hy_tableid.Text);

                    //在hyp_flowhistoryinfo_cy中添加传阅信息
                    string sql_cy = "select * from hyp_flowhistoryinfo_cy where DOCID='" + this.txtdocid.Value + "' and hy_cyrid='" + lv_dbrid[i] + "' order by hy_createtime DESC ";
                    DataTable dt_cy = Hyoa_global.GetDataTable(sql_cy);
                    if (dt_cy.Rows.Count > 0)
                    {
                    }
                    else
                    {
                        HyoaClass.Hyoa_flowhistoryinfo_cy Hyoa_flowhistoryinfo_cy = new HyoaClass.Hyoa_flowhistoryinfo_cy();
                        Hyoa_flowhistoryinfo_cy.ID = Hyoa_global.GetRandom();
                        Hyoa_flowhistoryinfo_cy.DOCID = this.txtdocid.Value;
                        Hyoa_flowhistoryinfo_cy.hy_flowid = this.hy_flowid.Text;
                        Hyoa_flowhistoryinfo_cy.hy_flowname = this.hy_flowname.Text;
                        Hyoa_flowhistoryinfo_cy.hy_tacheid = this.hy_curtacheid.Text;
                        Hyoa_flowhistoryinfo_cy.hy_tachename = this.hy_curtachename.Text;
                        Hyoa_flowhistoryinfo_cy.hy_cyrid = lv_dbrid[i];
                        Hyoa_flowhistoryinfo_cy.hy_cyrname = lv_dbrname[i];
                        Hyoa_flowhistoryinfo_cy.hy_ydsj = "";
                        Hyoa_flowhistoryinfo_cy.hy_createtime = System.DateTime.Now.ToString();
                        Hyoa_flowhistoryinfo_cy.Insert();
                    }
                }
            }

            ls_tip = "分发成功!";
        }
        #endregion
        //20140809 hj add end

        #region 在主表单内嵌列表的功能中,保存、提交和确认子表单时,需要将父文档的DOCID保存到当前记录的hy_motherid中
        //ADD BY XF 2011-11-17
        if (this.txtwhichoperation.Value == "1" || this.txtwhichoperation.Value == "2" || this.txtwhichoperation.Value == "111")
        {
            if (Request.QueryString["op"] != null)
            {
                if (Request.QueryString["op"].ToString() != "")
                {
                    if (Request.QueryString["motherid"] != null)
                    {
                        if (Request.QueryString["motherid"].ToString() != "")
                        {
                            sql += ",hy_motherid='" + Request.QueryString["motherid"].ToString() + "'";
                        }
                    }
                }
            }
        }
        #endregion

        sql += " where DOCID='" + this.txtdocid.Value + "'";
        Hyoa_global.ExcuteSQL(sql);

        #region 处理完成后的提示及跳转(增加刷新附件功能)
        if (this.txtifsxfj.Text == "1")
        {
            Response.Write("<script>window.location='main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&url=" + this.txturl.Value + "'</script>");
        }
        else
        {

            if (this.txturl.Value == "2")
            {

                Response.Write("<script>alert('" + ls_tip + "');try{window.opener.location.reload();}catch(err){}self.close();parent.location.reload();</script>");
            }
            else
                if (this.txtifpop.Value == "")
            {
                if (this.hy_tableid.Text == "Tablefpbd")
                {
                    Response.Write("<script>alert('" + ls_tip + "');window.location='list_myadd.aspx?mid=Mudelfp&tableid=Tablefpbd&listid=6b07b57d-2906-4f5b-bc47-a8c7754ea5bf&rnd=afc25663-de8a-43ba-bc48-db224b3e5c92'</script>");
                }
                else
                {
                    Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
                }
            }
            else
            {
                Response.Write("<script>alert('" + ls_tip + "');try{window.opener.location.reload();}catch(err){}self.close();</script>");
            }
        }
        #endregion
    }
예제 #26
0
 //补充意见add by xf 2013-6-24
 protected void Button_BcyjSave_Click(object sender, EventArgs e)
 {
     if (this.txtbcyj.Text.Trim() == "")
     {
         Response.Write("<script>alert('补充意见内容不能为空!');</script>");
         return;
     }
     else
     {
         //保存补充意见
         HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
         HyoaClass.Hyoa_bcyj Hyoa_bcyj = new HyoaClass.Hyoa_bcyj();
         Hyoa_bcyj.bcid = Hyoa_global.GetRandom();
         Hyoa_bcyj.hy_tableid = this.hy_tableid.Text;
         Hyoa_bcyj.hy_fatherid = this.txtdocid.Value;
         Hyoa_bcyj.hy_bcuserid = Session["hyuid"].ToString();
         Hyoa_bcyj.hy_bcusername = Session["hyuname"].ToString();
         Hyoa_bcyj.hy_bcdeptid = Session["hydeptid"].ToString();
         Hyoa_bcyj.hy_bcdeptname = Session["hydeptname"].ToString();
         Hyoa_bcyj.hy_bctime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
         this.txtbcyj_hidden.Text = ReplaceString_Tszf(this.txtbcyj_hidden.Text);
         Hyoa_bcyj.hy_bcbody = this.txtbcyj_hidden.Text;
         Hyoa_bcyj.hy_bcip = HttpContext.Current.Request.UserHostAddress;
         Hyoa_bcyj.hy_bcifshow = "";
         Hyoa_bcyj.Insert();
         Response.Write("<script>alert('补充意见保存成功!');window.location='" + this.Request.Url.ToString() + "'</script>");    //这个返回路径的页面,点返回按钮会有问题.已办转在办用的返回到了列表
     }
 }
예제 #27
0
파일: main.aspx.cs 프로젝트: wjszxli/Webapp
    //加载主表单    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的特殊处理
            }
        }
    }
예제 #28
0
    private void DataPlay()
    {
        this.fdCurrentSysUser.Value = this.Session["hyuid"].ToString();
        this.fdCurrentUserCh.Value = this.Session["hyuname"].ToString();
        this.fdCurrentTime.Value = System.DateTime.Now.ToString();

        HyoaClass.Hyoa_publicidea Hyoa_publicidea = new HyoaClass.Hyoa_publicidea();
        DataTable dt = Hyoa_publicidea.Getpublicideas();
        if (dt.Rows.Count > 0)
        {
            this.fdListCommonIdeas.DataSource = dt;
            this.fdListCommonIdeas.DataTextField = "hy_idea";
            this.fdListCommonIdeas.DataValueField = "hy_idea";
            this.fdListCommonIdeas.DataBind();
            this.fdListCommonIdeas.SelectedIndex = 0;
        }
        HyoaClass.Hyoa_myidea Hyoa_myidea = new HyoaClass.Hyoa_myidea();
        DataTable dt2 = Hyoa_myidea.Getideasbyuserid(this.Session["hyuid"].ToString());
        if (dt2.Rows.Count > 0)
        {
            this.fdListCommonIdeas_Personal.DataSource = dt2;
            this.fdListCommonIdeas_Personal.DataTextField = "hy_idea";
            this.fdListCommonIdeas_Personal.DataValueField = "hy_idea";
            this.fdListCommonIdeas_Personal.DataBind();
            this.fdListCommonIdeas_Personal.SelectedIndex = 0;
        }
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (this.txtop.Value == "add")
        {
            this.txtid.Value = Hyoa_global.GetRandom();
        }
    }
예제 #29
0
    //收藏
    protected void btnscinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_gwksc Hyoa_gwksc = new HyoaClass.Hyoa_gwksc();
        String[] v_uids = this.txtuids.Value.Split(',');

        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                Hyoa_gwksc.ID = Hyoa_global.GetRandom();
                Hyoa_gwksc.gwk_id = v_uids[i];
                Hyoa_gwksc.myclass_id = this.txtsctypeid.Value;
                Hyoa_gwksc.myuserid = Session["hyuid"].ToString();
                Hyoa_gwksc.Insert();
            }
        }
        this.txtuids.Value = "";
        this.Response.Write("<script>alert('收藏成功!');</script>");
        DataPlay(System.Int32.Parse(this.curpage.Text));
    }
예제 #30
0
    //输出一个字段
    //li_tdnums_onerow:当前行已输出了几列
    //li_colnums_show:每行显示几列(标准情况下)
    //pi_isnewdoc 0:新文档  1:旧文档
    //ifhavarole:表单上是否有权限  0:lable输出 1:input输出
    //ifflowdoc:是否流程表单 0:非流程 1:流程
    //curtacheid:当前环节ID,用于判断字段是否在当前环节有权限
    public int GetFieldHtml(TableRow tRow, int li_tdnums_onerow, int li_colnums_show, string hy_fieldid, string pi_isnewdoc, string ifhavarole, string ifflowdoc, string curtacheid)
    {
        int li_return = li_tdnums_onerow;

        string ls_laborinput = "0";     //输出LABLE还是INPUT    0:LABLE    1:INPUT
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dtfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(this.hy_mudelid.Text, hy_fieldid, this.hy_tableid.Text);

        if (dtfield.Rows.Count > 0)
        {
            string field_type = dtfield.Rows[0]["hy_fieldtype"].ToString();     //字段类型
            if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() != "5")   //如果设置了不显示左侧说明文字,则不加载左侧列
            {
                li_return += 1;
                //插入单元格(左侧)
                TableCell tCell = new TableCell();
                tRow.Cells.Add(tCell);
                tCell.Width = Unit.Percentage((30 / li_colnums_show));
                tCell.Height = Unit.Pixel(40);
                tCell.CssClass = "Tdcellleft";
                tCell.HorizontalAlign = HorizontalAlign.Center;
                tCell.Controls.Add(new LiteralControl(dtfield.Rows[0]["hy_fieldname"].ToString()));
            }
            //插入单元格(右侧)
            TableCell tCell2 = new TableCell();
            tRow.Cells.Add(tCell2);
            tCell2.Width = Unit.Percentage((70 / li_colnums_show));
            tCell2.Height = Unit.Pixel(40);
            tCell2.CssClass = "Tdcellright";
            if (dtfield.Rows[0]["hy_align"].ToString() == "left")
            {
                tCell2.HorizontalAlign = HorizontalAlign.Left;
            }
            if (dtfield.Rows[0]["hy_align"].ToString() == "center")
            {
                tCell2.HorizontalAlign = HorizontalAlign.Center;
            }
            if (dtfield.Rows[0]["hy_align"].ToString() == "right")
            {
                tCell2.HorizontalAlign = HorizontalAlign.Right;
            }
            tCell2.ColumnSpan = int.Parse(dtfield.Rows[0]["hy_tdnums"].ToString());
            li_return += int.Parse(dtfield.Rows[0]["hy_tdnums"].ToString());

            //赋值(新文档取配置的默认值,旧文档取数据库表中的值)
            string field_docvalue = "";
            if (pi_isnewdoc == "0")     //新文档
            {
                if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() != "-1")
                {
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "0")
                    {
                        field_docvalue = dtfield.Rows[0]["hy_defaultvalue"].ToString();     //手工配置
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "1")
                    {
                        DataTable dt_getfieldvalue = Hyoa_global.GetDataTable(dtfield.Rows[0]["hy_defaultvalue"].ToString());
                        field_docvalue = dt_getfieldvalue.Rows[0][0].ToString();     //SQL语句
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "2")
                    {
                        field_docvalue = Session[dtfield.Rows[0]["hy_defaultvalue"].ToString()].ToString();     //SESSION
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "3")
                    {
                        if (dtfield.Rows[0]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                            field_docvalue = System.DateTime.Now.ToString("yyyy-MM-dd");     //当前时间
                        else
                            field_docvalue = System.DateTime.Now.ToString("yyyy-MM-dd HH:MM:ss");     //当前时间
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "4")
                    {
                        //自动生成
                        if (dtfield.Rows[0]["hy_fieldtype"].ToString() == "数值")
                        {
                            //得到目前最大的数值,然后+1,未找到则赋值为1
                            DataTable dt_autovalue = Hyoa_global.GetDataTable("select max(hyc_" + hy_fieldid + ") maxint from hyc_" + this.hy_tableid.Text);
                            if (dt_autovalue.Rows[0]["maxint"].ToString() == null || dt_autovalue.Rows[0]["maxint"].ToString() == "")
                                field_docvalue += "1";
                            else
                                field_docvalue += (System.Int32.Parse(dt_autovalue.Rows[0]["maxint"].ToString()) + 1).ToString();
                        }
                        else
                        {
                            field_docvalue += System.Guid.NewGuid().ToString();
                        }
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "5")
                    {
                        field_docvalue += dtfield.Rows[0]["hy_defaultvalue"].ToString();
                    }
                }
            }
            else
            {
                if (field_type == "文本" || field_type == "多行文本" || field_type == "多行文本_TEXT" || field_type == "文本加按钮" || field_type == "多行文本加按钮" || field_type == "日期" || field_type == "数值" || field_type == "对话框列表" || field_type == "复选框" || field_type == "单选框" || field_type == "口令" || field_type == "编辑器")
                {
                    string ls_sql = "select hyc_" + hy_fieldid + " from hyc_" + this.hy_tableid.Text + " where DOCID='" + this.txtdocid.Value + "'";
                    DataTable dt_getdocvalue = Hyoa_global.GetDataTable(ls_sql);
                    if (dt_getdocvalue.Rows.Count > 0)
                    {
                        field_docvalue = dt_getdocvalue.Rows[0][0].ToString();
                        if (field_type == "日期")
                        {
                            if (field_docvalue.Length > 8)
                            {
                                if (field_docvalue.Substring(0, 8) == "1900-1-1")
                                {
                                    field_docvalue = "&nbsp;";
                                }
                                else
                                {
                                    if (dtfield.Rows[0]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                                    {
                                        field_docvalue = System.DateTime.Parse(field_docvalue).ToString("yyyy-MM-dd");
                                    }
                                }
                            }
                        }
                    }
                }
                if (field_type == "说明文字")
                {
                    field_docvalue += dtfield.Rows[0]["hy_defaultvalue"].ToString();
                }
                if (field_type == "意见加按钮")
                {
                    HyoaClass.Hyoa_yj Hyoa_yj = new HyoaClass.Hyoa_yj();
                    DataTable dt_yj = Hyoa_yj.Getyjsbydocidandfieldid_sx(this.txtdocid.Value, hy_fieldid);
                    if (dt_yj.Rows.Count > 0)
                    {
                        field_docvalue = "";
                        for (int ii = 0; ii < dt_yj.Rows.Count; ii++)
                        {
                            String ls_edit = "";
                            if (dt_yj.Rows[ii]["hy_yjuserid"].ToString() == Session["hyuid"].ToString())
                            {
                                String ls_rnd = Hyoa_global.GetRandom();
                                ls_edit = "<input type=\"button\" id=\"" + ls_rnd + "\" name=\"" + ls_rnd + "\" value=\"修 改\" class=\"btn3\" onclick=\"sNextWindow='status=no,resizable=no,scrollbars=no,screenX=0,screenY=0,width=600,height=450,left=150,top=150';var s_url ='ggdy/Hy_qpyj_edit.aspx?id=" + dt_yj.Rows[ii]["yjid"].ToString() + "&rnd=" + ls_rnd + "';var qpyj=window.open(s_url,'ideas',sNextWindow);qpyj.moveTo(150,150);qpyj.focus();\"  />";
                                ls_edit += "<input type=\"button\" id=\"" + ls_rnd + "_del\" name=\"" + ls_rnd + "_del\" value=\"删 除\" class=\"btn3\" onclick=\"sNextWindow='status=no,resizable=no,scrollbars=no,screenX=0,screenY=0,width=600,height=450,left=150,top=150';var s_url ='ggdy/Hy_qpyj_del.aspx?id=" + dt_yj.Rows[ii]["yjid"].ToString() + "&rnd=" + ls_rnd + "';var qpyj=window.open(s_url,'ideas',sNextWindow);qpyj.moveTo(150,150);qpyj.focus();\"  />";
                            }
                            field_docvalue += dt_yj.Rows[ii]["hy_yjbody"].ToString() + "(" + dt_yj.Rows[ii]["hy_yjusername"].ToString() + " " + System.DateTime.Parse(dt_yj.Rows[ii]["hy_yjtime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss") + ")" + ls_edit + "<br/>";
                        }
                    }
                }
            }

            //判断是输出LABL还是INPUT
            if (pi_isnewdoc == "0")     //新文档
            {
                if (ifflowdoc == "0")   //非流程
                {
                    if (ifhavarole == "1")  //有权限
                    {
                        ls_laborinput = "1";
                    }
                }
                else
                {
                    if (ifhavarole == "1")  //有权限
                    {
                        //有流程(判断当前环节这个字段是否有权限)
                        HyoaClass.Hyoa_flowtachefield Hyoa_flowtachefield = new HyoaClass.Hyoa_flowtachefield();
                        ls_laborinput = Hyoa_flowtachefield.IfHaveRolebyflowidandtacheidandfieldid(hy_flowid.Text, curtacheid, hy_fieldid);
                        if (ls_laborinput == "0")
                        {
                            field_docvalue = "";
                        }
                    }
                    else
                    {
                        field_docvalue = "";
                    }
                }
            }
            else     //旧文档
            {
                if (ifflowdoc == "0")   //非流程
                {
                    if (ifhavarole == "1")  //有权限
                    {
                        ls_laborinput = "1";
                        //如果文档已经确认,则输出lable
                        string ls_sql = "select hy_ifconfirm from hyc_" + this.hy_tableid.Text + " where DOCID='" + this.txtdocid.Value + "'";
                        DataTable dt_getifconfirm = Hyoa_global.GetDataTable(ls_sql);
                        if (dt_getifconfirm.Rows.Count > 0)
                        {
                            if(dt_getifconfirm.Rows[0]["hy_ifconfirm"].ToString()=="1")
                                ls_laborinput = "0";
                        }
                    }
                }
                else
                {
                    if (ifhavarole == "1")  //有权限
                    {
                        //有流程(判断当前环节这个字段是否有权限)
                        HyoaClass.Hyoa_flowtachefield Hyoa_flowtachefield = new HyoaClass.Hyoa_flowtachefield();
                        ls_laborinput = Hyoa_flowtachefield.IfHaveRolebyflowidandtacheidandfieldid(hy_flowid.Text, curtacheid, hy_fieldid);
                        //如果流程结束了,则输出lable
                        if (hy_curtacheid.Text == "**")
                        {
                            ls_laborinput = "0";
                        }
                    }
                }
            }

            //如果是输出LABLE,值为空则赋为&nbsp;不为空时需要转换回车和空格
            if (ls_laborinput == "0")
            {
                if (field_docvalue == "")
                {
                    field_docvalue = "&nbsp;";
                }
                else
                {
                    if (field_type != "编辑器")
                    {
                        field_docvalue = RtfToText(field_docvalue);
                    }
                }
            }

            //单行文本
            if (field_type == "文本")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    TextBox txtTextBox = new TextBox();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    if (dtfield.Rows[0]["hy_ifreadonly"].ToString() == "是")
                    {
                        txtTextBox.ReadOnly = true;
                    }
                    if (dtfield.Rows[0]["hy_class"].ToString() != "")
                    {
                        txtTextBox.CssClass = dtfield.Rows[0]["hy_class"].ToString();
                    }
                    if (dtfield.Rows[0]["hy_width"].ToString() != "")
                    {
                        txtTextBox.Width = Unit.Parse(dtfield.Rows[0]["hy_width"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_height"].ToString() != "")
                    {
                        txtTextBox.Height = Unit.Parse(dtfield.Rows[0]["hy_height"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onclick", dtfield.Rows[0]["hy_onclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_ondblclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("ondblclick", dtfield.Rows[0]["hy_ondblclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onchange"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onchange", dtfield.Rows[0]["hy_onchange"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onkeydown"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onkeydown", dtfield.Rows[0]["hy_onkeydown"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onkeyup"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onkeyup", dtfield.Rows[0]["hy_onkeyup"].ToString());
                    }
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
            }
            //多行文本
            if (field_type == "多行文本")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    TextBox txtTextBox = new TextBox();
                    txtTextBox.TextMode = TextBoxMode.MultiLine;
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    if (dtfield.Rows[0]["hy_ifreadonly"].ToString() == "是")
                    {
                        txtTextBox.ReadOnly = true;
                    }
                    if (dtfield.Rows[0]["hy_class"].ToString() != "")
                    {
                        txtTextBox.CssClass = dtfield.Rows[0]["hy_class"].ToString();
                    }
                    if (dtfield.Rows[0]["hy_width"].ToString() != "")
                    {
                        txtTextBox.Width = Unit.Parse(dtfield.Rows[0]["hy_width"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_height"].ToString() != "")
                    {
                        txtTextBox.Height = Unit.Parse(dtfield.Rows[0]["hy_height"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onclick", dtfield.Rows[0]["hy_onclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_ondblclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("ondblclick", dtfield.Rows[0]["hy_ondblclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onchange"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onchange", dtfield.Rows[0]["hy_onchange"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onkeydown"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onkeydown", dtfield.Rows[0]["hy_onkeydown"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onkeyup"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onkeyup", dtfield.Rows[0]["hy_onkeyup"].ToString());
                    }
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
            }
            //多行文本_TEXT
            if (field_type == "多行文本_TEXT")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    TextBox txtTextBox = new TextBox();
                    txtTextBox.TextMode = TextBoxMode.MultiLine;
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    if (dtfield.Rows[0]["hy_ifreadonly"].ToString() == "是")
                    {
                        txtTextBox.ReadOnly = true;
                    }
                    if (dtfield.Rows[0]["hy_class"].ToString() != "")
                    {
                        txtTextBox.CssClass = dtfield.Rows[0]["hy_class"].ToString();
                    }
                    if (dtfield.Rows[0]["hy_width"].ToString() != "")
                    {
                        txtTextBox.Width = Unit.Parse(dtfield.Rows[0]["hy_width"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_height"].ToString() != "")
                    {
                        txtTextBox.Height = Unit.Parse(dtfield.Rows[0]["hy_height"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onclick", dtfield.Rows[0]["hy_onclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_ondblclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("ondblclick", dtfield.Rows[0]["hy_ondblclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onchange"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onchange", dtfield.Rows[0]["hy_onchange"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onkeydown"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onkeydown", dtfield.Rows[0]["hy_onkeydown"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onkeyup"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onkeyup", dtfield.Rows[0]["hy_onkeyup"].ToString());
                    }
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
            }
            //按钮
            if (field_type == "按钮")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = "&nbsp;";
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    field_docvalue = "<input type=button id='btn_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "' value='" + dtfield.Rows[0]["hy_fieldname"].ToString() + "' class=btn3 onclick=\"" + dtfield.Rows[0]["hy_onclick"].ToString() + "\" />";
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
            }
            //一直显示的按钮
            if (field_type == "一直显示的按钮")
            {
                //-----开始输出字段------
                Label txtTextBox = new Label();
                txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                field_docvalue = "<input type=button id='btn_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "' value='" + dtfield.Rows[0]["hy_fieldname"].ToString() + "' class=btn3 onclick=\"" + dtfield.Rows[0]["hy_onclick"].ToString() + "\" />";
                txtTextBox.Text = field_docvalue;
                tCell2.Controls.Add(txtTextBox);
            }
            //日期
            if (field_type == "日期")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    TextBox txtTextBox = new TextBox();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    if (dtfield.Rows[0]["hy_ifreadonly"].ToString() == "是")
                    {
                        txtTextBox.ReadOnly = true;
                    }
                    if (dtfield.Rows[0]["hy_class"].ToString() != "")
                    {
                        txtTextBox.CssClass = dtfield.Rows[0]["hy_class"].ToString();
                    }
                    if (dtfield.Rows[0]["hy_width"].ToString() != "")
                    {
                        txtTextBox.Width = Unit.Parse(dtfield.Rows[0]["hy_width"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_height"].ToString() != "")
                    {
                        txtTextBox.Height = Unit.Parse(dtfield.Rows[0]["hy_height"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onclick", dtfield.Rows[0]["hy_onclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_ondblclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("ondblclick", dtfield.Rows[0]["hy_ondblclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onchange"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onchange", dtfield.Rows[0]["hy_onchange"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onkeydown"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onkeydown", dtfield.Rows[0]["hy_onkeydown"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onkeyup"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onkeyup", dtfield.Rows[0]["hy_onkeyup"].ToString());
                    }
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
            }
            //文本加按钮
            if (field_type == "文本加按钮")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    TextBox txtTextBox = new TextBox();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    if (dtfield.Rows[0]["hy_ifreadonly"].ToString() == "是")
                    {
                        txtTextBox.ReadOnly = true;
                    }
                    if (dtfield.Rows[0]["hy_class"].ToString() != "")
                    {
                        txtTextBox.CssClass = dtfield.Rows[0]["hy_class"].ToString();
                    }
                    txtTextBox.Width = Unit.Parse("60%");
                    if (dtfield.Rows[0]["hy_height"].ToString() != "")
                    {
                        txtTextBox.Height = Unit.Parse(dtfield.Rows[0]["hy_height"].ToString());
                    }
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                    Label txtTextBox2 = new Label();
                    txtTextBox2.ID = "span_" + dtfield.Rows[0]["hy_fieldid"].ToString();
                    field_docvalue = "<input type=button id='btn_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "' value=' 选 择 ' class=btn3 onclick=\"" + dtfield.Rows[0]["hy_onclick"].ToString() + "\" />";
                    txtTextBox2.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox2);
                }
            }
            //多行文本加按钮
            if (field_type == "多行文本加按钮")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    TextBox txtTextBox = new TextBox();
                    txtTextBox.TextMode = TextBoxMode.MultiLine;
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    if (dtfield.Rows[0]["hy_ifreadonly"].ToString() == "是")
                    {
                        txtTextBox.ReadOnly = true;
                    }
                    if (dtfield.Rows[0]["hy_class"].ToString() != "")
                    {
                        txtTextBox.CssClass = dtfield.Rows[0]["hy_class"].ToString();
                    }
                    if (dtfield.Rows[0]["hy_width"].ToString() != "")
                    {
                        txtTextBox.Width = Unit.Parse(dtfield.Rows[0]["hy_width"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_height"].ToString() != "")
                    {
                        txtTextBox.Height = Unit.Parse(dtfield.Rows[0]["hy_height"].ToString());
                    }
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                    Label txtTextBox2 = new Label();
                    txtTextBox2.ID = "span_" + dtfield.Rows[0]["hy_fieldid"].ToString();
                    field_docvalue = "<input type=button id='btn_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "' value=' 选 择 ' class=btn3 onclick=\"" + dtfield.Rows[0]["hy_onclick"].ToString() + "\" />";
                    txtTextBox2.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox2);
                }
            }
            //意见加按钮
            if (field_type == "意见加按钮")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    TextBox txtTextBox = new TextBox();
                    txtTextBox.TextMode = TextBoxMode.MultiLine;
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    if (dtfield.Rows[0]["hy_ifreadonly"].ToString() == "是")
                    {
                        txtTextBox.ReadOnly = true;
                    }
                    if (dtfield.Rows[0]["hy_class"].ToString() != "")
                    {
                        txtTextBox.CssClass = dtfield.Rows[0]["hy_class"].ToString();
                    }
                    if (dtfield.Rows[0]["hy_width"].ToString() != "")
                    {
                        txtTextBox.Width = Unit.Parse(dtfield.Rows[0]["hy_width"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_height"].ToString() != "")
                    {
                        txtTextBox.Height = Unit.Parse(dtfield.Rows[0]["hy_height"].ToString());
                    }
                    //txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                    Label txtTextBox2 = new Label();
                    txtTextBox2.ID = "span_" + dtfield.Rows[0]["hy_fieldid"].ToString();
                    field_docvalue = "<input type=button id='btn_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "' value=' 选 择 ' class=btn3 onclick=\"" + dtfield.Rows[0]["hy_onclick"].ToString() + "\" /><input type=button id='btn_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "_cz' value=' 重 置 ' class=btn3 onclick=\"document.getElementById('" + dtfield.Rows[0]["hy_fieldid"].ToString() + "').value='';\" />";
                    txtTextBox2.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox2);
                }
            }
            //数值
            if (field_type == "数值")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    TextBox txtTextBox = new TextBox();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    if (dtfield.Rows[0]["hy_ifreadonly"].ToString() == "是")
                    {
                        txtTextBox.ReadOnly = true;
                    }
                    if (dtfield.Rows[0]["hy_class"].ToString() != "")
                    {
                        txtTextBox.CssClass = dtfield.Rows[0]["hy_class"].ToString();
                    }
                    if (dtfield.Rows[0]["hy_width"].ToString() != "")
                    {
                        txtTextBox.Width = Unit.Parse(dtfield.Rows[0]["hy_width"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_height"].ToString() != "")
                    {
                        txtTextBox.Height = Unit.Parse(dtfield.Rows[0]["hy_height"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onclick", dtfield.Rows[0]["hy_onclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_ondblclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("ondblclick", dtfield.Rows[0]["hy_ondblclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onchange"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onchange", dtfield.Rows[0]["hy_onchange"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onkeydown"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onkeydown", dtfield.Rows[0]["hy_onkeydown"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onkeyup"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onkeyup", dtfield.Rows[0]["hy_onkeyup"].ToString());
                    }
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
            }
            //对话框列表(下拉框
            if (field_type == "对话框列表")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    DropDownList ddlDropDownList = new DropDownList();
                    ddlDropDownList.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    if (dtfield.Rows[0]["hy_class"].ToString() != "")
                    {
                        ddlDropDownList.CssClass = dtfield.Rows[0]["hy_class"].ToString();
                    }
                    if (dtfield.Rows[0]["hy_height"].ToString() != "")
                    {
                        ddlDropDownList.Height = Unit.Parse(dtfield.Rows[0]["hy_height"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onchange"].ToString() != "")
                    {
                        ddlDropDownList.Attributes.Add("onchange", dtfield.Rows[0]["hy_onchange"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "0")
                    {
                        //手工配置
                        if (dtfield.Rows[0]["hy_options"].ToString() != "")
                        {
                            string[] lv_options = dtfield.Rows[0]["hy_options"].ToString().Split('#');
                            for (int i = 0; i < lv_options.Length; i++)
                            {
                                ddlDropDownList.Items.Add(lv_options[i].ToString());
                            }
                        }
                    }
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "1")
                    {
                        //SQL语句
                        if (dtfield.Rows[0]["hy_options"].ToString() != "")
                        {
                            //如果SQL语句中含有特殊标示,则需要替换
                            string ls_sql = dtfield.Rows[0]["hy_options"].ToString();
                            if (ls_sql.Contains("用户ID"))
                            {
                                ls_sql = ls_sql.Replace("用户ID", "'" + Session["hyuid"].ToString() + "'");
                            }
                            if (ls_sql.Contains("用户名"))
                            {
                                ls_sql = ls_sql.Replace("用户名", "'" + Session["hyuname"].ToString() + "'");
                            }
                            if (ls_sql.Contains("部门ID"))
                            {
                                ls_sql = ls_sql.Replace("部门ID", "'" + Session["hydeptid"].ToString() + "'");
                            }
                            if (ls_sql.Contains("部门名"))
                            {
                                ls_sql = ls_sql.Replace("部门名", "'" + Session["hydeptname"].ToString() + "'");
                            }
                            DataTable dt_options = Hyoa_global.GetDataTable(ls_sql);
                            ddlDropDownList.DataSource = dt_options;
                            ddlDropDownList.DataTextField = dt_options.Columns[0].ColumnName;
                            ddlDropDownList.DataValueField = dt_options.Columns[0].ColumnName;
                            ddlDropDownList.DataBind();
                        }
                    }
                    ddlDropDownList.Items.Insert(0, new ListItem("--请选择--", ""));
                    ddlDropDownList.SelectedValue = field_docvalue;
                    tCell2.Controls.Add(ddlDropDownList);
                }
            }
            //复选框(查询时直接显示文本框)
            if (field_type == "复选框")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    CheckBoxList txtTextBox = new CheckBoxList();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    if (dtfield.Rows[0]["hy_class"].ToString() != "")
                    {
                        txtTextBox.CssClass = dtfield.Rows[0]["hy_class"].ToString();
                    }
                    if (dtfield.Rows[0]["hy_width"].ToString() != "")
                    {
                        txtTextBox.Width = Unit.Parse(dtfield.Rows[0]["hy_width"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_height"].ToString() != "")
                    {
                        txtTextBox.Height = Unit.Parse(dtfield.Rows[0]["hy_height"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onclick", dtfield.Rows[0]["hy_onclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "0")
                    {
                        //手工配置
                        if (dtfield.Rows[0]["hy_options"].ToString() != "")
                        {
                            string[] lv_options = dtfield.Rows[0]["hy_options"].ToString().Split('#');
                            for (int i = 0; i < lv_options.Length; i++)
                            {
                                txtTextBox.Items.Add(lv_options[i].ToString());
                            }
                        }
                    }
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "1")
                    {
                        //SQL语句
                        //如果SQL语句中含有特殊标示,则需要替换
                        string ls_sql = dtfield.Rows[0]["hy_options"].ToString();
                        if (ls_sql.Contains("用户ID"))
                        {
                            ls_sql = ls_sql.Replace("用户ID", "'" + Session["hyuid"].ToString() + "'");
                        }
                        if (ls_sql.Contains("用户名"))
                        {
                            ls_sql = ls_sql.Replace("用户名", "'" + Session["hyuname"].ToString() + "'");
                        }
                        if (ls_sql.Contains("部门ID"))
                        {
                            ls_sql = ls_sql.Replace("部门ID", "'" + Session["hydeptid"].ToString() + "'");
                        }
                        if (ls_sql.Contains("部门名"))
                        {
                            ls_sql = ls_sql.Replace("部门名", "'" + Session["hydeptname"].ToString() + "'");
                        }
                        if (dtfield.Rows[0]["hy_options"].ToString() != "")
                        {
                            DataTable dt_options = Hyoa_global.GetDataTable(ls_sql);
                            txtTextBox.DataSource = dt_options;
                            txtTextBox.DataTextField = dt_options.Columns[0].ColumnName;
                            txtTextBox.DataValueField = dt_options.Columns[0].ColumnName;
                            txtTextBox.DataBind();
                        }
                    }
                    if (field_docvalue != "")
                    {
                        field_docvalue = "," + field_docvalue + ",";
                        foreach (ListItem li in txtTextBox.Items)
                        {
                            if(field_docvalue.Contains(li.Value))
                                li.Selected = true;
                        }
                    }
                    tCell2.Controls.Add(txtTextBox);
                }
            }
            //单选框(查询时直接显示文本框)
            if (field_type == "单选框")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    RadioButtonList txtTextBox = new RadioButtonList();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    if (dtfield.Rows[0]["hy_class"].ToString() != "")
                    {
                        txtTextBox.CssClass = dtfield.Rows[0]["hy_class"].ToString();
                    }
                    if (dtfield.Rows[0]["hy_width"].ToString() != "")
                    {
                        txtTextBox.Width = Unit.Parse(dtfield.Rows[0]["hy_width"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_height"].ToString() != "")
                    {
                        txtTextBox.Height = Unit.Parse(dtfield.Rows[0]["hy_height"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onclick", dtfield.Rows[0]["hy_onclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "0")
                    {
                        //手工配置
                        if (dtfield.Rows[0]["hy_options"].ToString() != "")
                        {
                            string[] lv_options = dtfield.Rows[0]["hy_options"].ToString().Split('#');
                            for (int i = 0; i < lv_options.Length; i++)
                            {
                                txtTextBox.Items.Add(lv_options[i].ToString());
                            }
                        }
                    }
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "1")
                    {
                        //SQL语句
                        //如果SQL语句中含有特殊标示,则需要替换
                        string ls_sql = dtfield.Rows[0]["hy_options"].ToString();
                        if (ls_sql.Contains("用户ID"))
                        {
                            ls_sql = ls_sql.Replace("用户ID", "'" + Session["hyuid"].ToString() + "'");
                        }
                        if (ls_sql.Contains("用户名"))
                        {
                            ls_sql = ls_sql.Replace("用户名", "'" + Session["hyuname"].ToString() + "'");
                        }
                        if (ls_sql.Contains("部门ID"))
                        {
                            ls_sql = ls_sql.Replace("部门ID", "'" + Session["hydeptid"].ToString() + "'");
                        }
                        if (ls_sql.Contains("部门名"))
                        {
                            ls_sql = ls_sql.Replace("部门名", "'" + Session["hydeptname"].ToString() + "'");
                        }
                        if (dtfield.Rows[0]["hy_options"].ToString() != "")
                        {
                            DataTable dt_options = Hyoa_global.GetDataTable(ls_sql);
                            txtTextBox.DataSource = dt_options;
                            txtTextBox.DataTextField = dt_options.Columns[0].ColumnName;
                            txtTextBox.DataValueField = dt_options.Columns[0].ColumnName;
                            txtTextBox.DataBind();
                        }
                    }
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
            }
            //口令
            if (field_type == "口令")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = "&nbsp;";
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    TextBox txtTextBox = new TextBox();
                    txtTextBox.TextMode = TextBoxMode.Password;
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    if (dtfield.Rows[0]["hy_ifreadonly"].ToString() == "是")
                    {
                        txtTextBox.ReadOnly = true;
                    }
                    if (dtfield.Rows[0]["hy_class"].ToString() != "")
                    {
                        txtTextBox.CssClass = dtfield.Rows[0]["hy_class"].ToString();
                    }
                    if (dtfield.Rows[0]["hy_width"].ToString() != "")
                    {
                        txtTextBox.Width = Unit.Parse(dtfield.Rows[0]["hy_width"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_height"].ToString() != "")
                    {
                        txtTextBox.Height = Unit.Parse(dtfield.Rows[0]["hy_height"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onclick", dtfield.Rows[0]["hy_onclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_ondblclick"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("ondblclick", dtfield.Rows[0]["hy_ondblclick"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onchange"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onchange", dtfield.Rows[0]["hy_onchange"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onkeydown"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onkeydown", dtfield.Rows[0]["hy_onkeydown"].ToString());
                    }
                    if (dtfield.Rows[0]["hy_onkeyup"].ToString() != "")
                    {
                        txtTextBox.Attributes.Add("onkeyup", dtfield.Rows[0]["hy_onkeyup"].ToString());
                    }
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
            }
            //附件组件
            if (field_type == "附件组件")
            {
                //读取附件内容
                HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
                DataTable dt_fileatt = Hyoa_fileatt.GetfileattByFatheridandFatherfield(this.txtdocid.Value, hy_fieldid);
                field_docvalue = "";
                if (dt_fileatt.Rows.Count > 0)
                {
                    for (var ii = 0; ii < dt_fileatt.Rows.Count; ii++)
                    {
                        field_docvalue += (ii + 1).ToString() + "、<a href=\"" + dt_fileatt.Rows[ii]["hy_filepath"].ToString() + "\" target=_blank>" + dt_fileatt.Rows[ii]["hy_filename"].ToString() + "</a><br />";
                    }
                }
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    if (field_docvalue == "")
                    {
                        field_docvalue = "&nbsp;";
                    }
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    field_docvalue += "<input type=button id='uploadfile1' value='附件管理' class=btn3 onclick=\"window.open('ggdy/main_fileatt.aspx?fatherid=" + this.txtdocid.Value + "&fatherfield=" + hy_fieldid + "','filewindow','height=350,width=600,top=100,left=200,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');\" />";
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
            }
            //说明文字
            if (field_type == "说明文字")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
            }
            //编辑器
            if (field_type == "编辑器")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    //隐藏文本框
                    TextBox txtTextBox = new TextBox();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    txtTextBox.Style.Value = "display:none";
                    tCell2.Controls.Add(txtTextBox);
                    //编辑器
                    Label txtTextBox2 = new Label();
                    txtTextBox2.ID = "eWebEditor" + dtfield.Rows[0]["hy_fieldid"].ToString();
                    field_docvalue = "<iframe ID=\"eWebEditor" + dtfield.Rows[0]["hy_fieldid"].ToString() + "\" src=\"system/eWebEditor/ewebeditor.htm?id=" + dtfield.Rows[0]["hy_fieldid"].ToString() + "&style=Portal\" frameborder=0 scrolling=no width=" + dtfield.Rows[0]["hy_width"].ToString() + " height=" + dtfield.Rows[0]["hy_height"].ToString() + "></iframe>";
                    txtTextBox2.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox2);
                }
            }
            //痕迹保留
            if (field_type == "痕迹保留")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    field_docvalue = "<input type=button id=\"btn_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "\" value='正  文' class=btn3 onclick=\"window.open('ntko/readoffice.aspx?newofficetype=1&fatherid=" + this.txtdocid.Value + "&tableid=" + this.hy_tableid.Text + "&tacheByhj=1&jsxd=1&rnd='+Math.random(),'hjblwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" /> ";
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    field_docvalue = "<input type=button id=\"btn_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "\" value='正  文' class=btn3 onclick=\"window.open('ntko/editoffice.aspx?newofficetype=1&fatherid=" + this.txtdocid.Value + "&tableid=" + this.hy_tableid.Text + "&tacheByhj=1&jsxd=0&rnd='+Math.random(),'hjblwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" /> ";
                    //如果是流程模块,则根据环节判断一下
                    if (ifflowdoc == "1")
                    {
                        //判断是否为第一环节
                        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)
                            {
                                field_docvalue = "<input type=button id=\"btn_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "\" value='正  文' class=btn3 onclick=\"window.open('ntko/editoffice.aspx?newofficetype=1&fatherid=" + this.txtdocid.Value + "&tableid=" + this.hy_tableid.Text + "&tacheByhj=1&jsxd=0&rnd='+Math.random(),'hjblwindow','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() == "**")
                                    {
                                        field_docvalue = "<input type=button id=\"btn_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "\" value='正  文' class=btn3 onclick=\"window.open('ntko/editoffice.aspx?newofficetype=1&fatherid=" + this.txtdocid.Value + "&tableid=" + this.hy_tableid.Text + "&tacheByhj=0&jsxd=1&rnd='+Math.random(),'hjblwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" /> ";
                                    }
                                    else
                                    {
                                        field_docvalue = "<input type=button id=\"btn_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "\" value='正  文' class=btn3 onclick=\"window.open('ntko/editoffice.aspx?newofficetype=1&fatherid=" + this.txtdocid.Value + "&tableid=" + this.hy_tableid.Text + "&tacheByhj=0&jsxd=0&rnd='+Math.random(),'hjblwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" /> ";
                                    }
                                }

                            }
                        }
                    }
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
            }
            //IFRAME列表
            if (field_type == "IFRAME列表")
            {
                //-----开始输出字段------
                if (ls_laborinput == "0")   //输出LABLE
                {
                    field_docvalue = "<iframe id=\"ifr_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "\" name=\"ifr_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "\" src=\"" + dtfield.Rows[0]["hy_defaultvalue"].ToString().Replace("list_iframe_auto", "list_iframe_print") + "&motherid=" + this.txtdocid.Value + "&ishaverole=0\" frameborder=\"0\" scrolling=\"yes\" height=\"80px\" width=\"98%\"></iframe>";
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
                else
                {
                    field_docvalue = "<iframe id=\"ifr_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "\" name=\"ifr_" + dtfield.Rows[0]["hy_fieldid"].ToString() + "\" src=\"" + dtfield.Rows[0]["hy_defaultvalue"].ToString().Replace("list_iframe_auto", "list_iframe_print") + "&motherid=" + this.txtdocid.Value + "&ishaverole=1\" frameborder=\"0\" scrolling=\"yes\" height=\"80px\" width=\"98%\"></iframe>";
                    Label txtTextBox = new Label();
                    txtTextBox.ID = dtfield.Rows[0]["hy_fieldid"].ToString();
                    txtTextBox.Text = field_docvalue;
                    tCell2.Controls.Add(txtTextBox);
                }
            }
            //子表信息带链接

            //子表信息不带链接

        }
        return li_return;
    }