예제 #1
0
 protected void btnLogin_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
     HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
     DataTable dt = Hyoa_tableconfig.GetTables();
     string sql = "";
     if (dt.Rows.Count > 0)
     {
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             //增加字段,先删除再添加
             sql = "ALTER TABLE hyc_" + dt.Rows[i]["ID"].ToString();
             sql += " ADD hy_clrylist text ";
             Hyoa_global.ExcuteSQL(sql);
             sql = "ALTER TABLE hyc_" + dt.Rows[i]["ID"].ToString();
             sql += " ADD hy_cyrylist text ";
             //Hyoa_global.ExcuteSQL(sql);   //第一次要执行一下添加字段
             //处理数据
             sql = "select * from hyc_" + dt.Rows[i]["ID"].ToString();
             DataTable dt2 = Hyoa_global.GetDataTable(sql);
             if (dt2.Rows.Count > 0)
             {
                 for (int j = 0; j < dt2.Rows.Count; j++)
                 {
                     //先置为,
                     sql = "update hyc_" + dt.Rows[i]["ID"].ToString() + " set hy_clrylist=',',hy_cyrylist=',' where DOCID='" + dt2.Rows[j]["DOCID"].ToString() + "'";
                     Hyoa_global.ExcuteSQL(sql);
                     //再根据cl表更新
                     sql = "select * from hyp_flowhistoryinfo_cl where DOCID='" + dt2.Rows[j]["DOCID"].ToString() + "'";
                     DataTable dt3 = Hyoa_global.GetDataTable(sql);
                     if (dt3.Rows.Count > 0)
                     {
                         for (int m = 0; m < dt3.Rows.Count; m++)
                         {
                             //得到初始值
                             sql = "select * from hyc_" + dt.Rows[i]["ID"].ToString() + " where DOCID='" + dt2.Rows[j]["DOCID"].ToString() + "'";
                             DataTable dt4 = Hyoa_global.GetDataTable(sql);
                             string ls_value = dt4.Rows[0]["hy_clrylist"].ToString() + dt3.Rows[m]["hy_clrid"].ToString() + ",";
                             sql = "update hyc_" + dt.Rows[i]["ID"].ToString() + " set hy_clrylist='" + ls_value + "',hy_cyrylist=',' where DOCID='" + dt2.Rows[j]["DOCID"].ToString() + "'";
                             //Response.Write(sql);
                             Hyoa_global.ExcuteSQL(sql);
                         }
                     }
                 }
             }
         }
     }
     Response.Write("更新完成");
 }
예제 #2
0
 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
     String[] v_uids = this.txtuids.Value.Split(',');
     for (var i = 0; i < v_uids.Length; i++)
     {
         if (v_uids[i] != "")
         {
             Hyoa_tableconfig.ID = v_uids[i];
             Hyoa_tableconfig.Delete();
         }
     }
     this.txtuids.Value = "";
     //DataPlay(1);
     DataPlay(System.Int32.Parse(this.curpage.Text));
 }
 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
     HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
     String[] v_uids = this.txtuids.Value.Split(',');
     for (var i = 0; i < v_uids.Length; i++)
     {
         if (v_uids[i] != "")
         {
             //先删除SQL中的表
             DelSQLTableByTableid(v_uids[i]);
             //删除配置表
             Hyoa_tableconfig.ID = v_uids[i];
             Hyoa_tableconfig.Delete();
             //删除表字段
             string ls_sql = "delete from hyt_flowfield where hy_tableid='"+v_uids[i]+"'";
             Hyoa_global.ExcuteSQL_BASE(ls_sql);
         }
     }
     this.txtuids.Value = "";
     //DataPlay(1);
     DataPlay(System.Int32.Parse(this.curpage.Text));
 }
예제 #4
0
 protected void ddlmudelid_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.ddlmudelid.SelectedIndex != 0)
     {
         this.ddltableid.Items.Clear();
         //根据模块ID得到表单ID
         HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
         DataTable dt = Hyoa_tableconfig.GetTablesbymudelid(this.ddlmudelid.SelectedValue);
         if (dt.Rows.Count > 0)
         {
             for (var i = 0; i < dt.Rows.Count; i++)
             {
                 this.ddltableid.Items.Insert(i, new ListItem(dt.Rows[i]["hy_name"].ToString(), dt.Rows[i]["ID"].ToString()));
             }
             this.ddltableid.Items.Insert(0, new ListItem("--请选择--", ""));
             this.ddltableid.Attributes.Add("onchange ", "mudelidonchang() ");
         }
     }
     else
     {
         //清空
         this.ddltableid.Items.Clear();
     }
 }
예제 #5
0
    private void DataPlay()
    {
        //加载一级目录ID、一级目录名称、每个一级目录最大的二级目录
        HyoaClass.Hyoa_ml Hyoa_firstml = new HyoaClass.Hyoa_ml();
        DataTable dtfirstml = Hyoa_firstml.GetFirstmls();
        if (dtfirstml.Rows.Count > 0)
        {
            this.ddlfirstmlid.DataSource = dtfirstml;
            this.ddlfirstmlid.DataTextField = "MLID";
            this.ddlfirstmlid.DataValueField = "MLID";
            this.ddlfirstmlid.DataBind();
            this.ddlfirstmlid.Items.Insert(0, "--请选择--");
            this.ddlfirstmlid.SelectedIndex = 0;
            this.ddlfirstmlname.DataSource = dtfirstml;
            this.ddlfirstmlname.DataTextField = "MLName";
            this.ddlfirstmlname.DataValueField = "MLName";
            this.ddlfirstmlname.DataBind();
            this.ddlfirstmlname.Items.Insert(0, "--请选择--");
            this.ddlfirstmlname.SelectedIndex = 0;
            //加载每个一级目录最大的二级目录
            string ls_id;
            for (var i = 0; i < dtfirstml.Rows.Count; i++)
            {
                ls_id = Hyoa_firstml.GetMaxMLID(dtfirstml.Rows[i]["MLID"].ToString());
                this.ddlsecondmlid.Items.Insert(i, ls_id);
            }
            this.ddlsecondmlid.Items.Insert(0, "--请选择--");
            this.ddlsecondmlid.SelectedIndex = 0;
        }

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

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

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

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

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

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

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

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

                        //根据模块信息得到对应的选择表单值
                        if (dt.Rows[0]["hy_tableid"] != "" && dt.Rows[0]["hy_tableid"] != null)
                        {
                            this.ddltableid.Items.Clear();
                            //根据模块ID得到表单ID
                            HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
                            DataTable dtgettableid = Hyoa_tableconfig.GetTablesbymudelid(dt.Rows[0]["hy_mudelid"].ToString());
                            if (dtgettableid.Rows.Count > 0)
                            {
                                for (var i = 0; i < dtgettableid.Rows.Count; i++)
                                {
                                    this.ddltableid.Items.Insert(i, new ListItem(dtgettableid.Rows[i]["hy_name"].ToString(), dtgettableid.Rows[i]["ID"].ToString()));
                                }
                                this.ddltableid.Items.Insert(0, new ListItem("--请选择--", ""));
                                //定位
                                this.ddltableid.SelectedValue = dt.Rows[0]["hy_tableid"].ToString();
                            }
                        }
                    }
                    dt.Clear();
                }
            }
        }
    }
예제 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("login.aspx");

        if (!this.IsPostBack)
        {
            //当前用户信息
            this.txtcurloginuserid.Text = Session["hyuid"].ToString();
            this.txtcurloginusername.Text = Session["hyuname"].ToString();
            this.txtcurlogindeptid.Text = Session["hydeptid"].ToString();
            this.txtcurlogindeptname.Text = Session["hydeptname"].ToString();

            if (this.Request.QueryString["pop"] != null)
            {
                string ls_pop = "";
                ls_pop = this.Request.QueryString["pop"].ToString();   //是否弹出窗口
                if (ls_pop.Contains(","))
                    ls_pop = ls_pop.Substring(0, ls_pop.IndexOf(","));

                this.txtifpop.Value = ls_pop;
            }
            if (this.Request.QueryString["mid"] != null)
            {
                string ls_mid = "";
                ls_mid = this.Request.QueryString["mid"].ToString();
                if (ls_mid.Contains(","))
                    ls_mid = ls_mid.Substring(0, ls_mid.IndexOf(","));

                this.hy_mudelid.Text = ls_mid;
            }
            if (this.Request.QueryString["tableid"] != null)
            {
                string ls_tableid = "";
                ls_tableid = this.Request.QueryString["tableid"].ToString();
                if (ls_tableid.Contains(","))
                    ls_tableid = ls_tableid.Substring(0, ls_tableid.IndexOf(","));

                this.hy_tableid.Text = ls_tableid;

                //得到表单名称
                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)
                    this.lbltablename.Text = dt_tableconfig.Rows[0]["hy_name"].ToString();

                this.txttablerole.Value = dt_tableconfig.Rows[0]["hy_tablerole"].ToString();
                dt_tableconfig.Clear();
            }
            if (this.Request.QueryString["listid"] != null)
            {
                string ls_listid = "";
                ls_listid = this.Request.QueryString["listid"].ToString();
                if (ls_listid.Contains(","))
                    ls_listid = ls_listid.Substring(0, ls_listid.IndexOf(","));

                this.txtlistid.Text = ls_listid;
            }
            if (this.Request.QueryString["url"] != null)
            {
                //this.txturl.Value = this.Request.QueryString["url"].ToString();     //返回URL
                string ls_url = this.Request.Url.ToString();
                this.txturl.Value = ls_url.Substring(ls_url.LastIndexOf("url=") + 4, ls_url.Length - ls_url.LastIndexOf("url=") - 4);     //返回URL
            }
            else
            {
                //没有URL值的保存后进入列表中,即/list.aspx?mid=clgl&tableid=8b10b316-98d6-4a50-bc15-52745bb119bb
                this.txturl.Value = "list.aspx?mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&listid=" + this.txtlistid.Text;
                getreturnurl(); //特殊返回地址
            }
        }
        DataPlay();
        //add by wjs 20141103 start 给合同加matherid
        if (this.Request.QueryString["motherid"] != null)
        {
            this.hy_motherid.Text = this.Request.QueryString["motherid"].ToString();
        }
        // add by wjs 20141112 在付款流程结束时将提交改为付款
        //最后一环节
        if (this.txtiflasttache.Value == "1" && this.hy_tableid.Text == "Tablefpbd")
        {
            this.btn_nextstep.Value = "付款";
        }
    }
예제 #7
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
        }
    }
예제 #8
0
    //打开文档显示
    private void DataPlay()
    {
        HyoaClass.DAO db = new HyoaClass.DAO();
        StringBuilder sb = new StringBuilder();

        string ls_flag = "0";  //是否为授权人员
        string ls_uid = this.Session["hyuid"].ToString();
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (Hyoa_global.isHaveRole("Role_search", ls_uid))
        {
            ls_flag = "1";
        }
        int ls_Container = 1;
        string ls_docids = "";
        string sql1 = "";
        //查询关键字按|分割
        string[] lv_key = ls_keywords.Split('|');

        //读取待查模块的字段
        if (ls_Modelid != "--请选择--")
        {
            sql1 = "select *,(select hy_mudelname from hyt_mudel where hy_mudelid=a.hy_mudelid) as hy_name from hyt_searchconfig a where hy_ifsearch='是' and hy_mudelid='" + ls_Modelid + "'";
            sql1 += " order by hy_sort ";
        }
        else
        {
            sql1 = "select *,(select hy_mudelname from hyt_mudel where hy_mudelid=a.hy_mudelid) as hy_name from hyt_searchconfig a where hy_ifsearch='是'";
            sql1 += " order by hy_sort ";
        }
        //Response.Write(sql1);
        //return;

        DataTable dt = db.GetDataTable(sql1);
        if (dt.Rows.Count > 0)
        {
            //循环查询模块
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string sql2 = "";
                string ls_or = "";
                string ls_mid = dt.Rows[i]["hy_mudelid"].ToString();
                string ls_mname = dt.Rows[i]["hy_name"].ToString();
                string ls_tid = dt.Rows[i]["hy_tableid"].ToString();
                string ls_cid = dt.Rows[i]["hy_columnshowid"].ToString();  //hy_field1,hy_bt,hy_content1
                string ls_xsid = dt.Rows[i]["hy_xszdid"].ToString();
                string ls_kckryid = "+" + dt.Rows[i]["hy_kckryid"].ToString() + "+";

                //根据表单ID得到表单信息
                string ls_tname = "", ls_ifflow = "", ls_ifgk = "", ls_ifxssy = "";
                HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
                DataTable dt_tableconfig = Hyoa_tableconfig.GetTable(ls_tid);
                if (dt_tableconfig.Rows.Count > 0)
                {
                    ls_tname = dt_tableconfig.Rows[0]["hy_name"].ToString(); //表单名称
                    ls_ifflow = dt_tableconfig.Rows[0]["hy_ifflowdoc"].ToString();//是否为流程表单
                    ls_ifgk = dt_tableconfig.Rows[0]["hy_ispuballByflowYB"].ToString();  //流程结束后是否公开
                    ls_ifxssy = dt_tableconfig.Rows[0]["hy_ifdisplayall"].ToString();  //是否显示所有记录
                }
                dt_tableconfig.Clear();

                if (ls_flag == "1")
                {
                    //授权查看所有人员
                    sql2 = "select * from hyp_flowmain a where 1=1 ";
                }
                else
                {
                    //某模块是否授权为可查看人员
                    if (ls_kckryid.IndexOf("+" + ls_uid + "+") >= 0)
                    {
                        sql2 = "select * from hyp_flowmain a where 1=1 ";
                    }
                    else
                    {
                        //未授权人员根据表单配置判断模块的数据显示情况
                        if (ls_ifflow == "是")
                        {
                            sql2 = "select * from hyp_flowmain a,hyp_flowhistoryinfo_cl b  where a.DOCID=b.DOCID ";

                            //流程模块
                            if (ls_ifgk == "是")
                            {
                                //流程结束后公开
                                sql2 += " and (','+b.hy_clrid+',' like '%," + ls_uid + ",%' or ','+b.hy_cyrid+',' like '%," + ls_uid + ",%' or a.hy_curtacheid='**' ) ";
                            }
                            if (ls_ifgk == "否")
                            {
                                //流程结束后不公开
                                sql2 += " and (','+b.hy_clrid+',' like '%," + ls_uid + ",%' or ','+b.hy_cyrid+',' like '%," + ls_uid + ",%') ";
                            }
                        }
                        if (ls_ifflow == "否")
                        {
                            //非流程模块
                            if (ls_ifxssy == "是")
                            {
                                //非流程显示所有记录
                                sql2 = "select * from hyp_flowmain a where 1=1 ";
                            }
                            if (ls_ifxssy == "否")
                            {
                                //非流程不显示所有记录
                                sql2 = "select * from hyp_flowmain a where a.hy_djrid='" + ls_uid + "' ";
                            }
                        }
                    }
                }

                //模块ID和表单ID
                sql2 += " and (a.hy_mudelid='" + ls_mid + "' and a.hy_tableid='" + ls_tid + "') ";
                //Response.Write(sql2);
                //return;
                //读取配置的查询条件
                string[] lv_cid = ls_cid.Split(',');
                string[] lv_xsid = ls_xsid.Split(',');
                for (int kk = 0; kk < lv_cid.Length; kk++)
                {
                    if (lv_cid[kk].ToString() != "")
                    {
                        //将查询的关键字组装起来
                        string ls_key = "";
                        for (int jj = 0; jj < lv_key.Length; jj++)
                        {
                            if (ls_key == "")
                            {
                                ls_key = lv_cid[kk] + " like '%" + lv_key[jj] + "%'";
                            }
                            else
                            {
                                ls_key = ls_key +" "+ ls_op + " " + lv_cid[kk] + " like '%" + lv_key[jj] + "%'";
                            }
                        }
                        //将查询的字段组装起来
                        if (ls_or == "")
                        {
                            ls_or = "(" + ls_key + ")";
                        }
                        else
                        {
                            ls_or = ls_or + " or " + "(" + ls_key + ")";
                        }
                    }
                }
                if (ls_or != "")
                {
                    sql2 += " and (" + ls_or + ")";
                }
                sql2 += " order by a.hy_djsj desc ";

                DataTable dt2 = db.GetDataTable(sql2);
                //Response.Write(sql2+ "<br/>"+dt2.Rows.Count + "<br/>");
                //return;
                if (dt2.Rows.Count > 0)
                {
                    for (int ik = 0; ik < dt2.Rows.Count; ik++)
                    {
                        string ls_id = "";
                        ls_id = dt2.Rows[ik]["DOCID"].ToString();
                        if (ls_docids.IndexOf(ls_id) >= 0)
                        {
                            //存在
                        }
                        else
                        {
                            string ls_bt = dt2.Rows[ik]["hy_bt"].ToString();
                            string ls_djr = dt2.Rows[ik]["hy_djrname"].ToString();
                            string ls_djrbm = dt2.Rows[ik]["hy_djrbmname"].ToString();
                            string ls_djsj = DateTime.Parse(dt2.Rows[ik]["hy_djsj"].ToString()).ToString("yyyy-MM-dd");
                            string ls_xsnr = "&nbsp;";

                            for (int kk = 0; kk < lv_xsid.Length; kk++)
                            {
                                if (lv_xsid[kk] != "")
                                {
                                    string ls_zd = lv_xsid[kk];
                                    ls_xsnr += dt2.Rows[ik][ls_zd].ToString() + "&nbsp;&nbsp;&nbsp;&nbsp;";
                                }
                            }
                            string ls_url = "";
                            if (ls_mid == "tzgg")
                            {
                                ls_url = "/displaypage.aspx?mid=" + ls_mid + "&docid=" + ls_id + "&rnd=" + System.Guid.NewGuid().ToString();
                            }
                            else
                            {
                                ls_url = "../main.aspx?op=modify&mid=" + ls_mid + "&tableid=" + ls_tid + "&docid=" + ls_id + "&rnd=" + System.Guid.NewGuid().ToString();
                            }
                            string ls_dqzt = "";
                            if (ls_ifflow == "是")
                            {
                                ls_dqzt = dt2.Rows[ik]["hy_curtachename"].ToString();
                            }
                            string ls_xsnrnew = OutGetStr(ls_xsnr, 150);
                            //for (int jj = 0; jj < lv_key.Length; jj++)
                            //{
                            //    ls_xsnrnew = ReplaceStr(OutGetStr(ls_xsnr, 150), lv_key[jj], "<font color='red'>" + lv_key[jj] + "</font>");
                            //}
                            sb.Append("<table width=99% border=0 cellPadding=0 cellSpacing=2 bgcolor=\"#FFFFFF\">");
                            sb.Append("<tr onMouseOver=\"this.className='tr-over'\" onmouseout=\"this.className='TrList'\" class=\"TrList\">");
                            sb.Append("<td width=\"5%\" height=\"22\" align=\"center\">" + ls_Container + "</td>");
                            sb.Append("<td width=\"8%\" align=\"center\">" + ls_mname + "</td>");
                            sb.Append("<td width=\"8%\" align=\"center\">" + ls_djr + "</td>");
                            sb.Append("<td width=\"8%\" align=\"center\">" + ls_djrbm + "</td>");
                            sb.Append("<td width=\"10%\" align=\"center\">" + ls_djsj + "</td>");
                            sb.Append("<td align=\"center\">" + ls_xsnrnew + "</td>");
                            sb.Append("<td width=\"10%\" align=\"center\">" + ls_dqzt + "</td>");
                            sb.Append("<td width=\"5%\" align=\"center\"><a href=\"#\" onclick=\"var ss='" + ls_url + "';window.location =ss;\">操作</a></td>");
                            sb.Append("<td width=\"5%\" align=\"center\"><a href=\"#\" onclick=\"var ss='" + ls_url + "';window.open(ss,'','');\">弹出</a></td>");
                            sb.Append("</tr>");
                            sb.Append("</table>");
                            ls_Container++;

                            if (ls_docids == "")
                            {
                                ls_docids = ls_id;
                            }
                            else
                            {
                                ls_docids = ls_docids + "," + ls_id;
                            }
                        }
                    }
                }
                dt2.Clear();
            }

        }

        //附件查询
        string key_fj = "";
        for (int jj = 0; jj < lv_key.Length; jj++)
        {
            if (key_fj == "")
            {
                key_fj = " hy_filename like '%" + lv_key[jj] + "%' ";
            }
            else
            {
                key_fj = key_fj + ls_op + " hy_filename like '%" + lv_key[jj] + "%' ";
            }
        }
        //string sqlfj = "select * from hyp_fileatt where " + key_fj + " order by hy_djsj desc ";
        string sqlfj = "";
        if (this.Request.QueryString["Modelid"].ToString() != "")
        {
            sqlfj = "select *,(select hy_mudelname from hyt_mudel where b.hy_mudelid = hy_mudelid) as hy_mudelname from hyp_fileatt a,hyp_flowmain b ";
            sqlfj += " where a.hy_fatherid = b.DOCID and b.hy_mudelid = '" + this.Request.QueryString["Modelid"].ToString() + "' ";
            sqlfj += " and " + key_fj + " order by a.hy_djsj desc  ";
            //sqlfj = "select *,(select hy_mudelid from hyp_flowmain where a.hy_fatherid = DOCID) from hyp_fileatt a ";
            //sqlfj += " where (select hy_mudelid from hyp_flowmain where a.hy_fatherid = DOCID)= '" + this.Request.QueryString["Modelid"].ToString() + "' and " + key_fj + " order by a.hy_djsj desc  ";
        }
        else
        {
            sqlfj = "select *,(select hy_mudelname from hyt_mudel where b.hy_mudelid = hy_mudelid) as hy_mudelname from hyp_fileatt a,hyp_flowmain b where a.hy_fatherid = b.DOCID and " + key_fj + " order by hy_djsj desc  ";
        }

        DataTable dt22 = db.GetDataTable(sqlfj);
        if (dt22.Rows.Count > 0)
        {
            for (int ik = 0; ik < dt22.Rows.Count; ik++)
            {
                string ls_id = dt22.Rows[ik]["hy_fatherid"].ToString();
                if (ls_docids.IndexOf(ls_id) >= 0)
                {
                    //存在
                }
                else
                {
                    //不存在时判断是否有权限查看
                    string ls_xsbzw = "0";
                    string ls_bt = dt22.Rows[ik]["hy_bt"].ToString();
                    string ls_djrid = dt22.Rows[ik]["hy_djrid"].ToString();
                    string ls_djr = dt22.Rows[ik]["hy_djrname"].ToString();
                    string ls_djrbm = dt22.Rows[ik]["hy_djrbmname"].ToString();
                    string ls_djsj = DateTime.Parse(dt22.Rows[ik]["hy_djsj"].ToString()).ToString("yyyy-MM-dd");
                    string ls_xsnr = dt22.Rows[ik]["hy_bt"].ToString() + "&nbsp;";
                    string ls_midfj = dt22.Rows[ik]["hy_mudelid"].ToString();
                    string ls_mname = dt22.Rows[ik]["hy_mudelname"].ToString();
                    string ls_tidfj = dt22.Rows[ik]["hy_tableid"].ToString();
                    string ls_url = "";
                    if (ls_midfj == "tzgg")
                    {
                        ls_url = "/displaypage.aspx?mid=" + ls_midfj + "&docid=" + ls_id + "&rnd=" + System.Guid.NewGuid().ToString();
                    }
                    else
                    {
                        ls_url = "../main.aspx?op=modify&mid=" + ls_midfj + "&tableid=" + ls_tidfj + "&docid=" + ls_id + "&rnd=" + System.Guid.NewGuid().ToString();
                    }
                    string ls_dqzt = dt22.Rows[ik]["hy_curtachename"].ToString();

                    string ls_xsnrnew = OutGetStr(ls_xsnr, 150);
                    //判断显示权限
                    if (ls_flag == "1")
                    {
                        ls_xsbzw="1";  //显示记录
                    }
                    else
                    {
                        //判断该模块是否有权限显示查询结果
                        string sql11 = "select * from hyt_searchconfig where hy_ifsearch='是' and hy_mudelid='" + ls_midfj + "'";
                        DataTable dt11 = db.GetDataTable(sql11);
                        if (dt11.Rows.Count > 0)
                        {
                            string ls_kckryid = "+" + dt.Rows[0]["hy_kckryid"].ToString() + "+";

                            //某模块是否授权为可查看人员
                            if (ls_kckryid.IndexOf("+" + ls_uid + "+") >= 0)
                            {
                                ls_xsbzw = "1";//显示记录
                            }
                            else
                            {
                                //判断该模块是否该人员涉及过
                                string ls_tname2 = "", ls_ifflow2 = "", ls_trole2 = "", ls_ifgk2 = "", ls_ifxssy2 = "";
                                HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
                                DataTable dt_tableconfig2 = Hyoa_tableconfig.GetTable(ls_tidfj);
                                if (dt_tableconfig2.Rows.Count > 0)
                                {
                                    ls_tname2 = dt_tableconfig2.Rows[0]["hy_name"].ToString(); //表单名称
                                    ls_ifflow2 = dt_tableconfig2.Rows[0]["hy_ifflowdoc"].ToString();//是否为流程表单
                                    ls_trole2 = dt_tableconfig2.Rows[0]["hy_tablerole"].ToString(); //表单类型
                                    ls_ifgk2 = dt_tableconfig2.Rows[0]["hy_ispuballByflowYB"].ToString();  //流程结束后是否公开
                                    ls_ifxssy2 = dt_tableconfig2.Rows[0]["hy_ifdisplayall"].ToString();  //是否显示所有记录
                                }
                                dt_tableconfig2.Clear();
                                //未授权人员根据表单配置判断模块的数据显示情况
                                if (ls_ifflow2 == "是")
                                {
                                    //流程模块
                                    if (ls_ifgk2 == "是")
                                    {
                                        //流程结束后公开
                                        ls_xsbzw = "1";//显示记录
                                    }
                                    else
                                    {
                                        //流程结束后不公开
                                        string sql2 = "select * from hyp_flowmain a,hyp_flowhistoryinfo_cl b  where a.DOCID=b.DOCID and a.DOCID='" + ls_id + "'";
                                        sql2 += " and (','+b.hy_clrid+',' like '%," + ls_uid + ",%' or ','+b.hy_cyrid+',' like '%," + ls_uid + ",%') ";
                                        DataTable dt_lcbgk = db.GetDataTable(sql2);
                                        if (dt_lcbgk.Rows.Count > 0)
                                        {
                                            ls_xsbzw = "1";//显示记录
                                        }
                                    }
                                }
                                else
                                {
                                    //非流程模块
                                    if (ls_ifxssy2 == "是")
                                    {
                                        //非流程显示所有记录
                                        ls_xsbzw = "1";//显示记录
                                    }
                                    else
                                    {
                                        //非流程不显示所有记录
                                        if (ls_djrid == ls_uid)
                                        {
                                            ls_xsbzw = "1";//显示记录
                                        }
                                    }
                                }
                            }

                        }
                    }

                    if (ls_xsbzw == "1")
                    {
                        #region 显示查询结果内容
                        sb.Append("<table width=99% border=0 cellPadding=0 cellSpacing=2 bgcolor=\"#FFFFFF\">");
                        sb.Append("<tr onMouseOver=\"this.className='tr-over'\" onmouseout=\"this.className='TrList'\" class=\"TrList\">");
                        sb.Append("<td width=\"5%\" height=\"22\" align=\"center\">" + ls_Container + "</td>");
                        sb.Append("<td width=\"8%\" align=\"center\">" + ls_mname + "</td>");
                        sb.Append("<td width=\"8%\" align=\"center\">" + ls_djr + "</td>");
                        sb.Append("<td width=\"8%\" align=\"center\">" + ls_djrbm + "</td>");
                        sb.Append("<td width=\"10%\" align=\"center\">" + ls_djsj + "</td>");
                        sb.Append("<td align=\"center\">" + ls_xsnrnew + "</td>");
                        sb.Append("<td width=\"10%\" align=\"center\">" + ls_dqzt + "</td>");
                        sb.Append("<td width=\"5%\" align=\"center\"><a href=\"#\" onclick=\"var ss='" + ls_url + "';window.location =ss;\">操作</a></td>");
                        sb.Append("<td width=\"5%\" align=\"center\"><a href=\"#\" onclick=\"var ss='" + ls_url + "';window.open(ss,'','');\">弹出</a></td>");
                        sb.Append("</tr>");
                        sb.Append("</table>");
                        ls_Container++;

                        if (ls_docids == "")
                        {
                            ls_docids = ls_id;
                        }
                        else
                        {
                            ls_docids = ls_docids + "," + ls_id;
                        }
                        #endregion
                    }

                }
            }
        }

        dt.Clear();

        this.lblsearch.Text = sb.ToString();
        db.Close();
    }
예제 #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("login.aspx");

        if (!this.IsPostBack)
        {
            //当前用户信息
            this.txtcurloginuserid.Text = Session["hyuid"].ToString();
            this.txtcurloginusername.Text = Session["hyuname"].ToString();
            this.txtcurlogindeptid.Text = Session["hydeptid"].ToString();
            this.txtcurlogindeptname.Text = Session["hydeptname"].ToString();

            if (this.Request.QueryString["pop"] != null)
            {
                string ls_pop = "";
                ls_pop = this.Request.QueryString["pop"].ToString();   //是否弹出窗口
                if (ls_pop.Contains(","))
                    ls_pop = ls_pop.Substring(0, ls_pop.IndexOf(","));

                this.txtifpop.Value = ls_pop;
            }
            if (this.Request.QueryString["mid"] != null)
            {
                string ls_mid = "";
                ls_mid = this.Request.QueryString["mid"].ToString();
                if (ls_mid.Contains(","))
                    ls_mid = ls_mid.Substring(0, ls_mid.IndexOf(","));

                this.hy_mudelid.Text = ls_mid;
            }
            if (this.Request.QueryString["tableid"] != null)
            {
                string ls_tableid = "";
                ls_tableid = this.Request.QueryString["tableid"].ToString();
                if (ls_tableid.Contains(","))
                    ls_tableid = ls_tableid.Substring(0, ls_tableid.IndexOf(","));

                this.hy_tableid.Text = ls_tableid;

                //得到表单名称
                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)
                    this.lbltablename.Text = dt_tableconfig.Rows[0]["hy_name"].ToString();

                //是否为流程表单
                this.txtifhaveflow.Value = dt_tableconfig.Rows[0]["hy_ifflowdoc"].ToString();
                this.txttablerole.Value = dt_tableconfig.Rows[0]["hy_tablerole"].ToString();
                dt_tableconfig.Clear();
            }
            if (this.Request.QueryString["listid"] != null)
            {
                string ls_listid = "";
                ls_listid = this.Request.QueryString["listid"].ToString();
                if (ls_listid.Contains(","))
                    ls_listid = ls_listid.Substring(0, ls_listid.IndexOf(","));

                this.txtlistid.Text = ls_listid;
            }
            if (this.Request.QueryString["url"] != null)
            {
                //this.txturl.Value = this.Request.QueryString["url"].ToString();     //返回URL
                string ls_url = this.Request.Url.ToString();
                this.txturl.Value = ls_url.Substring(ls_url.LastIndexOf("url=") + 4, ls_url.Length - ls_url.LastIndexOf("url=") - 4);     //返回URL
            }
            else
            {
                //没有URL值的保存后进入列表中,即/list.aspx?mid=clgl&tableid=8b10b316-98d6-4a50-bc15-52745bb119bb
                this.txturl.Value = "list.aspx?mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&listid=" + this.txtlistid.Text;
            }
        }
        DataPlay();
    }
예제 #10
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_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();

        //判断目的表单ID是否重复
        DataTable dt_table = Hyoa_tableconfig.GetTable(txttableidbymd.Text);
        if (dt_table.Rows.Count > 0)
        {
            Response.Write("<script>alert('目的表单ID已存在!');</script>");
            return;
        }

        //插入TABLE配置
        DataTable tableconfigdt = Hyoa_tableconfig.GetTablesbymudelid(this.lbmudelidbysource.Text);
        if (tableconfigdt.Rows.Count > 0)
        {
            Hyoa_tableconfig.ID = txttableidbymd.Text;
            Hyoa_tableconfig.hy_mudelid = this.ddlmudelidbymd.SelectedValue;
            Hyoa_tableconfig.hy_name = this.txttablenamebymd.Text;
            Hyoa_tableconfig.hy_onload = tableconfigdt.Rows[0]["hy_onload"].ToString();
            Hyoa_tableconfig.hy_sort = float.Parse(this.txttablesortbymd.Text);
            Hyoa_tableconfig.hy_ifflowdoc = this.ddlifflowdoc.SelectedValue;
            Hyoa_tableconfig.hy_ifdisplayall = tableconfigdt.Rows[0]["hy_ifdisplayall"].ToString();
            Hyoa_tableconfig.hy_ispuballByflowYB = tableconfigdt.Rows[0]["hy_ispuballByflowYB"].ToString();
            Hyoa_tableconfig.hy_tablerole = tableconfigdt.Rows[0]["hy_tablerole"].ToString();
            Hyoa_tableconfig.hy_ifcomment = tableconfigdt.Rows[0]["hy_ifcomment"].ToString();
            Hyoa_tableconfig.hy_colnum = float.Parse(tableconfigdt.Rows[0]["hy_colnum"].ToString());
            Hyoa_tableconfig.hy_field1 = tableconfigdt.Rows[0]["hy_field1"].ToString();
            Hyoa_tableconfig.hy_field2 = tableconfigdt.Rows[0]["hy_field2"].ToString();
            Hyoa_tableconfig.hy_field3 = tableconfigdt.Rows[0]["hy_field3"].ToString();
            Hyoa_tableconfig.hy_field4 = tableconfigdt.Rows[0]["hy_field4"].ToString();
            Hyoa_tableconfig.hy_field5 = tableconfigdt.Rows[0]["hy_field5"].ToString();
            Hyoa_tableconfig.Insert();
        }

        //插入FIELD配置
        int i;
        DataTable flowfielddt = Hyoa_flowfield.Getflowfieldsbytableid(this.lbtableidbysorce.Text);
        if (flowfielddt.Rows.Count > 0)
        {
            for (i = 0; i < flowfielddt.Rows.Count; i++)
            {
                Hyoa_flowfield.ID = Hyoa_global.GetRandom();
                Hyoa_flowfield.hy_tableid = txttableidbymd.Text;
                Hyoa_flowfield.hy_mudelid = this.ddlmudelidbymd.SelectedValue;
                Hyoa_flowfield.hy_flowid = this.txtflowidbymd.Text;
                Hyoa_flowfield.hy_fieldid = flowfielddt.Rows[i]["hy_fieldid"].ToString();
                Hyoa_flowfield.hy_fieldname = flowfielddt.Rows[i]["hy_fieldname"].ToString();
                Hyoa_flowfield.hy_fieldtype = flowfielddt.Rows[i]["hy_fieldtype"].ToString();
                Hyoa_flowfield.hy_ifreadonly = flowfielddt.Rows[i]["hy_ifreadonly"].ToString();
                Hyoa_flowfield.hy_defaultvaluetype = System.Int32.Parse(flowfielddt.Rows[i]["hy_defaultvaluetype"].ToString());
                Hyoa_flowfield.hy_defaultvalue = flowfielddt.Rows[i]["hy_defaultvalue"].ToString();
                Hyoa_flowfield.hy_optiontype = System.Int32.Parse(flowfielddt.Rows[i]["hy_optiontype"].ToString());
                Hyoa_flowfield.hy_options = flowfielddt.Rows[i]["hy_options"].ToString();
                Hyoa_flowfield.hy_onclick = flowfielddt.Rows[i]["hy_onclick"].ToString();
                Hyoa_flowfield.hy_ondblclick = flowfielddt.Rows[i]["hy_ondblclick"].ToString();
                Hyoa_flowfield.hy_onchange = flowfielddt.Rows[i]["hy_onchange"].ToString();
                Hyoa_flowfield.hy_onkeydown = flowfielddt.Rows[i]["hy_onkeydown"].ToString();
                Hyoa_flowfield.hy_onkeyup = flowfielddt.Rows[i]["hy_onkeyup"].ToString();
                Hyoa_flowfield.hy_sqlfield = flowfielddt.Rows[i]["hy_sqlfield"].ToString();
                Hyoa_flowfield.hy_class = flowfielddt.Rows[i]["hy_class"].ToString();
                Hyoa_flowfield.hy_width = flowfielddt.Rows[i]["hy_width"].ToString();
                Hyoa_flowfield.hy_height = flowfielddt.Rows[i]["hy_height"].ToString();
                Hyoa_flowfield.hy_tdnums = System.Int32.Parse(flowfielddt.Rows[i]["hy_tdnums"].ToString());
                Hyoa_flowfield.hy_config = flowfielddt.Rows[i]["hy_config"].ToString();
                Hyoa_flowfield.hy_sort = float.Parse(flowfielddt.Rows[i]["hy_sort"].ToString());
                Hyoa_flowfield.hy_wordlimit = System.Int32.Parse(flowfielddt.Rows[i]["hy_wordlimit"].ToString());
                Hyoa_flowfield.hy_required = flowfielddt.Rows[i]["hy_required"].ToString();
                Hyoa_flowfield.hy_align = flowfielddt.Rows[i]["hy_align"].ToString();
                Hyoa_flowfield.hy_ifhiddle = flowfielddt.Rows[i]["hy_ifhiddle"].ToString();
                Hyoa_flowfield.hy_ifdbsybt = flowfielddt.Rows[i]["hy_ifdbsybt"].ToString();
                Hyoa_flowfield.hy_field1 = flowfielddt.Rows[i]["hy_field1"].ToString();
                Hyoa_flowfield.hy_field2 = flowfielddt.Rows[i]["hy_field2"].ToString();
                Hyoa_flowfield.hy_field3 = flowfielddt.Rows[i]["hy_field3"].ToString();
                Hyoa_flowfield.hy_field4 = flowfielddt.Rows[i]["hy_field4"].ToString();
                Hyoa_flowfield.hy_field5 = flowfielddt.Rows[i]["hy_field5"].ToString();
                Hyoa_flowfield.Insert();
            }
        }

        //生成SQL/ORACLE中的表
        string sql = "";
        if (Session["conntype"].ToString() == "SQL")
        {
            sql = "select * into hyc_" + txttableidbymd.Text + " from hyc_" + this.lbtableidbysorce.Text + " where 1=0";
        }
        if (Session["conntype"].ToString() == "ORACLE")
        {
            sql = "create table hyc_" + txttableidbymd.Text + " as select * from hyc_" + this.lbtableidbysorce.Text + " where 1=2";
        }
        Hyoa_global.ExcuteSQL(sql);

        //以下为流程模块的功能,非流程模块不需要执行
        if (this.ddlifflowdoc.SelectedValue == "是")
        {
            HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
            DataTable flowinfordt = Hyoa_flowinfor.Getflowinforbymudelid(this.lbmudelidbysource.Text);
            string lssoureceflowid = flowfielddt.Rows[0]["hy_flowid"].ToString();//得到老模块的flowid 后面要用到
            //插入流程信息start
            Hyoa_flowinfor.hy_flowid = this.txtflowidbymd.Text;
            Hyoa_flowinfor.hy_flowname =this.txtflownamebymd.Text;
            Hyoa_flowinfor.hy_sort = System.Int32.Parse(this.txtflowsortbymd.Text);
            Hyoa_flowinfor.hy_mudelid = this.ddlmudelidbymd.SelectedValue;
            Hyoa_flowinfor.Insert();
            //插入流程信息end

            //string lssql3 = "select * from hyt_flowtache where hy_flowid = 'flow0004'";//流程对应的环节
            HyoaClass.Hyoa_flowtache Hyoa_flowtache = new HyoaClass.Hyoa_flowtache();
            DataTable flowtachedt = Hyoa_flowtache.Getflowtachebyflowid(lssoureceflowid);
            if (flowtachedt.Rows.Count > 0)
            {
                for (i = 0; i < flowtachedt.Rows.Count; i++)
                {
                    Hyoa_flowtache.ID = Hyoa_global.GetRandom();
                    Hyoa_flowtache.hy_flowid = this.txtflowidbymd.Text;
                    Hyoa_flowtache.hy_tacheid = flowtachedt.Rows[i]["hy_tacheid"].ToString();
                    Hyoa_flowtache.hy_tachename = flowtachedt.Rows[i]["hy_tachename"].ToString();
                    Hyoa_flowtache.hy_sort = System.Int32.Parse(flowtachedt.Rows[i]["hy_sort"].ToString());
                    Hyoa_flowtache.hy_ifshowcurcomp = flowtachedt.Rows[i]["hy_ifshowcurcomp"].ToString();
                    Hyoa_flowtache.hy_ifshowcurdept = flowtachedt.Rows[i]["hy_ifshowcurdept"].ToString();
                    Hyoa_flowtache.hy_XValue = flowtachedt.Rows[i]["hy_XValue"].ToString();
                    Hyoa_flowtache.hy_YValue = flowtachedt.Rows[i]["hy_YValue"].ToString();
                    Hyoa_flowtache.hy_rdDoIsSendSms = flowtachedt.Rows[i]["hy_rdDoIsSendSms"].ToString();
                    Hyoa_flowtache.hy_rdDoIsSendMessage = flowtachedt.Rows[i]["hy_rdDoIsSendMessage"].ToString();
                    Hyoa_flowtache.hy_rdPassIsSendSms = flowtachedt.Rows[i]["hy_rdPassIsSendSms"].ToString();
                    Hyoa_flowtache.hy_rdPassIsSendMessage = flowtachedt.Rows[i]["hy_rdPassIsSendMessage"].ToString();
                    Hyoa_flowtache.hy_enablecondition = flowtachedt.Rows[i]["hy_enablecondition"].ToString();
                    Hyoa_flowtache.Insert();
                }
            }

            //string lssql4 = "select * from hyt_flowtachefield where hy_flowid='flow0004'";//流程环节对应的域
            HyoaClass.Hyoa_flowtachefield Hyoa_flowtachefield = new HyoaClass.Hyoa_flowtachefield();
            DataTable flowtachefielddt = Hyoa_flowtachefield.Getflowtachefieldbyflowid(lssoureceflowid);
            if (flowtachefielddt.Rows.Count > 0)
            {
                for (i = 0; i < flowtachefielddt.Rows.Count; i++)
                {
                    Hyoa_flowtachefield.ID = Hyoa_global.GetRandom();
                    Hyoa_flowtachefield.hy_flowid = this.txtflowidbymd.Text;
                    Hyoa_flowtachefield.hy_tacheid = flowtachefielddt.Rows[i]["hy_tacheid"].ToString();
                    Hyoa_flowtachefield.hy_fieldid = flowtachefielddt.Rows[i]["hy_fieldid"].ToString();
                    Hyoa_flowtachefield.Insert();
                }
            }
            //string lssql5 = "select * from hyt_flowtacheuser where hy_flowid='flow0004'";//流程环节对应的用户
            HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
            DataTable flowtacheuserdt = Hyoa_flowtacheuser.Getflowtacheuserbyflowid(lssoureceflowid);
            if (flowtacheuserdt.Rows.Count > 0)
            {
                for (i = 0; i < flowtacheuserdt.Rows.Count; i++)
                {
                    Hyoa_flowtacheuser.ID = Hyoa_global.GetRandom();
                    Hyoa_flowtacheuser.hy_flowid = this.txtflowidbymd.Text;
                    Hyoa_flowtacheuser.hy_tacheid = flowtacheuserdt.Rows[i]["hy_tacheid"].ToString();
                    Hyoa_flowtacheuser.hy_userid = flowtacheuserdt.Rows[i]["hy_userid"].ToString();
                    Hyoa_flowtacheuser.Insert();
                }
            }
            //string lssql6 = "select * from hyt_flowwork where hy_flowid='flow0004'";//流程的下环节对应什么,即工作流
            HyoaClass.Hyoa_flowwork Hyoa_flowwork = new HyoaClass.Hyoa_flowwork();
            DataTable flowworkdt = Hyoa_flowwork.Getflowworksbyflowid(lssoureceflowid);
            if (flowworkdt.Rows.Count > 0)
            {
                for (i = 0; i < flowworkdt.Rows.Count; i++)
                {
                    Hyoa_flowwork.ID = Hyoa_global.GetRandom();
                    Hyoa_flowwork.hy_flowid = this.txtflowidbymd.Text;
                    Hyoa_flowwork.hy_curtacheid = flowworkdt.Rows[i]["hy_curtacheid"].ToString();
                    Hyoa_flowwork.hy_curtachename = flowworkdt.Rows[i]["hy_curtachename"].ToString();
                    Hyoa_flowwork.hy_nexttacheid = flowworkdt.Rows[i]["hy_nexttacheid"].ToString();
                    Hyoa_flowwork.hy_nexttachename = flowworkdt.Rows[i]["hy_nexttachename"].ToString();
                    Hyoa_flowwork.hy_sort = System.Int32.Parse(flowworkdt.Rows[i]["hy_sort"].ToString());
                    Hyoa_flowwork.hy_actiontype = flowworkdt.Rows[i]["hy_actiontype"].ToString();
                    Hyoa_flowwork.hy_identity_type = flowworkdt.Rows[i]["hy_identity_type"].ToString();
                    Hyoa_flowwork.hy_identity_id = flowworkdt.Rows[i]["hy_identity_id"].ToString();
                    Hyoa_flowwork.hy_jscondition = flowworkdt.Rows[i]["hy_jscondition"].ToString();
                    Hyoa_flowwork.hy_jscondition1 = flowworkdt.Rows[i]["hy_jscondition1"].ToString();
                    Hyoa_flowwork.hy_jscondition2 = flowworkdt.Rows[i]["hy_jscondition2"].ToString();
                    Hyoa_flowwork.hy_zdcyuserids = flowworkdt.Rows[i]["hy_zdcyuserids"].ToString();
                    Hyoa_flowwork.Insert();
                }
            }
        }

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

        if (this.Request.QueryString["mid"] != null)
        {
            //得到模块ID
            this.txtmudelid.Value = this.Request.QueryString["mid"].ToString();
        }
        else
        {
            this.Response.Write("<script>alert('模块ID没有传入,请联系管理员!');</script>");
            return;
        }
        if (this.Request.QueryString["tableid"] != null)
        {
            //表的ID
            this.txttableid.Value = this.Request.QueryString["tableid"].ToString();
            //得到表名
            HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
            DataTable dt_tableconfig = Hyoa_tableconfig.GetTable(this.txttableid.Value);
            if (dt_tableconfig.Rows.Count > 0)
                this.lblcurtachenameshow.Text = dt_tableconfig.Rows[0]["hy_name"].ToString();
        }
        else
        {
            this.Response.Write("<script>alert('表单ID没有传入,请联系管理员!');</script>");
            return;
        }

        if (!IsPostBack)
        {
            //判断是否需要查询(目前一个表单只能对应一个列表,所以直接用表单ID进行查找)
            HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
            DataTable dt_listconfig = Hyoa_listconfig.GetlistconfigByTableid(this.txttableid.Value);
            if (dt_listconfig.Rows.Count > 0)
            {
                if (dt_listconfig.Rows[0]["hy_ifsearch"].ToString() == "是")
                    GetSearchTableHtml();//查询表格动态生成
            }

            DataPlay(1);   //列表区动态生成
            PageListItem();
            EnabledWhatButton();
            if (this.txtmudelid.Value == "kqgl" && this.txttableid.Value == "74e7e280-4fc5-4ccb-be3d-0f995ac2c934")
            {
                this.delcontrol_my.Visible = false;
                this.newcontrol.Visible = false;

            }
            if (this.txtmudelid.Value == "clgl" && this.txttableid.Value == "0b5c53fe-114b-4fa3-8b59-4163b3053504")
            {
                this.exportexcel.Visible = true;
            }

            ///只有管理员岗位能删除(大榭特有)
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
            {
            }
            else
            {
                this.delcontrol.Visible = false;
                this.delcontrol_my.Visible = false;
            }

        }
    }
예제 #12
0
    //加载当前表单执行的onload代码      Written by xf 20110621
    public string onloadjs()
    {
        string ls_mid = "";
        if (this.Request.QueryString["mid"] != null)
        {
            ls_mid = this.Request.QueryString["mid"].ToString();
            if (ls_mid.Contains(","))
                ls_mid = ls_mid.Substring(0, ls_mid.IndexOf(","));
        }
        string ls_tableid = "";
        if (this.Request.QueryString["tableid"] != null)
        {
            ls_tableid = this.Request.QueryString["tableid"].ToString();
            if (ls_tableid.Contains(","))
                ls_tableid = ls_tableid.Substring(0, ls_tableid.IndexOf(","));
        }
        string ls_return = "";
        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
        DataTable dt = Hyoa_tableconfig.GetTablesbymudelidandtableid(ls_mid, ls_tableid);
        if (dt.Rows.Count > 0)
            ls_return = dt.Rows[0]["hy_onload"].ToString();

        return ls_return;
    }
예제 #13
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();
            //旧文档
            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();
                        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_motherid.Text = dt.Rows[0]["hy_motherid"].ToString();
                        this.hy_ifconfirm.Text = dt.Rows[0]["hy_ifconfirm"].ToString();
                        UpdateReadFlag();  //打开时添加阅读情况
                    }
                    dt.Clear();

                    //流程文档
                    if (this.txtifhaveflow.Value == "是")
                    {
                        //流程已结束
                        if (this.hy_curtacheid.Text == "**")
                        {
                            this.lblcurtachenameshow.Text = "流程已结束";
                        }
                        //加载页面
                        GetMainTableHtml("1", this.txtSystemClRight.Value, "1", this.hy_curtacheid.Text);
                    }
                    else
                    {
                        this.lblcurtachenameshow.Text = this.lbltablename.Text;
                        //非流程表单
                        this.td_browseflow.Visible = false;

                        //加载主表单页面
                        GetMainTableHtml("1", this.txtSystemClRight.Value, "0", "");

                        //----加载评论页面 s add by xf 2011-11-19-----
                        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig_forpinglun = new HyoaClass.Hyoa_tableconfig();
                        DataTable dt_tableconfig_forpinglun = Hyoa_tableconfig_forpinglun.GetTablesbymudelidandtableid(this.hy_mudelid.Text, this.hy_tableid.Text);
                        if (dt_tableconfig_forpinglun.Rows.Count > 0)
                        {
                            if (dt_tableconfig_forpinglun.Rows[0]["hy_ifcomment"] != null)
                            {
                                if (dt_tableconfig_forpinglun.Rows[0]["hy_ifcomment"].ToString() == "是")
                                {
                                    this.tb_nbsp.Visible = true;
                                    this.tb_pltitle.Visible = true;
                                    this.tb_plbody.Visible = true;
                                    this.td_pinglun.Visible = true;
                                    //得到已经评论的内容
                                    HyoaClass.Hyoa_pinglun Hyoa_pinglun = new HyoaClass.Hyoa_pinglun();
                                    DataTable dt_pinglun = Hyoa_pinglun.GetcommentByfatherid(this.txtdocid.Value);
                                    if (dt_pinglun.Rows.Count > 0)
                                    {
                                        //输出评论记录
                                        this.lblbody.Text = "";
                                        for (var i = 0; i < dt_pinglun.Rows.Count; i++)
                                        {
                                            this.lblbody.Text += dt_pinglun.Rows[i]["hy_plbody"].ToString() + "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                                            this.lblbody.Text += "(评论人:" + dt_pinglun.Rows[i]["hy_plusername"].ToString() + "&nbsp;&nbsp;&nbsp;所在部门:" + dt_pinglun.Rows[i]["hy_pldeptname"].ToString();
                                            this.lblbody.Text += "&nbsp;&nbsp;&nbsp;评论时间:" + dt_pinglun.Rows[i]["hy_pltime"].ToString() + "&nbsp;&nbsp;&nbsp;IP:" + dt_pinglun.Rows[i]["hy_plip"].ToString();
                                            this.lblbody.Text += ")<br><hr height=1 color=#DEEEFE></hr>";
                                        }
                                    }
                                }
                            }
                        }
                        //----加载评论页面 e-----
                    }

                }
                hywebopen_olddoc(); //旧文档OPEN的特殊处理
            }
        }
        //这是主页面下面的按钮
        if (this.hy_tableid.Text == "Tablexjsq" || this.hy_tableid.Text == "Tablelzsq"
            || this.hy_tableid.Text == "Tableshd" || this.hy_tableid.Text == "Tableszds"
            || this.hy_tableid.Text == "Tableywsl" || (this.hy_tableid.Text == "Tablefybx") || (this.hy_tableid.Text == "Tablezbgl") || (this.hy_tableid.Text == "Tablefkd"))
        {
            this.td_ywdc.Visible = true;
        }
        if ((this.hy_tableid.Text == "Tablefpbd"))
        {
                this.td_ywdc.Visible = true;

        }
        if ((this.hy_tableid.Text == "TableVODfwxy") || (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"))
        {
            this.td_htdc.Visible = true;
        }

        if (this.hy_tableid.Text == "Tablekdjrht" || this.hy_tableid.Text == "Tablesyyhfwxy" || this.hy_tableid.Text == "Tablejdhazfwht" || this.hy_tableid.Text == "TableVODfwxy" || this.hy_tableid.Text == "Tableffpdfwht" || this.hy_tableid.Text == "TableDVBazfwdght" || this.hy_tableid.Text == "Tablejwdsjsxy" || this.hy_tableid.Text == "Tablejwdscsxy" || this.hy_tableid.Text == "Tablekdjrht" || this.hy_tableid.Text == "Tablesjcsfwht" || this.hy_tableid.Text == "Tablesjgdcsfwht" || this.hy_tableid.Text == "Tablesjtxyyhzxy" || this.hy_tableid.Text == "Tablezdyht" || this.hy_tableid.Text == "Tablegxhzhht" || this.hy_tableid.Text == "Tableqtht" || this.hy_tableid.Text == "Tablexjsq" || this.hy_tableid.Text == "Tableshd" || this.hy_tableid.Text == "Tableszds")
        {
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            string sql_wc = "";
            DataTable dtwc;
            sql_wc = "select top 1 * from hyt_blzt where DOCID='" + this.txtdocid.Value + "' and hy_state='未完成'";
            dtwc = Hyoa_global.GetDataTable(sql_wc);
            if (dtwc.Rows.Count > 0)
            {
                if (dtwc.Rows[0]["hy_state"].ToString() == "未完成")
                {
                    this.td_wcan.Visible = true;   //完成
                }
            }
        }
        //部门礼品卡  导出      小潘  2015-5-12
        if (this.hy_tableid.Text == "Tablegslpk")
        {
            this.td_ywdc.Visible = true;
        }
    }
예제 #14
0
    private void DataPlay()
    {
        //是否启用
        this.ddlifsearch.Items.Insert(0, "是");
        this.ddlifsearch.Items.Insert(1, "否");
        this.ddlifflowdoc.Items.Insert(0, "是");
        this.ddlifflowdoc.Items.Insert(1, "否");
        this.ddlifshowsearch.Items.Insert(0, "是");
        this.ddlifshowsearch.Items.Insert(1, "否");
        //模块编号
        //加载模块信息
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dtmudel = Hyoa_mudel.Getmudels();
        if (dtmudel.Rows.Count > 0)
        {
            this.ddlmudelid.DataSource = dtmudel;
            this.ddlmudelid.DataTextField = "hy_mudelname";
            this.ddlmudelid.DataValueField = "hy_mudelid";
            this.ddlmudelid.DataBind();
            this.ddlmudelid.Items.Insert(0, new ListItem("请选择", "请选择"));
            this.ddlmudelid.SelectedIndex = 0;
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                }
                hywebopen_olddoc(); //旧文档OPEN的特殊处理
            }
        }
    }
예제 #17
0
    //需要导出的内容
    private string getExcelContent()
    {
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        //根据表ID和模块ID得到当前传进来的模块是否有流程
        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
        DataTable dttableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.txtmudelid.Value, this.txttableid.Value);

        //根据表单得到对应的所有字段
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dtflowfield = Hyoa_flowfield.Getflowfieldsbytableid(dttableconfig.Rows[0]["ID"].ToString());
        //循环所有字段
        string ls_flowfield = "";
        if (dtflowfield.Rows.Count > 0)
        {
            for (int i = 0; i < dtflowfield.Rows.Count; i++)
            {
                string ls_fieldtype = dtflowfield.Rows[i]["hy_fieldtype"].ToString();
                if (ls_fieldtype == "文本" || ls_fieldtype == "多行文本" || ls_fieldtype == "文本加按钮" || ls_fieldtype == "多行文本加按钮" || ls_fieldtype == "日期" || ls_fieldtype == "数值" || ls_fieldtype == "对话框列表" || ls_fieldtype == "复选框" || ls_fieldtype == "单选框" || ls_fieldtype == "口令")
                {
                    ls_flowfield += ",a.hyc_" + dtflowfield.Rows[i]["hy_fieldid"].ToString();
                }
            }
        }

        HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
        DataTable dtlist = Hyoa_listconfig.Getlistconfig(this.txtlistid.Value);     //列表配置

        #region ---查询条件---
        string cmdStr_Search = "";
        if (txtsearchfields.Text != "")
        {
            string[] lv_searchfields = txtsearchfields.Text.Split(',');
            string[] lv_searchfields_sx = txtsearchfields_sx.Text.Split(',');
            for (int i = 0; i < lv_searchfields.Length; i++)
            {
                string ls_fieldid = lv_searchfields[i].ToString();
                string ls_fieldid_sx = lv_searchfields_sx[i].ToString();
                string ls_searchtext = "";
                if (this.Request.Form[ls_fieldid] != null)
                {
                    ls_searchtext = this.Request.Form[ls_fieldid].ToString();
                }
                if (ls_searchtext != "")
                {
                    if (ls_fieldid_sx == "0")
                    {
                        cmdStr_Search += " and hyc_" + ls_fieldid + " like '%" + ls_searchtext + "%' ";
                    }
                    else
                    {
                        if (ls_fieldid_sx == "1")
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                cmdStr_Search += " and left(CONVERT(varchar, hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ", 120 ) ,10) >= '" + ls_searchtext + "' ";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                cmdStr_Search += " and to_char(hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ",'YYYY-MM-DD') >= '" + ls_searchtext + "' ";
                            }
                        }
                        if (ls_fieldid_sx == "2")
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                cmdStr_Search += " and left(CONVERT(varchar, hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ", 120 ) ,10) <= '" + ls_searchtext + "' ";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                cmdStr_Search += " and to_char(hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ",'YYYY-MM-DD') <= '" + ls_searchtext + "' ";
                            }
                        }
                        if (ls_fieldid_sx == "3")
                        {
                            cmdStr_Search += " and hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + " >= " + ls_searchtext + " ";
                        }
                        if (ls_fieldid_sx == "4")
                        {
                            cmdStr_Search += " and hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + " <= " + ls_searchtext + " ";
                        }
                    }
                }
            }
        }
        #endregion ---查询条件---

        #region ---排序---
        string cmdStr_SearchSort = "";
        if (dtlist.Rows[0]["hy_sortfield1"].ToString() != "")
        {
            if (cmdStr_SearchSort == "")
            {
                cmdStr_SearchSort = " order by hyc_" + dtlist.Rows[0]["hy_sortfield1"].ToString() + " " + dtlist.Rows[0]["hy_sorttype1"].ToString();
            }
            else
            {
                cmdStr_SearchSort += " ,hyc_" + dtlist.Rows[0]["hy_sortfield1"].ToString() + " " + dtlist.Rows[0]["hy_sorttype1"].ToString();
            }
        }
        if (dtlist.Rows[0]["hy_sortfield2"].ToString() != "")
        {
            if (cmdStr_SearchSort == "")
            {
                cmdStr_SearchSort = " order by hyc_" + dtlist.Rows[0]["hy_sortfield2"].ToString() + " " + dtlist.Rows[0]["hy_sorttype2"].ToString();
            }
            else
            {
                cmdStr_SearchSort += " ,hyc_" + dtlist.Rows[0]["hy_sortfield2"].ToString() + " " + dtlist.Rows[0]["hy_sorttype2"].ToString();
            }
        }
        if (dtlist.Rows[0]["hy_sortfield3"].ToString() != "")
        {
            if (cmdStr_SearchSort == "")
            {
                cmdStr_SearchSort = " order by hyc_" + dtlist.Rows[0]["hy_sortfield3"].ToString() + " " + dtlist.Rows[0]["hy_sorttype3"].ToString();
            }
            else
            {
                cmdStr_SearchSort += " ,hyc_" + dtlist.Rows[0]["hy_sortfield3"].ToString() + " " + dtlist.Rows[0]["hy_sorttype3"].ToString();
            }
        }
        if (cmdStr_SearchSort == "")
        {
            //没有配置,则默认按登记日期
            cmdStr_SearchSort = " order by hy_djsj desc ";
        }
        #endregion ---排序---

        #region  --根据查询条件得到返回数据集--
        DataTable dt = new DataTable();         //单页数据集
        DataTable dt_total = new DataTable();   //数据总条数,返回总条数值
        DataTable dttable = Hyoa_tableconfig.GetTable(this.txttableid.Value);  //得到表配置信息查看当前表是否有流程 hy_ifflowdoc

        string cmdStr = "";

        if (dttable.Rows[0]["hy_ifflowdoc"].ToString() == "是")
        {
            if (dttable.Rows[0]["hy_ispuballByflowYB"].ToString() == "是")
            {
                string ls_from = "";
                if (Session["conntype"].ToString() == "SQL")
                {
                    ls_from = " hyc_" + this.txttableid.Value + " a,hyp_flowhistoryinfo_cl b where a.DOCID=b.DOCID and (','+b.hy_clrid+',' like '%," + Session["hyuid"].ToString() + ",%' or ','+b.hy_cyrid+',' like '%," + Session["hyuid"].ToString() + ",%' or a.hy_curtacheid='**')  and b.hy_ifth!='是' " + cmdStr_Search;
                    //cmdStr = "select distinct top 10 a.DOCID,a.hy_mudelid,a.hy_tableid,a.hy_flowid,a.hy_flowname,a.hy_curtacheid,a.hy_curtachename,a.hy_curclrid,a.hy_curclrname,a.hy_djrid,a.hy_djrname,a.hy_djrbmid,a.hy_djrbmname,a.hy_djsj,a.hy_bt,a.hy_iftx,a.hy_zhtxsj,a.hy_readuserlist,a.hy_readdatelist,a.hy_motherid,a.hy_ifconfirm" + ls_flowfield + " from " + ls_from;
                    //cmdStr += " and a.DOCID not in (select top " + ((PageNo - 1) * 10).ToString() + " a.DOCID from " + ls_from + cmdStr_SearchSort + ") " + cmdStr_SearchSort;
                    cmdStr = "select distinct a.DOCID,a.hy_mudelid,a.hy_tableid,a.hy_flowid,a.hy_flowname,a.hy_curtacheid,a.hy_curtachename,";
                    cmdStr += "a.hy_curclrid,a.hy_curclrname,a.hy_djrid,a.hy_djrname,a.hy_djrbmid,a.hy_djrbmname,a.hy_djsj,a.hy_bt,a.hy_iftx,";
                    cmdStr += "a.hy_zhtxsj,a.hy_readuserlist,a.hy_readdatelist,a.hy_motherid,a.hy_ifconfirm" + ls_flowfield + " from " + ls_from + cmdStr_SearchSort;
                }
                dt = Hyoa_global.GetDataTable(cmdStr);
                if (Session["conntype"].ToString() == "SQL")
                {
                    cmdStr = "select count(*) from (select distinct a.DOCID,a.hy_mudelid,a.hy_tableid,a.hy_flowid,a.hy_flowname,a.hy_curtacheid,a.hy_curtachename,a.hy_curclrid,a.hy_curclrname,a.hy_djrid,a.hy_djrname,a.hy_djrbmid,a.hy_djrbmname,a.hy_djsj,a.hy_bt,a.hy_iftx,a.hy_zhtxsj,a.hy_readuserlist,a.hy_readdatelist,a.hy_motherid,a.hy_ifconfirm" + ls_flowfield + " from " + ls_from + " ) f";
                }
                dt_total = Hyoa_global.GetDataTable(cmdStr);
                //dt = Hyoa_flowmain.GetflowmainsByIf_jsDisplayAll();  //输出流程的dt
            }
            else
            {
                string ls_from = "";
                if (Session["conntype"].ToString() == "SQL")
                {
                    ls_from = " hyc_" + this.txttableid.Value + " a,hyp_flowhistoryinfo_cl b where a.DOCID=b.DOCID and (','+b.hy_clrid+',' like '%," + Session["hyuid"].ToString() + ",%' or ','+b.hy_cyrid+',' like '%," + Session["hyuid"].ToString() + ",%')  and b.hy_ifth!='是' " + cmdStr_Search;
                    //cmdStr = "select distinct top 10 a.DOCID,a.hy_mudelid,a.hy_tableid,a.hy_flowid,a.hy_flowname,a.hy_curtacheid,a.hy_curtachename,a.hy_curclrid,a.hy_curclrname,a.hy_djrid,a.hy_djrname,a.hy_djrbmid,a.hy_djrbmname,a.hy_djsj,a.hy_bt,a.hy_iftx,a.hy_zhtxsj,a.hy_readuserlist,a.hy_readdatelist,a.hy_motherid,a.hy_ifconfirm" + ls_flowfield + " from " + ls_from;
                    //cmdStr += " and a.DOCID not in (select top " + ((PageNo - 1) * 10).ToString() + " a.DOCID from " + ls_from + cmdStr_SearchSort + ") " + cmdStr_SearchSort;
                    cmdStr = "select distinct a.DOCID,a.hy_mudelid,a.hy_tableid,a.hy_flowid,a.hy_flowname,a.hy_curtacheid,a.hy_curtachename,";
                    cmdStr += "a.hy_curclrid,a.hy_curclrname,a.hy_djrid,a.hy_djrname,a.hy_djrbmid,a.hy_djrbmname,a.hy_djsj,a.hy_bt,a.hy_iftx,";
                    cmdStr += "a.hy_zhtxsj,a.hy_readuserlist,a.hy_readdatelist,a.hy_motherid,a.hy_ifconfirm" + ls_flowfield + " from " + ls_from + cmdStr_SearchSort;

                }
                dt = Hyoa_global.GetDataTable(cmdStr);
                if (Session["conntype"].ToString() == "SQL")
                {
                    cmdStr = "select count(*) from (select distinct a.DOCID,a.hy_mudelid,a.hy_tableid,a.hy_flowid,a.hy_flowname,a.hy_curtacheid,a.hy_curtachename,a.hy_curclrid,a.hy_curclrname,a.hy_djrid,a.hy_djrname,a.hy_djrbmid,a.hy_djrbmname,a.hy_djsj,a.hy_bt,a.hy_iftx,a.hy_zhtxsj,a.hy_readuserlist,a.hy_readdatelist,a.hy_motherid,a.hy_ifconfirm" + ls_flowfield + " from " + ls_from + " ) f";
                }
                dt_total = Hyoa_global.GetDataTable(cmdStr);
                //dt = Hyoa_flowmain.GetflowmainsByIf();  //输出流程的dt
            }
        }
        else
        {
            if (dttable.Rows[0]["hy_ifdisplayall"].ToString() == "是")
            {
                string ls_from = "";
                ls_from = " hyc_" + this.txttableid.Value + " where 1=1 " + cmdStr_Search;
                if (Session["conntype"].ToString() == "SQL")
                {
                    cmdStr = "select * from " + ls_from + cmdStr_SearchSort;
                    //cmdStr += " and DOCID not in (select top " + ((PageNo - 1) * 10).ToString() + " DOCID from " + ls_from + cmdStr_SearchSort + ") " + cmdStr_SearchSort;
                }
                dt = Hyoa_global.GetDataTable(cmdStr);
                cmdStr = "select count(*) from " + ls_from;
                dt_total = Hyoa_global.GetDataTable(cmdStr);
            }
            else
            {
                string ls_from = "";
                //ls_from = " hyc_" + this.txttableid.Value + " where hy_djrid='" + Session["hyuid"].ToString() + "' " + cmdStr_Search;
                ls_from = " hyc_" + this.txttableid.Value + " where 1=1 " + cmdStr_Search;
                if (Session["conntype"].ToString() == "SQL")
                {
                    cmdStr = "select * from " + ls_from + cmdStr_SearchSort;
                    //cmdStr += " and DOCID not in (select top " + ((PageNo - 1) * 10).ToString() + " DOCID from " + ls_from + cmdStr_SearchSort + ") " + cmdStr_SearchSort;
                }
                dt = Hyoa_global.GetDataTable(cmdStr);
                cmdStr = "select count(*) from " + ls_from;
                dt_total = Hyoa_global.GetDataTable(cmdStr);
            }
        }
        #endregion --根据查询条件得到返回数据集--

        //开始输出----整合成HTML为数据行
        StringBuilder sb = new StringBuilder();
        string lscolname = "";
        string lscolnameid = "";
        string lscolwidth = "";
        string[] lvcolname;
        string[] lvcolnameid;
        string[] lvcolwidth;
        string lscolwidthper;
        lscolname = dtlist.Rows[0]["hy_columnshow"].ToString();  //要显示的列名:附件,标题,收文来源
        lscolnameid = dtlist.Rows[0]["hy_columnshowid"].ToString();  //要显示的列名id:uploadfile1,Hy_bt,Hy_swly
        lscolwidth = dtlist.Rows[0]["hy_width"].ToString();  //要显示的列名id:10,20,30
        lvcolname = lscolname.Split(',');
        lvcolnameid = lscolnameid.Split(',');
        lvcolwidth = lscolwidth.Split(',');
        string ls_colspan = (lvcolname.Length + 1).ToString();
        sb.Append("<table border='1'>");
        sb.Append("<thead><tr><th colSpan='" + ls_colspan + "' class='ztitle'>" + this.lblcurtachenameshow.Text + "</th></tr>");
        sb.Append("<tr><th colSpan='" + ls_colspan + "' class='tdheight20'></th></tr>");
        sb.Append("<tr>");
        sb.Append("<th style='width:70px;' class='tdcenter'>序号</th>");

        //如果没有数据则输出表头
        for (int n = 0; n < lvcolname.Length; n++)
        {
            if (n >= lvcolwidth.Length)
            {
                //此判断是为了防止对应宽度没有输入时,会溢出报错。
                lscolwidthper = "100";
            }
            else
            {
                lscolwidthper = (int.Parse(lvcolwidth[n]) * 20).ToString();
            }
            sb.Append("<th style='width:" + lscolwidthper + "px;' class='tdcenter'>" + lvcolname[n] + "</th>");
        }

        sb.Append("</tr></thead>");

        if (dt.Rows.Count <= 0)
        {
            sb.Append("</table>");
        }
        else
        {
            //如果有数据,则输出数据
            sb.Append("<tbody>");
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                sb.Append("<tr>");
                sb.Append("<td class='tdcenter'>" + (i + 1).ToString() + "</td>");  //序号
                //////开始得到列的值
                DataTable dtgetsqlfield;
                for (int m = 0; m < lvcolname.Length; m++)
                {
                    //根据字段英文名,得到数据库中对应的字段
                    dtgetsqlfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(this.txtmudelid.Value, lvcolnameid[m], this.txttableid.Value);
                    string lsgetsqlfield = "hyc_" + dtgetsqlfield.Rows[0]["hy_fieldid"].ToString();
                    //根据数据库中对应的字段,得到输出字段的值start (日期型根据格式进行了转换)
                    string lsgetputfiled = "";
                    if (dtgetsqlfield.Rows[0]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                    {
                        if (dt.Rows[i][lsgetsqlfield].ToString() != "")
                            lsgetputfiled = System.DateTime.Parse(dt.Rows[i][lsgetsqlfield].ToString()).ToString("yyyy-MM-dd");
                    }
                    else
                    {
                        //解决Float小数点后面出现N位小数乱码的问题
                        if (dtgetsqlfield.Rows[0]["hy_fieldtype"].ToString() == "数值")
                        {
                            if (dt.Rows[i][lsgetsqlfield].ToString() != "")
                            {
                                //是否包含小数点,包含的话,取小数点后两位
                                if (dt.Rows[i][lsgetsqlfield].ToString().Contains(".") == true)
                                {
                                    lsgetputfiled = float.Parse(dt.Rows[i][lsgetsqlfield].ToString()).ToString("F2");
                                }
                                else
                                {
                                    lsgetputfiled = float.Parse(dt.Rows[i][lsgetsqlfield].ToString()).ToString();
                                }
                            }
                            else
                            {
                                lsgetputfiled = "0";
                            }
                            //lsgetputfiled = dt.Rows[i][lsgetsqlfield].ToString();
                        }
                        else
                        {
                            lsgetputfiled = dt.Rows[i][lsgetsqlfield].ToString();
                        }

                    }
                    if (lsgetputfiled == "")
                        lsgetputfiled = "&nbsp;";

                    sb.Append("<td class='tdcenter'>" + lsgetputfiled + "</td>");
                }
                sb.Append("</tr>");
            }
            sb.Append("</tbody></table>");
        }
        return sb.ToString();
    }
예제 #18
0
    private void DataPlay()
    {
        //是否流程文档
        this.ddlifflowdoc.Items.Insert(0, "否");
        this.ddlifflowdoc.Items.Insert(1, "是");

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

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

        if (this.Request.QueryString["id"] != null)
        {
            //根据id得到信息
            this.txtdocid.Value = this.Request.QueryString["id"].ToString();
            HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
            DataTable dt = Hyoa_tableconfig.GetTable(this.txtdocid.Value);
            if (dt.Rows.Count > 0)
            {
                this.lbtableidbysorce.Text = this.txtdocid.Value;
                this.lbmudelnamebysource.Text = dt.Rows[0]["hy_name"].ToString();
                this.lbmudelidbysource.Text = dt.Rows[0]["hy_mudelid"].ToString();
                this.ddlifflowdoc.SelectedValue = dt.Rows[0]["hy_ifflowdoc"].ToString();
            }
            dt.Clear();
        }
    }
예제 #19
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; //新文档时,“已读人员”按钮隐藏

                //文档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();

                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.txttablerole.Value == "3")
                {
                    if (Hy_IfHaveRole(this.hy_mudelid.Text, Session["hyuid"].ToString()) == "1")
                        this.txtSystemClRight.Value = "1";
                }
                if (this.txtSystemClRight.Value == "1")
                {
                    this.td_submit.Visible = true; //保存
                    this.td_continue.Visible = true; //保存并继续新建
                    this.td_xyb.Visible = false;   //下一步

                    if (this.hy_tableid.Text == "Tablekdjrht" || this.hy_tableid.Text == "Tablesyyhfwxy" || this.hy_tableid.Text == "Tablejdhazfwht" || this.hy_tableid.Text == "TableVODfwxy" || this.hy_tableid.Text == "Tableffpdfwht" || this.hy_tableid.Text == "TableDVBazfwdght" || this.hy_tableid.Text == "Tablejwdsjsxy" || this.hy_tableid.Text == "Tablejwdscsxy" || this.hy_tableid.Text == "Tablekdjrht" || this.hy_tableid.Text == "Tablesjcsfwht" || this.hy_tableid.Text == "Tablesjgdcsfwht" || this.hy_tableid.Text == "Tablesjtxyyhzxy" || this.hy_tableid.Text == "Tablezdyht" || this.hy_tableid.Text == "Tablegxhzhht" || this.hy_tableid.Text == "Tableqtht" || this.hy_tableid.Text == "Tablexjsq" || this.hy_tableid.Text == "Tableshd" || this.hy_tableid.Text == "Tableszds")
                    {
                        this.td_continue.Visible = false;
                        this.td_xyb.Visible = true;
                    }
                    if (this.hy_tableid.Text == "Tablefpbd")
                    {
                        this.btn_consubmit.Value = "付 款";
                        this.td_consubmit.Visible = true;//确认td_qxsubmit
                    }
                }
                else
                {
                    this.td_submit.Visible = false; //保存
                    this.td_xyb.Visible = false;   //下一步
                    this.td_continue.Visible = false; //保存并继续新建
                }
                //加载页面
                GetMainTableHtml("0", this.txtSystemClRight.Value, "0", "");
                hywebopen_newdoc();     //新文档OPEN时的特殊处理
            }
            #endregion

            #region 旧文档
            if (this.Request.QueryString["op"] == "modify")
            {
                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();
                        // this.txt_slbh.Value=dt.Rows[0]["hyc_slbh"].ToString();
                        UpdateReadFlag();  //打开时添加阅读情况
                    }
                    dt.Clear();
                    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")
                    {
                        //判断是否为当前文档登记人
                        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.txttablerole.Value == "3")
                    {
                        if (Hy_IfHaveRole(this.hy_mudelid.Text, Session["hyuid"].ToString()) == "1")
                        {
                            if (this.hy_djrid.Text == Session["hyuid"].ToString())
                                this.txtSystemClRight.Value = "1";
                        }
                    }

                    if (this.txtSystemClRight.Value == "1")
                    {
                        this.td_submit.Visible = true; //保存
                        this.td_continue.Visible = false; //保存并继续新建
                        this.td_xyb.Visible = false;   //下一步

                        if (this.hy_tableid.Text == "Tablekdjrht" || this.hy_tableid.Text == "Tablesyyhfwxy" || this.hy_tableid.Text == "Tablejdhazfwht" || this.hy_tableid.Text == "TableVODfwxy" || this.hy_tableid.Text == "Tableffpdfwht" || this.hy_tableid.Text == "TableDVBazfwdght" || this.hy_tableid.Text == "Tablejwdsjsxy" || this.hy_tableid.Text == "Tablejwdscsxy" || this.hy_tableid.Text == "Tablekdjrht" || this.hy_tableid.Text == "Tablesjcsfwht" || this.hy_tableid.Text == "Tablesjgdcsfwht" || this.hy_tableid.Text == "Tablesjtxyyhzxy" || this.hy_tableid.Text == "Tablezdyht" || this.hy_tableid.Text == "Tablegxhzhht" || this.hy_tableid.Text == "Tableqtht" || this.hy_tableid.Text == "Tablexjsq" || this.hy_tableid.Text == "Tableshd" || this.hy_tableid.Text == "Tableszds")
                        {
                            string sql_wc = "";
                            DataTable dtwc;
                            sql_wc = "select * from hyt_blzt where DOCID='" + this.txtdocid.Value + "' and hy_state='未完成'";
                            dtwc = Hyoa_global.GetDataTable(sql_wc);
                            if (dtwc.Rows.Count > 0)
                            {
                                if (dtwc.Rows[0]["hy_state"].ToString() == "未完成")
                                {
                                    this.td_wcan.Visible = true;   //完成
                                }
                            }

                            this.td_continue.Visible = false;
                            this.td_xyb.Visible = true;
                        }
                        if (this.hy_ifconfirm.Text != "1" && this.hy_tableid.Text == "Tablefpbd")
                        {
                            this.btn_consubmit.Value = "付款";
                            this.td_consubmit.Visible = true;   //确认
                        }
                    }
                    else
                    {
                        this.td_submit.Visible = false; //保存
                        this.td_wcan.Visible = false;   //完成
                        this.td_xyb.Visible = false;   //下一步
                        this.td_continue.Visible = false; //保存并继续新建
                    }
                    //如果是超级管理员把取消按钮显示出来。用于用户确认后还要修改
                    //if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
                    //{
                    //    this.td_qxsubmit.Visible = true;    //取消按钮
                    //}

                    //加载主表单页面
                    GetMainTableHtml("1", this.txtSystemClRight.Value, "0", "");

                    //----加载评论页面 s add by xf 2011-11-19-----
                    HyoaClass.Hyoa_tableconfig Hyoa_tableconfig_forpinglun = new HyoaClass.Hyoa_tableconfig();
                    DataTable dt_tableconfig_forpinglun = Hyoa_tableconfig_forpinglun.GetTablesbymudelidandtableid(this.hy_mudelid.Text, this.hy_tableid.Text);
                    if (dt_tableconfig_forpinglun.Rows.Count > 0)
                    {
                        if (dt_tableconfig_forpinglun.Rows[0]["hy_ifcomment"] != null)
                        {
                            if (dt_tableconfig_forpinglun.Rows[0]["hy_ifcomment"].ToString() == "是")
                            {
                                this.tb_nbsp.Visible = true;
                                this.tb_pltitle.Visible = true;
                                this.tb_plbody.Visible = true;
                                this.td_pinglun.Visible = true;
                                //得到已经评论的内容
                                HyoaClass.Hyoa_pinglun Hyoa_pinglun = new HyoaClass.Hyoa_pinglun();
                                DataTable dt_pinglun = Hyoa_pinglun.GetcommentByfatherid(this.txtdocid.Value);
                                if (dt_pinglun.Rows.Count > 0)
                                {
                                    //输出评论记录
                                    this.lblbody.Text = "";
                                    for (var i = 0; i < dt_pinglun.Rows.Count; i++)
                                    {
                                        this.lblbody.Text += dt_pinglun.Rows[i]["hy_plbody"].ToString() + "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                                        this.lblbody.Text += "(评论人:" + dt_pinglun.Rows[i]["hy_plusername"].ToString() + "&nbsp;&nbsp;&nbsp;所在部门:" + dt_pinglun.Rows[i]["hy_pldeptname"].ToString();
                                        this.lblbody.Text += "&nbsp;&nbsp;&nbsp;评论时间:" + dt_pinglun.Rows[i]["hy_pltime"].ToString() + "&nbsp;&nbsp;&nbsp;IP:" + dt_pinglun.Rows[i]["hy_plip"].ToString();
                                        this.lblbody.Text += ")<br><hr height=1 color=#DEEEFE></hr>";
                                    }
                                }
                            }
                        }
                    }
                    //----加载评论页面 e-----
                }
                hywebopen_olddoc(); //旧文档OPEN的特殊处理
            }
            #endregion
        }

        // 部门礼品卡  显示导出按键     小潘   2015-12
        if (this.hy_tableid.Text == "Tablelpksqd")
        {
            //if (this.hy_curtacheid.Text == "tache0001" || this.hy_curtacheid.Text == "**")
            //{
            this.td_dc.Visible = true;
            //}
        }
    }
예제 #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() =="")
            this.Response.Redirect("login.aspx");

        if (this.Request.QueryString["mid"] != null)
        {
            //得到模块ID
            this.txtmudelid.Value = this.Request.QueryString["mid"].ToString();
        }
        else
        {
            this.Response.Write("<script>alert('模块ID没有传入,请联系管理员!');</script>");
            return;
        }
        if (this.Request.QueryString["tableid"] != null)
        {
            //表的ID
            this.txttableid.Value = this.Request.QueryString["tableid"].ToString();
            //得到表名
            HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
            DataTable dt_tableconfig = Hyoa_tableconfig.GetTable(this.txttableid.Value);
            if (dt_tableconfig.Rows.Count > 0)
                this.lblcurtachenameshow.Text = dt_tableconfig.Rows[0]["hy_name"].ToString();
        }
        else
        {
            this.Response.Write("<script>alert('表单ID没有传入,请联系管理员!');</script>");
            return;
        }
        if (this.Request.QueryString["listid"] != null)
        {
            //得到列表ID
            if (this.Request.QueryString["listid"].ToString() != "")
            {
                this.txtlistid.Value = this.Request.QueryString["listid"].ToString();
            }
        }
        else
        {
            this.Response.Write("<script>alert('列表ID没有传入,请联系管理员!');</script>");
            return;
        }
        //判断是否需要查询
        HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
        DataTable dt_listconfig = Hyoa_listconfig.Getlistconfig(this.txtlistid.Value);
        if (dt_listconfig.Rows.Count > 0)
        {
            if (dt_listconfig.Rows[0]["hy_ifsearch"].ToString() == "是")
            {
                GetSearchTableHtml();//查询表格动态生成
            }
            else
            {
                trsearch.Visible = false;
            }
        }
        if (!IsPostBack)
        {
            DataPlay(1);   //列表区动态生成
            PageListItem();
            EnabledWhatButton();
        }
    }
예제 #21
0
    //得到表单的HTML
    //pi_isnewdoc 0:新文档  1:旧文档
    //ifhavarole:表单上是否有权限  0:lable输出 1:input输出
    //ifflowdoc:是否流程表单 0:非流程 1:流程
    //curtacheid:当前环节ID,用于判断字段是否在当前环节有权限
    public void GetMainTableHtml(string pi_isnewdoc, string ifhavarole, string ifflowdoc, string curtacheid)
    {
        //////////////////////////////////输出显示字段///////////////////////////////////////
        //得到所有需要显示的字段
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dtfield_show = Hyoa_flowfield.Getflowfields_show_bytableid(this.hy_tableid.Text);
        //得到表单配置信息
        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
        DataTable dt_tableconfig = Hyoa_tableconfig.GetTable(this.hy_tableid.Text);

        int li_tdnums_onerow = int.Parse(dt_tableconfig.Rows[0]["hy_colnum"].ToString());       //一行有几个TD
        int li_tdnums_total = 0;    //所有字段的tdnums总和
        int li_colnums_show = li_tdnums_onerow / 2;
        int li_rows_show = 0;   //一共有几行
        int li_ifaddcols = 0;   //所有列显示完成后,是否需要补齐显示列 0:否 1:是
        int li_addcols = 0;     //需要补齐的列数量

        for (int i = 0; i < dtfield_show.Rows.Count; i++)
        {
            if (dtfield_show.Rows[i]["hy_defaultvaluetype"].ToString() == "5")  //不显示左侧列
            {
                li_tdnums_total += int.Parse(dtfield_show.Rows[i]["hy_tdnums"].ToString());
            }
            else
            {
                li_tdnums_total += int.Parse(dtfield_show.Rows[i]["hy_tdnums"].ToString()) + 1;
            }
        }
        if (li_tdnums_total % li_tdnums_onerow == 0)
        {
            li_rows_show = li_tdnums_total / li_tdnums_onerow;
            li_ifaddcols = 0;
        }
        else
        {
            li_rows_show = (li_tdnums_total / li_tdnums_onerow) + 1;
            li_ifaddcols = 1;
            li_addcols = li_tdnums_onerow - (li_tdnums_total % li_tdnums_onerow);
        }
        int t = 0;                     //dtlistsearch中的记录行数
        int li_tdnums_currows = 0;      //当前行已经输出了多少个TD了
        for (int i = 0; i < li_rows_show; i++)
        {
            TableRow tRow = new TableRow();
            tb_main.Rows.Add(tRow);
            li_tdnums_currows = 0;
            for (int j = 0; j < li_tdnums_onerow; j++)
            {
                //dtlistsearch中的记录行数超出总行数时,结束循环
                if ((t + 1) > dtfield_show.Rows.Count)
                {
                    break;
                }
                //当前行输出的TD列数超出每行的总列数时,结束循环
                if (li_tdnums_currows >= li_tdnums_onerow)
                {
                    break;
                }
                li_tdnums_currows = GetFieldHtml(tRow, li_tdnums_currows, li_colnums_show, dtfield_show.Rows[t]["hy_fieldid"].ToString(), pi_isnewdoc, ifhavarole, ifflowdoc, curtacheid);
                t += 1;
            }
            //如果最后一行的列没有显示完整,则补齐
            if (li_ifaddcols == 1 && i == (li_rows_show - 1))
            {
                for (int k = 0; k < (li_addcols / 2); k++)
                {
                    TableCell tCell8 = new TableCell();
                    tRow.Cells.Add(tCell8);
                    tCell8.Height = Unit.Pixel(30);
                    tCell8.CssClass = "Tdcellleft";
                    tCell8.HorizontalAlign = HorizontalAlign.Center;
                    tCell8.Controls.Add(new LiteralControl("&nbsp;"));
                    TableCell tCell9 = new TableCell();
                    tRow.Cells.Add(tCell9);
                    tCell9.Height = Unit.Pixel(30);
                    tCell9.CssClass = "Tdcellright";
                    tCell9.HorizontalAlign = HorizontalAlign.Center;
                    tCell9.Controls.Add(new LiteralControl("&nbsp;"));
                }
            }
        }

        //////////////////////////////////最后输出隐藏字段///////////////////////////////////////
        //得到所有需要显示的字段
        dtfield_show.Clear();
        dtfield_show = Hyoa_flowfield.Getflowfields_hidden_bytableid(this.hy_tableid.Text);
        li_tdnums_total = 0;    //所有字段的tdnums总和
        li_rows_show = 0;   //一共有几行
        li_ifaddcols = 0;   //所有列显示完成后,是否需要补齐显示列 0:否 1:是
        li_addcols = 0;     //需要补齐的列数量

        for (int i = 0; i < dtfield_show.Rows.Count; i++)
        {
            if (dtfield_show.Rows[i]["hy_defaultvaluetype"].ToString() == "5")  //不显示左侧列
            {
                li_tdnums_total += int.Parse(dtfield_show.Rows[i]["hy_tdnums"].ToString());
            }
            else
            {
                li_tdnums_total += int.Parse(dtfield_show.Rows[i]["hy_tdnums"].ToString()) + 1;
            }
        }
        if (li_tdnums_total % li_tdnums_onerow == 0)
        {
            li_rows_show = li_tdnums_total / li_tdnums_onerow;
            li_ifaddcols = 0;
        }
        else
        {
            li_rows_show = (li_tdnums_total / li_tdnums_onerow) + 1;
            li_ifaddcols = 1;
            li_addcols = li_tdnums_onerow - (li_tdnums_total % li_tdnums_onerow);
        }
        t = 0;                     //dtlistsearch中的记录行数
        li_tdnums_currows = 0;      //当前行已经输出了多少个TD了
        for (int i = 0; i < li_rows_show; i++)
        {
            TableRow tRow = new TableRow();
            tRow.Style.Value = "display:none";
            tb_main.Rows.Add(tRow);
            li_tdnums_currows = 0;
            for (int j = 0; j < li_tdnums_onerow; j++)
            {
                //dtlistsearch中的记录行数超出总行数时,结束循环
                if ((t + 1) > dtfield_show.Rows.Count)
                {
                    break;
                }
                //当前行输出的TD列数超出每行的总列数时,结束循环
                if (li_tdnums_currows >= li_tdnums_onerow)
                {
                    break;
                }
                li_tdnums_currows = GetFieldHtml(tRow, li_tdnums_currows, li_colnums_show, dtfield_show.Rows[t]["hy_fieldid"].ToString(), pi_isnewdoc, ifhavarole, ifflowdoc, curtacheid);
                t += 1;
            }
            //如果最后一行的列没有显示完整,则补齐
            if (li_ifaddcols == 1 && i == (li_rows_show - 1))
            {
                for (int k = 0; k < (li_addcols / 2); k++)
                {
                    TableCell tCell8 = new TableCell();
                    tRow.Cells.Add(tCell8);
                    tCell8.Height = Unit.Pixel(30);
                    tCell8.CssClass = "Tdcellleft";
                    tCell8.HorizontalAlign = HorizontalAlign.Center;
                    tCell8.Controls.Add(new LiteralControl("&nbsp;"));
                    TableCell tCell9 = new TableCell();
                    tRow.Cells.Add(tCell9);
                    tCell9.Height = Unit.Pixel(30);
                    tCell9.CssClass = "Tdcellright";
                    tCell9.HorizontalAlign = HorizontalAlign.Center;
                    tCell9.Controls.Add(new LiteralControl("&nbsp;"));
                }
            }
        }
    }
예제 #22
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("/login.aspx");

        string ls_tip = "保存成功!";

        //string lssql1 = "SELECT * FROM hyt_flowfield WHERE hy_tableid = '" + this.lbtableidbysorce.Text + "'"; //得到配置字段
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        int i;
        DataTable flowfielddt = Hyoa_flowfield.Getflowfieldsbytableid(this.lbtableidbysorce.Text);
        string newtableid;
        newtableid = Hyoa_global.GetRandom();
        if (flowfielddt.Rows.Count > 0)
        {
            for (i = 0; i < flowfielddt.Rows.Count; i++)
            {
                Hyoa_flowfield.ID = Hyoa_global.GetRandom();
                Hyoa_flowfield.hy_tableid = newtableid;
                Hyoa_flowfield.hy_mudelid = this.ddlmudelidbymd.SelectedValue;
                Hyoa_flowfield.hy_flowid = this.txtflowidbymd.Text;
                Hyoa_flowfield.hy_fieldid = flowfielddt.Rows[i]["hy_fieldid"].ToString();
                Hyoa_flowfield.hy_fieldname = flowfielddt.Rows[i]["hy_fieldname"].ToString();
                Hyoa_flowfield.hy_fieldtype = flowfielddt.Rows[i]["hy_fieldtype"].ToString();
                Hyoa_flowfield.hy_ifreadonly = flowfielddt.Rows[i]["hy_ifreadonly"].ToString();
                Hyoa_flowfield.hy_defaultvaluetype = System.Int32.Parse(flowfielddt.Rows[i]["hy_defaultvaluetype"].ToString());
                Hyoa_flowfield.hy_defaultvalue = flowfielddt.Rows[i]["hy_defaultvalue"].ToString();
                Hyoa_flowfield.hy_optiontype = System.Int32.Parse(flowfielddt.Rows[i]["hy_optiontype"].ToString());
                Hyoa_flowfield.hy_options = flowfielddt.Rows[i]["hy_options"].ToString();
                Hyoa_flowfield.hy_onclick = flowfielddt.Rows[i]["hy_onclick"].ToString();
                Hyoa_flowfield.hy_ondblclick = flowfielddt.Rows[i]["hy_ondblclick"].ToString();
                Hyoa_flowfield.hy_onchange = flowfielddt.Rows[i]["hy_onchange"].ToString();
                Hyoa_flowfield.hy_onkeydown = flowfielddt.Rows[i]["hy_onkeydown"].ToString();
                Hyoa_flowfield.hy_onkeyup = flowfielddt.Rows[i]["hy_onkeyup"].ToString();
                Hyoa_flowfield.hy_sqlfield = flowfielddt.Rows[i]["hy_sqlfield"].ToString();
                Hyoa_flowfield.hy_class = flowfielddt.Rows[i]["hy_class"].ToString();
                Hyoa_flowfield.hy_width = flowfielddt.Rows[i]["hy_width"].ToString();
                Hyoa_flowfield.hy_height = flowfielddt.Rows[i]["hy_height"].ToString();
                Hyoa_flowfield.hy_tdnums = System.Int32.Parse(flowfielddt.Rows[i]["hy_tdnums"].ToString());
                Hyoa_flowfield.hy_config = flowfielddt.Rows[i]["hy_config"].ToString();
                Hyoa_flowfield.hy_sort = System.Int32.Parse(flowfielddt.Rows[i]["hy_sort"].ToString());
                Hyoa_flowfield.hy_wordlimit = System.Int32.Parse(flowfielddt.Rows[i]["hy_wordlimit"].ToString());
                Hyoa_flowfield.hy_required = flowfielddt.Rows[i]["hy_required"].ToString();
                Hyoa_flowfield.hy_align = flowfielddt.Rows[i]["hy_align"].ToString();
                Hyoa_flowfield.Insert();
            }
        }

        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig(); //hyt_tableconfig
        DataTable tableconfigdt = Hyoa_tableconfig.GetTablesbymudelid(this.lbmudelidbysource.Text);
        if (tableconfigdt.Rows.Count > 0)
        {
            Hyoa_tableconfig.ID = newtableid;
            Hyoa_tableconfig.hy_mudelid = this.ddlmudelidbymd.SelectedValue;
            Hyoa_tableconfig.hy_name = this.txttablenamebymd.Text;
            Hyoa_tableconfig.hy_onload = tableconfigdt.Rows[0]["hy_onload"].ToString();
            Hyoa_tableconfig.hy_sort = System.Int32.Parse(this.txttablesortbymd.Text);
            Hyoa_tableconfig.hy_ifflowdoc = this.ddlifflowdoc.SelectedValue;
            Hyoa_tableconfig.hy_ifdisplayall = tableconfigdt.Rows[0]["hy_ifdisplayall"].ToString();
            Hyoa_tableconfig.hy_ispuballByflowYB = tableconfigdt.Rows[0]["hy_ispuballByflowYB"].ToString();
            Hyoa_tableconfig.hy_tablerole = tableconfigdt.Rows[0]["hy_tablerole"].ToString();
            Hyoa_tableconfig.Insert();
        }

        //以下为流程模块的功能,非流程模块不需要执行
        if (this.ddlifflowdoc.SelectedValue == "是")
        {
            //string lssql2 = "SELECT * FROM hyt_flowinfor WHERE hy_mudelid = 'bgyply'";//得到模块对应的流程
            HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
            DataTable flowinfordt = Hyoa_flowinfor.Getflowinforbymudelid(this.lbmudelidbysource.Text);
            string lssoureceflowid = flowfielddt.Rows[0]["hy_flowid"].ToString();//得到老模块的flowid 后面要用到
            //插入流程信息start
            Hyoa_flowinfor.hy_flowid = this.txtflowidbymd.Text;
            Hyoa_flowinfor.hy_flowname =this.txtflownamebymd.Text;
            Hyoa_flowinfor.hy_sort = System.Int32.Parse(this.txtflowsortbymd.Text);
            Hyoa_flowinfor.hy_mudelid = this.ddlmudelidbymd.SelectedValue;
            Hyoa_flowinfor.Insert();
            //插入流程信息end

            //string lssql3 = "select * from hyt_flowtache where hy_flowid = 'flow0004'";//流程对应的环节
            HyoaClass.Hyoa_flowtache Hyoa_flowtache = new HyoaClass.Hyoa_flowtache();
            DataTable flowtachedt = Hyoa_flowtache.Getflowtachebyflowid(lssoureceflowid);
            if (flowtachedt.Rows.Count > 0)
            {
                for (i = 0; i < flowtachedt.Rows.Count; i++)
                {
                    Hyoa_flowtache.ID = Hyoa_global.GetRandom();
                    Hyoa_flowtache.hy_flowid = this.txtflowidbymd.Text;
                    Hyoa_flowtache.hy_tacheid = flowtachedt.Rows[i]["hy_tacheid"].ToString();
                    Hyoa_flowtache.hy_tachename = flowtachedt.Rows[i]["hy_tachename"].ToString();
                    Hyoa_flowtache.hy_sort = System.Int32.Parse(flowtachedt.Rows[i]["hy_sort"].ToString());
                    Hyoa_flowtache.hy_ifshowcurdept = flowtachedt.Rows[i]["hy_ifshowcurdept"].ToString();
                    Hyoa_flowtache.hy_XValue = flowtachedt.Rows[i]["hy_XValue"].ToString();
                    Hyoa_flowtache.hy_YValue = flowtachedt.Rows[i]["hy_YValue"].ToString();
                    Hyoa_flowtache.hy_rdDoIsSendSms = flowtachedt.Rows[i]["hy_rdDoIsSendSms"].ToString();
                    Hyoa_flowtache.hy_rdDoIsSendMessage = flowtachedt.Rows[i]["hy_rdDoIsSendMessage"].ToString();
                    Hyoa_flowtache.hy_rdPassIsSendSms = flowtachedt.Rows[i]["hy_rdPassIsSendSms"].ToString();
                    Hyoa_flowtache.hy_rdPassIsSendMessage = flowtachedt.Rows[i]["hy_rdPassIsSendMessage"].ToString();
                    Hyoa_flowtache.Insert();
                }
            }

            //string lssql4 = "select * from hyt_flowtachefield where hy_flowid='flow0004'";//流程环节对应的域
            HyoaClass.Hyoa_flowtachefield Hyoa_flowtachefield = new HyoaClass.Hyoa_flowtachefield();
            DataTable flowtachefielddt = Hyoa_flowtachefield.Getflowtachefieldbyflowid(lssoureceflowid);
            if (flowtachefielddt.Rows.Count > 0)
            {
                for (i = 0; i < flowtachefielddt.Rows.Count; i++)
                {
                    Hyoa_flowtachefield.ID = Hyoa_global.GetRandom();
                    Hyoa_flowtachefield.hy_flowid = this.txtflowidbymd.Text;
                    Hyoa_flowtachefield.hy_tacheid = flowtachefielddt.Rows[i]["hy_tacheid"].ToString();
                    Hyoa_flowtachefield.hy_fieldid = flowtachefielddt.Rows[i]["hy_fieldid"].ToString();
                    Hyoa_flowtachefield.Insert();
                }
            }
            //string lssql5 = "select * from hyt_flowtacheuser where hy_flowid='flow0004'";//流程环节对应的用户
            HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
            DataTable flowtacheuserdt = Hyoa_flowtacheuser.Getflowtacheuserbyflowid(lssoureceflowid);
            if (flowtacheuserdt.Rows.Count > 0)
            {
                for (i = 0; i < flowtacheuserdt.Rows.Count; i++)
                {
                    Hyoa_flowtacheuser.ID = Hyoa_global.GetRandom();
                    Hyoa_flowtacheuser.hy_flowid = this.txtflowidbymd.Text;
                    Hyoa_flowtacheuser.hy_tacheid = flowtacheuserdt.Rows[i]["hy_tacheid"].ToString();
                    Hyoa_flowtacheuser.hy_userid = flowtacheuserdt.Rows[i]["hy_userid"].ToString();
                    Hyoa_flowtacheuser.Insert();
                }
            }
            //string lssql6 = "select * from hyt_flowwork where hy_flowid='flow0004'";//流程的下环节对应什么,即工作流
            HyoaClass.Hyoa_flowwork Hyoa_flowwork = new HyoaClass.Hyoa_flowwork();
            DataTable flowworkdt = Hyoa_flowwork.Getflowworksbyflowid(lssoureceflowid);
            if (flowworkdt.Rows.Count > 0)
            {
                for (i = 0; i < flowworkdt.Rows.Count; i++)
                {
                    Hyoa_flowwork.ID = Hyoa_global.GetRandom();
                    Hyoa_flowwork.hy_flowid = this.txtflowidbymd.Text;
                    Hyoa_flowwork.hy_curtacheid = flowworkdt.Rows[i]["hy_curtacheid"].ToString();
                    Hyoa_flowwork.hy_curtachename = flowworkdt.Rows[i]["hy_curtachename"].ToString();
                    Hyoa_flowwork.hy_nexttacheid = flowworkdt.Rows[i]["hy_nexttacheid"].ToString();
                    Hyoa_flowwork.hy_nexttachename = flowworkdt.Rows[i]["hy_nexttachename"].ToString();
                    Hyoa_flowwork.hy_sort = System.Int32.Parse(flowworkdt.Rows[i]["hy_sort"].ToString());
                    Hyoa_flowwork.hy_actiontype = flowworkdt.Rows[i]["hy_actiontype"].ToString();
                    Hyoa_flowwork.Insert();
                }
            }
        }

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

        if (!this.IsPostBack)
        {
            //当前用户信息
            this.txtcurloginuserid.Text = Session["hyuid"].ToString();
            this.txtcurloginusername.Text = Session["hyuname"].ToString();
            this.txtcurlogindeptid.Text = Session["hydeptid"].ToString();
            this.txtcurlogindeptname.Text = Session["hydeptname"].ToString();

            if (this.Request.QueryString["pop"] != null)
            {
                string ls_pop = "";
                ls_pop = this.Request.QueryString["pop"].ToString();   //是否弹出窗口
                if (ls_pop.Contains(","))
                    ls_pop = ls_pop.Substring(0, ls_pop.IndexOf(","));

                this.txtifpop.Value = ls_pop;
            }
            if (this.Request.QueryString["mid"] != null)
            {
                string ls_mid = "";
                ls_mid = this.Request.QueryString["mid"].ToString();
                if (ls_mid.Contains(","))
                    ls_mid = ls_mid.Substring(0, ls_mid.IndexOf(","));

                this.hy_mudelid.Text = ls_mid;
            }
            if (this.Request.QueryString["tableid"] != null)
            {
                string ls_tableid = "";
                ls_tableid = this.Request.QueryString["tableid"].ToString();
                if (ls_tableid.Contains(","))
                    ls_tableid = ls_tableid.Substring(0, ls_tableid.IndexOf(","));

                this.hy_tableid.Text = ls_tableid;

                //得到表单名称
                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)
                    this.lbltablename.Text = dt_tableconfig.Rows[0]["hy_name"].ToString();

                //是否为流程表单
                this.txtifhaveflow.Value = dt_tableconfig.Rows[0]["hy_ifflowdoc"].ToString();
                this.txttablerole.Value = dt_tableconfig.Rows[0]["hy_tablerole"].ToString();
                dt_tableconfig.Clear();
            }
            if (this.Request.QueryString["listid"] != null)
            {
                string ls_listid = "";
                ls_listid = this.Request.QueryString["listid"].ToString();
                if (ls_listid.Contains(","))
                    ls_listid = ls_listid.Substring(0, ls_listid.IndexOf(","));

                this.txtlistid.Text = ls_listid;
            }
            string ls_url = "";
            if (this.Request.QueryString["url"] != null)
            {
                //this.txturl.Value = this.Request.QueryString["url"].ToString();     //返回URL
                ls_url = this.Request.Url.ToString();
                this.txturl.Value = ls_url.Substring(ls_url.LastIndexOf("url=") + 4, ls_url.Length - ls_url.LastIndexOf("url=") - 4);     //返回URL
            }
            else
            {
                //没有URL值的保存后进入列表中,即/list.aspx?mid=clgl&tableid=8b10b316-98d6-4a50-bc15-52745bb119bb
                this.txturl.Value = "list.aspx?mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&listid=" + this.txtlistid.Text;

                if (this.Request.QueryString["flag"] != null)
                {
                    if (this.Request.QueryString["flag"] == "flag_ywcgz")
                    {
                        //   this.txturl.Value = "list.aspx?mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&listid=" + this.txtlistid.Text;
                        this.txturl.Value = "system/list_ywcgz.aspx?rnd =" + System.Guid.NewGuid().ToString();
                    }
                }
            }
            //获得访问地址http://localhost/
            string ls_serurl = "";
            if (ls_url.IndexOf("main.aspx") != -1)
            {
                ls_serurl = ls_url.Substring(0, ls_url.LastIndexOf("main.aspx"));
            }
            else if (ls_url.IndexOf("Hy_Frame.aspx") != -1)
            {
                ls_serurl = ls_url.Substring(0, ls_url.LastIndexOf("Hy_Frame.aspx"));
            }
            else
            {
                ls_serurl = "http://192.168.31.225:80/";
            }
            this.txtfwurl.Value = ls_serurl;
        }

        DataPlay();
        //判断是否有合同编号
        ifHaveHtbh();
    }
예제 #24
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "复制成功!";

        try
        {
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            HyoaClass.Hyoa_role Hyoa_role = new HyoaClass.Hyoa_role();
            HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
            HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
            HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
            HyoaClass.Hyoa_listsearchfield Hyoa_listsearchfield = new HyoaClass.Hyoa_listsearchfield();
            HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
            HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
            HyoaClass.Hyoa_flowtache Hyoa_flowtache = new HyoaClass.Hyoa_flowtache();
            HyoaClass.Hyoa_flowtachefield Hyoa_flowtachefield = new HyoaClass.Hyoa_flowtachefield();
            HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
            HyoaClass.Hyoa_flowwork Hyoa_flowwork = new HyoaClass.Hyoa_flowwork();
            #region 生成权限
            DataTable dt = Hyoa_role.Getrole("Role" + this.txtmudelid.Text);
            if (dt.Rows.Count > 0)
            {
                Response.Write("<script>alert('该权限编号已存在,请重新填写!');history.back();</script>");
                return;
            }
            else
            {
                Hyoa_role.hy_roleid = "Role" + this.txtmudelid.Text;
                Hyoa_role.hy_rolename = this.txtmudelname.Text;
                Hyoa_role.hy_sort = System.Int32.Parse(this.txtno.Value);
                Hyoa_role.Insert();
            }
            #endregion

            #region 生成模块
            dt = Hyoa_mudel.Getmudel("Mudel" + this.txtmudelid.Text);
            if (dt.Rows.Count > 0)
            {
                Response.Write("<script>alert('该模块编号已存在,请重新填写!');history.back();</script>");
                return;
            }
            else
            {
                Hyoa_mudel.hy_mudelid = "Mudel" + this.txtmudelid.Text;
                Hyoa_mudel.hy_mudelname = this.txtmudelname.Text;
                Hyoa_mudel.hy_sort = System.Int32.Parse(this.txtno.Value);
                Hyoa_mudel.hy_isenabled = "是";
                Hyoa_mudel.hy_roleid = "Role" + this.txtmudelid.Text;
                Hyoa_mudel.hy_qqroleid = "Role" + this.txtmudelid.Text;
                Hyoa_mudel.Insert();
            }
            #endregion

            #region 生成表单
            DataTable tableconfigdt = Hyoa_tableconfig.GetTablesbymudelid(this.ddlmudelid.SelectedValue);
            if (tableconfigdt.Rows.Count > 0)
            {
                Hyoa_tableconfig.ID = "Table" + this.txtmudelid.Text;
                Hyoa_tableconfig.hy_mudelid = "Mudel" + this.txtmudelid.Text;
                Hyoa_tableconfig.hy_name = this.txtmudelname.Text;
                Hyoa_tableconfig.hy_onload = tableconfigdt.Rows[0]["hy_onload"].ToString();
                Hyoa_tableconfig.hy_sort = float.Parse(this.txtno.Value);
                Hyoa_tableconfig.hy_ifflowdoc = tableconfigdt.Rows[0]["hy_ifflowdoc"].ToString();
                Hyoa_tableconfig.hy_ifdisplayall = tableconfigdt.Rows[0]["hy_ifdisplayall"].ToString();
                Hyoa_tableconfig.hy_ispuballByflowYB = tableconfigdt.Rows[0]["hy_ispuballByflowYB"].ToString();
                Hyoa_tableconfig.hy_tablerole = tableconfigdt.Rows[0]["hy_tablerole"].ToString();
                Hyoa_tableconfig.hy_ifcomment = tableconfigdt.Rows[0]["hy_ifcomment"].ToString();
                Hyoa_tableconfig.hy_colnum = float.Parse(tableconfigdt.Rows[0]["hy_colnum"].ToString());
                Hyoa_tableconfig.hy_field1 = tableconfigdt.Rows[0]["hy_field1"].ToString();
                Hyoa_tableconfig.hy_field2 = tableconfigdt.Rows[0]["hy_field2"].ToString();
                Hyoa_tableconfig.hy_field3 = tableconfigdt.Rows[0]["hy_field3"].ToString();
                Hyoa_tableconfig.hy_field4 = tableconfigdt.Rows[0]["hy_field4"].ToString();
                Hyoa_tableconfig.hy_field5 = tableconfigdt.Rows[0]["hy_field5"].ToString();
                Hyoa_tableconfig.Insert();
            }
            #endregion

            #region 生成表单字段
            int i;
            DataTable flowfielddt = Hyoa_flowfield.Getflowfieldsbytableid(this.ddltableid.SelectedValue);
            if (flowfielddt.Rows.Count > 0)
            {
                for (i = 0; i < flowfielddt.Rows.Count; i++)
                {
                    Hyoa_flowfield.ID = Hyoa_global.GetRandom();
                    Hyoa_flowfield.hy_tableid = "Table" + this.txtmudelid.Text;
                    Hyoa_flowfield.hy_mudelid = "Mudel" + this.txtmudelid.Text;
                    Hyoa_flowfield.hy_flowid = "Flow" + this.txtmudelid.Text;
                    Hyoa_flowfield.hy_fieldid = flowfielddt.Rows[i]["hy_fieldid"].ToString();
                    Hyoa_flowfield.hy_fieldname = flowfielddt.Rows[i]["hy_fieldname"].ToString();
                    Hyoa_flowfield.hy_fieldtype = flowfielddt.Rows[i]["hy_fieldtype"].ToString();
                    Hyoa_flowfield.hy_ifreadonly = flowfielddt.Rows[i]["hy_ifreadonly"].ToString();
                    Hyoa_flowfield.hy_defaultvaluetype = System.Int32.Parse(flowfielddt.Rows[i]["hy_defaultvaluetype"].ToString());
                    Hyoa_flowfield.hy_defaultvalue = flowfielddt.Rows[i]["hy_defaultvalue"].ToString();
                    Hyoa_flowfield.hy_optiontype = System.Int32.Parse(flowfielddt.Rows[i]["hy_optiontype"].ToString());
                    Hyoa_flowfield.hy_options = flowfielddt.Rows[i]["hy_options"].ToString();
                    Hyoa_flowfield.hy_onclick = flowfielddt.Rows[i]["hy_onclick"].ToString();
                    Hyoa_flowfield.hy_ondblclick = flowfielddt.Rows[i]["hy_ondblclick"].ToString();
                    Hyoa_flowfield.hy_onchange = flowfielddt.Rows[i]["hy_onchange"].ToString();
                    Hyoa_flowfield.hy_onkeydown = flowfielddt.Rows[i]["hy_onkeydown"].ToString();
                    Hyoa_flowfield.hy_onkeyup = flowfielddt.Rows[i]["hy_onkeyup"].ToString();
                    Hyoa_flowfield.hy_onfocus = flowfielddt.Rows[i]["hy_onfocus"].ToString();
                    Hyoa_flowfield.hy_onblur = flowfielddt.Rows[i]["hy_onblur"].ToString();
                    Hyoa_flowfield.hy_sqlfield = flowfielddt.Rows[i]["hy_sqlfield"].ToString();
                    Hyoa_flowfield.hy_class = flowfielddt.Rows[i]["hy_class"].ToString();
                    Hyoa_flowfield.hy_width = flowfielddt.Rows[i]["hy_width"].ToString();
                    Hyoa_flowfield.hy_height = flowfielddt.Rows[i]["hy_height"].ToString();
                    Hyoa_flowfield.hy_tdnums = System.Int32.Parse(flowfielddt.Rows[i]["hy_tdnums"].ToString());
                    Hyoa_flowfield.hy_config = flowfielddt.Rows[i]["hy_config"].ToString();
                    Hyoa_flowfield.hy_sort = float.Parse(flowfielddt.Rows[i]["hy_sort"].ToString());
                    Hyoa_flowfield.hy_wordlimit = System.Int32.Parse(flowfielddt.Rows[i]["hy_wordlimit"].ToString());
                    Hyoa_flowfield.hy_required = flowfielddt.Rows[i]["hy_required"].ToString();
                    Hyoa_flowfield.hy_align = flowfielddt.Rows[i]["hy_align"].ToString();
                    Hyoa_flowfield.hy_ifhiddle = flowfielddt.Rows[i]["hy_ifhiddle"].ToString();
                    Hyoa_flowfield.hy_ifdbsybt = flowfielddt.Rows[i]["hy_ifdbsybt"].ToString();
                    Hyoa_flowfield.hy_field1 = flowfielddt.Rows[i]["hy_field1"].ToString();
                    Hyoa_flowfield.hy_field2 = flowfielddt.Rows[i]["hy_field2"].ToString();
                    Hyoa_flowfield.hy_field3 = flowfielddt.Rows[i]["hy_field3"].ToString();
                    Hyoa_flowfield.hy_field4 = flowfielddt.Rows[i]["hy_field4"].ToString();
                    Hyoa_flowfield.hy_field5 = flowfielddt.Rows[i]["hy_field5"].ToString();
                    Hyoa_flowfield.Insert();
                }
            }
            #endregion

            #region 生成SQL/ORACLE中的表
            string sql = "";
            if (Session["conntype"].ToString() == "SQL")
            {
                sql = "select * into hyc_Table" + this.txtmudelid.Text + " from hyc_" + this.ddltableid.SelectedValue + " where 1=0";
            }
            if (Session["conntype"].ToString() == "ORACLE")
            {
                sql = "create table hyc_Table" + this.txtmudelid.Text + " as select * from hyc_" + this.ddltableid.SelectedValue + " where 1=2";
            }
            Hyoa_global.ExcuteSQL(sql);
            #endregion

            #region 生成列表
            DataTable listconfigdt = Hyoa_listconfig.GetlistconfigsbyMudelidAndTableid(this.ddlmudelid.SelectedValue, this.ddltableid.SelectedValue);
            //列表ID
            string strListId = Hyoa_global.GetRandom();
            if (listconfigdt.Rows.Count > 0)
            {
                Hyoa_listconfig.hy_mudelid = "Mudel" + this.txtmudelid.Text;
                Hyoa_listconfig.hy_tableid = "Table" + this.txtmudelid.Text;
                Hyoa_listconfig.hy_ifflowdoc = listconfigdt.Rows[0]["hy_ifflowdoc"].ToString();
                Hyoa_listconfig.hy_sort = System.Int32.Parse(this.txtno.Value);
                Hyoa_listconfig.hy_columnshowid = listconfigdt.Rows[0]["hy_columnshowid"].ToString();
                Hyoa_listconfig.hy_columnshow = listconfigdt.Rows[0]["hy_columnshow"].ToString();
                Hyoa_listconfig.hy_ifsearch = listconfigdt.Rows[0]["hy_ifsearch"].ToString();
                Hyoa_listconfig.hy_ifshowsearch = listconfigdt.Rows[0]["hy_ifshowsearch"].ToString();
                Hyoa_listconfig.hy_width = listconfigdt.Rows[0]["hy_width"].ToString();
                Hyoa_listconfig.hy_listname = this.txtmudelname.Text;
                Hyoa_listconfig.hy_sortfield1 = listconfigdt.Rows[0]["hy_sortfield1"].ToString();
                Hyoa_listconfig.hy_sorttype1 = listconfigdt.Rows[0]["hy_sorttype1"].ToString();
                Hyoa_listconfig.hy_sortfield2 = listconfigdt.Rows[0]["hy_sortfield2"].ToString();
                Hyoa_listconfig.hy_sorttype2 = listconfigdt.Rows[0]["hy_sorttype2"].ToString();
                Hyoa_listconfig.hy_sortfield3 = listconfigdt.Rows[0]["hy_sortfield3"].ToString();
                Hyoa_listconfig.hy_sorttype3 = listconfigdt.Rows[0]["hy_sorttype3"].ToString();
                Hyoa_listconfig.hy_fieldid_fl1 = listconfigdt.Rows[0]["hy_fieldid_fl1"].ToString();
                Hyoa_listconfig.hy_fieldname_fl1 = listconfigdt.Rows[0]["hy_fieldname_fl1"].ToString();
                Hyoa_listconfig.hy_sql_fl1 = listconfigdt.Rows[0]["hy_sql_fl1"].ToString();
                Hyoa_listconfig.hy_fieldid_fl2 = listconfigdt.Rows[0]["hy_fieldid_fl2"].ToString();
                Hyoa_listconfig.hy_fieldname_fl2 = listconfigdt.Rows[0]["hy_fieldname_fl2"].ToString();
                Hyoa_listconfig.hy_sql_fl2 = listconfigdt.Rows[0]["hy_sql_fl2"].ToString();
                Hyoa_listconfig.hy_fieldid_fl3 = listconfigdt.Rows[0]["hy_fieldid_fl3"].ToString();
                Hyoa_listconfig.hy_fieldname_fl3 = listconfigdt.Rows[0]["hy_fieldname_fl3"].ToString();
                Hyoa_listconfig.hy_sql_fl3 = listconfigdt.Rows[0]["hy_sql_fl3"].ToString();
                Hyoa_listconfig.ID = strListId;
                Hyoa_listconfig.Insert();
            }
            #endregion

            #region 生成列表查询条件
            DataTable listsearchdt = Hyoa_listsearchfield.GetlistsearchfieldsbyMudelidAndTableid(this.ddlmudelid.SelectedValue, this.ddltableid.SelectedValue);
            for (int m = 0; m < listsearchdt.Rows.Count; m++)
            {
                Hyoa_listsearchfield.ID = Hyoa_global.GetRandom();
                Hyoa_listsearchfield.hy_listid = strListId;
                Hyoa_listsearchfield.hy_mudelid = "Mudel" + this.txtmudelid.Text;
                Hyoa_listsearchfield.hy_tableid = "Table" + this.txtmudelid.Text;
                Hyoa_listsearchfield.hy_field = listsearchdt.Rows[m]["hy_field"].ToString();
                Hyoa_listsearchfield.hy_fieldid = listsearchdt.Rows[m]["hy_fieldid"].ToString();
                Hyoa_listsearchfield.hy_sort = m + 2;
                Hyoa_listsearchfield.Insert();
            }
            #endregion

            #region 生成流程信息
            string lssoureceflowid = "";
            if (tableconfigdt.Rows[0]["hy_ifflowdoc"].ToString() == "是")
            {
                DataTable flowinfordt = Hyoa_flowinfor.Getflowinforbymudelid(this.ddlmudelid.SelectedValue);
                if (flowinfordt.Rows.Count > 0)
                {
                    //得到老模块的flowid 后面要用到
                    lssoureceflowid = flowfielddt.Rows[0]["hy_flowid"].ToString();
                    //插入流程信息start
                    Hyoa_flowinfor.hy_flowid = "Flow" + this.txtmudelid.Text;
                    Hyoa_flowinfor.hy_flowname = this.txtmudelname.Text;
                    Hyoa_flowinfor.hy_sort = System.Int32.Parse(this.txtno.Value);
                    Hyoa_flowinfor.hy_mudelid = "Mudel" + this.txtmudelid.Text;
                    // Hyoa_flowinfor.hy_addbyalluser = flowinfordt.Rows[0]["hy_addbyalluser"].ToString();
                    Hyoa_flowinfor.Insert();
                }
                //插入流程信息end

                //流程环节
                DataTable flowtachedt = Hyoa_flowtache.Getflowtachebyflowid(lssoureceflowid);
                if (flowtachedt.Rows.Count > 0)
                {
                    for (i = 0; i < flowtachedt.Rows.Count; i++)
                    {
                        Hyoa_flowtache.ID = Hyoa_global.GetRandom();
                        Hyoa_flowtache.hy_flowid = "Flow" + this.txtmudelid.Text;
                        Hyoa_flowtache.hy_tacheid = flowtachedt.Rows[i]["hy_tacheid"].ToString();
                        Hyoa_flowtache.hy_tachename = flowtachedt.Rows[i]["hy_tachename"].ToString();
                        Hyoa_flowtache.hy_sort = System.Int32.Parse(flowtachedt.Rows[i]["hy_sort"].ToString());
                        Hyoa_flowtache.hy_ifshowcurcomp = flowtachedt.Rows[i]["hy_ifshowcurcomp"].ToString();
                        Hyoa_flowtache.hy_ifshowcurdept = flowtachedt.Rows[i]["hy_ifshowcurdept"].ToString();
                        Hyoa_flowtache.hy_XValue = flowtachedt.Rows[i]["hy_XValue"].ToString();
                        Hyoa_flowtache.hy_YValue = flowtachedt.Rows[i]["hy_YValue"].ToString();
                        Hyoa_flowtache.hy_rdDoIsSendSms = flowtachedt.Rows[i]["hy_rdDoIsSendSms"].ToString();
                        Hyoa_flowtache.hy_rdDoIsSendMessage = flowtachedt.Rows[i]["hy_rdDoIsSendMessage"].ToString();
                        Hyoa_flowtache.hy_rdPassIsSendSms = flowtachedt.Rows[i]["hy_rdPassIsSendSms"].ToString();
                        Hyoa_flowtache.hy_rdPassIsSendMessage = flowtachedt.Rows[i]["hy_rdPassIsSendMessage"].ToString();
                        Hyoa_flowtache.hy_enablecondition = flowtachedt.Rows[i]["hy_enablecondition"].ToString();
                        Hyoa_flowtache.Insert();
                    }
                }

                //流程环节对应的域
                DataTable flowtachefielddt = Hyoa_flowtachefield.Getflowtachefieldbyflowid(lssoureceflowid);
                if (flowtachefielddt.Rows.Count > 0)
                {
                    for (i = 0; i < flowtachefielddt.Rows.Count; i++)
                    {
                        Hyoa_flowtachefield.ID = Hyoa_global.GetRandom();
                        Hyoa_flowtachefield.hy_flowid = "Flow" + this.txtmudelid.Text;
                        Hyoa_flowtachefield.hy_tacheid = flowtachefielddt.Rows[i]["hy_tacheid"].ToString();
                        Hyoa_flowtachefield.hy_fieldid = flowtachefielddt.Rows[i]["hy_fieldid"].ToString();
                        Hyoa_flowtachefield.Insert();
                    }
                }
                //流程环节对应的用户
                DataTable flowtacheuserdt = Hyoa_flowtacheuser.Getflowtacheuserbyflowid(lssoureceflowid);
                if (flowtacheuserdt.Rows.Count > 0)
                {
                    for (i = 0; i < flowtacheuserdt.Rows.Count; i++)
                    {
                        Hyoa_flowtacheuser.ID = Hyoa_global.GetRandom();
                        Hyoa_flowtacheuser.hy_flowid = "Flow" + this.txtmudelid.Text;
                        Hyoa_flowtacheuser.hy_tacheid = flowtacheuserdt.Rows[i]["hy_tacheid"].ToString();
                        Hyoa_flowtacheuser.hy_userid = flowtacheuserdt.Rows[i]["hy_userid"].ToString();
                        Hyoa_flowtacheuser.Insert();
                    }
                }
                //工作流
                DataTable flowworkdt = Hyoa_flowwork.Getflowworksbyflowid(lssoureceflowid);
                if (flowworkdt.Rows.Count > 0)
                {
                    for (i = 0; i < flowworkdt.Rows.Count; i++)
                    {
                        Hyoa_flowwork.ID = Hyoa_global.GetRandom();
                        Hyoa_flowwork.hy_flowid = "Flow" + this.txtmudelid.Text;
                        Hyoa_flowwork.hy_curtacheid = flowworkdt.Rows[i]["hy_curtacheid"].ToString();
                        Hyoa_flowwork.hy_curtachename = flowworkdt.Rows[i]["hy_curtachename"].ToString();
                        Hyoa_flowwork.hy_nexttacheid = flowworkdt.Rows[i]["hy_nexttacheid"].ToString();
                        Hyoa_flowwork.hy_nexttachename = flowworkdt.Rows[i]["hy_nexttachename"].ToString();
                        Hyoa_flowwork.hy_sort = System.Int32.Parse(flowworkdt.Rows[i]["hy_sort"].ToString());
                        Hyoa_flowwork.hy_actiontype = flowworkdt.Rows[i]["hy_actiontype"].ToString();
                        Hyoa_flowwork.hy_identity_type = flowworkdt.Rows[i]["hy_identity_type"].ToString();
                        Hyoa_flowwork.hy_identity_id = flowworkdt.Rows[i]["hy_identity_id"].ToString();
                        Hyoa_flowwork.hy_jscondition = flowworkdt.Rows[i]["hy_jscondition"].ToString();
                        Hyoa_flowwork.hy_jscondition1 = flowworkdt.Rows[i]["hy_jscondition1"].ToString();
                        Hyoa_flowwork.hy_jscondition2 = flowworkdt.Rows[i]["hy_jscondition2"].ToString();
                        Hyoa_flowwork.hy_zdcyuserids = flowworkdt.Rows[i]["hy_zdcyuserids"].ToString();
                        Hyoa_flowwork.Insert();
                    }
                }

            }
            #endregion
        }
        catch
        {
            ls_tip = "复制失败!";
        }
        finally
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location.href='" + txturl.Text + "';</script>");
        }
    }
예제 #25
0
    //输出查询字段的表格(查询输入框)
    public void GetSearchTableHtml()
    {
        HyoaClass.Hyoa_listsearchfield Hyoa_listsearchfield = new HyoaClass.Hyoa_listsearchfield();
        DataTable dtlistsearch = new DataTable();
        if (this.txtlistid.Value == "")
        {
            dtlistsearch = Hyoa_listsearchfield.GetlistsearchfieldsbyMudelidAndTableid(this.txtmudelid.Value, this.txttableid.Value);
        }
        else
        {
            dtlistsearch = Hyoa_listsearchfield.Getlistsearchfieldsbylistid(this.txtlistid.Value);
        }
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        //得到表单配置信息
        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
        DataTable dt_tableconfig = Hyoa_tableconfig.GetTable(this.txttableid.Value);

        int li_colnums_show = int.Parse(dt_tableconfig.Rows[0]["hy_colnum"].ToString()) / 2;    //一行显示几列
        int li_rows_show = 0;   //一共有几行
        int li_ifaddcols = 0;   //所有列显示完成后,是否需要补齐显示列 0:否 1:是
        int li_addcols = 0;     //需要补齐的列数量
        if (dtlistsearch.Rows.Count % li_colnums_show == 0)
        {
            li_rows_show = dtlistsearch.Rows.Count / li_colnums_show;
            li_ifaddcols = 0;
        }
        else
        {
            li_rows_show = (dtlistsearch.Rows.Count / li_colnums_show) + 1;
            li_ifaddcols = 1;
            li_addcols = li_colnums_show - (dtlistsearch.Rows.Count % li_colnums_show);
        }
        for (int i = 0; i < li_rows_show; i++)
        {
            TableRow tRow = new TableRow();
            tb_search.Rows.Add(tRow);
            for (int j = 0; j < li_colnums_show; j++)
            {
                //dtlistsearch中的记录行数
                int t = i * li_colnums_show + j;
                if ((t + 1) > dtlistsearch.Rows.Count)
                {
                    break;
                }
                //得到hyt_listsearchfield表中的hy_fieldid,
                GetFieldHtml(tRow, li_colnums_show, dtlistsearch.Rows[t]["hy_fieldid"].ToString());
            }
            //如果最后一行的列没有显示完整,则补齐
            if (li_ifaddcols == 1 && i == (li_rows_show - 1))
            {
                for (int k = 0; k < li_addcols; k++)
                {
                    TableCell tCell8 = new TableCell();
                    tRow.Cells.Add(tCell8);
                    tCell8.Height = Unit.Pixel(30);
                    tCell8.CssClass = "Tdcellleft";
                    tCell8.HorizontalAlign = HorizontalAlign.Center;
                    tCell8.Controls.Add(new LiteralControl("&nbsp;"));
                    TableCell tCell9 = new TableCell();
                    tRow.Cells.Add(tCell9);
                    tCell9.Height = Unit.Pixel(30);
                    tCell9.CssClass = "Tdcellright";
                    tCell9.HorizontalAlign = HorizontalAlign.Center;
                    tCell9.Controls.Add(new LiteralControl("&nbsp;"));
                }
            }
        }
        //插入查询按钮行
        TableRow tRow2 = new TableRow();
        tb_search.Rows.Add(tRow2);
        TableCell tCell3 = new TableCell();
        tRow2.Cells.Add(tCell3);
        tCell3.Height = Unit.Pixel(30);
        tCell3.CssClass = "Tdcellright";
        tCell3.HorizontalAlign = HorizontalAlign.Right;
        tCell3.ColumnSpan = li_colnums_show * 2;
        Button btnButton = new Button();
        btnButton.ID = "btnsearch_ht";
        btnButton.Text = " 查 询";
        btnButton.CssClass = "btn7";
        btnButton.Click += new EventHandler(btnsearch_Click);
        tCell3.Controls.Add(btnButton);
    }
예제 #26
0
    private void DataPlay()
    {
        //是否流程文档
        this.ddlifflowdoc.Items.Insert(0, "否");
        this.ddlifflowdoc.Items.Insert(1, "是");
        //是否显示所有文档非流程
        this.ddlifdisplayall.Items.Insert(0, "否");
        this.ddlifdisplayall.Items.Insert(1, "是");
        //是否进行评论
        this.ddlifcomment.Items.Insert(0, "否");
        this.ddlifcomment.Items.Insert(1, "是");
        //主表单显示的列数
        this.ddldisplaycol.Items.Insert(0, "4");
        this.ddldisplaycol.Items.Insert(1, "6");
        this.ddldisplaycol.Items.Insert(2, "8");
        this.ddldisplaycol.Items.Insert(3, "10");
        //只对流程模块起作用,流程完成后是否公开,是表示大家都能看,否表示不公开
        this.ddlispuballByflowYB.Items.Insert(0, "否");
        this.ddlispuballByflowYB.Items.Insert(1, "是");

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

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

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

            //旧文档
            HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
            if (this.Request.QueryString["op"] == "modify")
            {
                if (this.Request.QueryString["id"] != null)
                {
                    //根据id得到信息
                    this.txtdocid.Text = this.Request.QueryString["id"].ToString();
                    this.txtdocid.Enabled = false;
                    DataTable dt = Hyoa_tableconfig.GetTable(this.txtdocid.Text);
                    if (dt.Rows.Count > 0)
                    {
                        this.ddlmudelid.SelectedValue = dt.Rows[0]["hy_mudelid"].ToString();
                        this.txtname.Value = dt.Rows[0]["hy_name"].ToString();
                        this.txtsort.Value = dt.Rows[0]["hy_sort"].ToString();
                        this.ddlifflowdoc.SelectedValue = dt.Rows[0]["hy_ifflowdoc"].ToString();
                        this.ddlifdisplayall.SelectedValue = dt.Rows[0]["hy_ifdisplayall"].ToString();
                        this.ddlifcomment.SelectedValue = dt.Rows[0]["hy_ifcomment"].ToString();
                        this.ddlispuballByflowYB.SelectedValue = dt.Rows[0]["hy_ispuballByflowYB"].ToString();
                        this.txthy_onload.Text = dt.Rows[0]["hy_onload"].ToString();
                        this.ddltablerole.SelectedValue = dt.Rows[0]["hy_tablerole"].ToString();
                        this.ddldisplaycol.SelectedValue = dt.Rows[0]["hy_colnum"].ToString();
                    }
                }
            }
            else
            {
                this.txtdocid.Text = "Table";
                //自动获取最大排序号,然后+2
                DataTable dt_maxsort = Hyoa_tableconfig.GetMaxtableconfigsort();
                if (dt_maxsort.Rows.Count > 0)
                    txtsort.Value = (int.Parse(dt_maxsort.Rows[0]["hy_sort"].ToString()) + 2).ToString();
                else
                    txtsort.Value = "1";
            }
        }
    }
예제 #27
0
    private void DataPlay(int PageNo)
    {
        //根据表ID和模块ID得到当前传进来的模块是否有流程
        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
        DataTable dttableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.txtmudelid.Value, this.txttableid.Value);

        //根据表单得到对应的所有字段
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dtflowfield = Hyoa_flowfield.Getflowfieldsbytableid(dttableconfig.Rows[0]["ID"].ToString());
        //循环所有字段
        string ls_flowfield = "";
        if (dtflowfield.Rows.Count > 0)
        {
            for (int i = 0; i < dtflowfield.Rows.Count; i++)
            {
                string ls_fieldtype = dtflowfield.Rows[i]["hy_fieldtype"].ToString();
                if (ls_fieldtype == "文本" || ls_fieldtype == "多行文本" || ls_fieldtype == "文本加按钮" || ls_fieldtype == "多行文本加按钮" || ls_fieldtype == "日期" || ls_fieldtype == "数值" || ls_fieldtype == "对话框列表" || ls_fieldtype == "复选框" || ls_fieldtype == "单选框" || ls_fieldtype == "口令")
                {
                    ls_flowfield += ",a.hyc_" + dtflowfield.Rows[i]["hy_fieldid"].ToString();
                }
            }
        }

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

        HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
        DataTable dtlist = Hyoa_listconfig.Getlistconfig(this.txtlistid.Value);     //列表配置

        this.lbdisplaytitle.Text = "";
        //得到当前页号
        this.curpage.Text = PageNo.ToString();

        //---查询条件---开始
        string cmdStr_Search = "";
        if (txtsearchfields.Text != "")
        {
            string[] lv_searchfields = txtsearchfields.Text.Split(',');
            string[] lv_searchfields_sx = txtsearchfields_sx.Text.Split(',');
            for (int i = 0; i < lv_searchfields.Length; i++)
            {
                string ls_fieldid = lv_searchfields[i].ToString();
                string ls_fieldid_sx = lv_searchfields_sx[i].ToString();
                string ls_searchtext = "";
                if (this.Request.Form[ls_fieldid] != null)
                {
                    ls_searchtext = this.Request.Form[ls_fieldid].ToString();
                }
                if (ls_searchtext != "")
                {
                    if (ls_fieldid_sx == "0")
                    {
                        cmdStr_Search += " and hyc_" + ls_fieldid + " like '%" + ls_searchtext + "%' ";
                    }
                    else
                    {
                        if (ls_fieldid_sx == "1")
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                cmdStr_Search += " and left(CONVERT(varchar, hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ", 120 ) ,10) >= '" + ls_searchtext + "' ";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                cmdStr_Search += " and to_char(hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ",'YYYY-MM-DD') >= '" + ls_searchtext + "' ";
                            }
                        }
                        if (ls_fieldid_sx == "2")
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                cmdStr_Search += " and left(CONVERT(varchar, hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ", 120 ) ,10) <= '" + ls_searchtext + "' ";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                cmdStr_Search += " and to_char(hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ",'YYYY-MM-DD') <= '" + ls_searchtext + "' ";
                            }
                        }
                        if (ls_fieldid_sx == "3")
                        {
                            cmdStr_Search += " and hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + " >= " + ls_searchtext + " ";
                        }
                        if (ls_fieldid_sx == "4")
                        {
                            cmdStr_Search += " and hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + " <= " + ls_searchtext + " ";
                        }
                    }
                }
            }
        }
        //---查询条件---结束
        //---排序---开始
        string cmdStr_SearchSort = "";
        if (dtlist.Rows[0]["hy_sortfield1"].ToString() != "")
        {
            if (cmdStr_SearchSort == "")
            {
                cmdStr_SearchSort = " order by hyc_" + dtlist.Rows[0]["hy_sortfield1"].ToString() + " " + dtlist.Rows[0]["hy_sorttype1"].ToString();
            }
            else
            {
                cmdStr_SearchSort += " ,hyc_" + dtlist.Rows[0]["hy_sortfield1"].ToString() + " " + dtlist.Rows[0]["hy_sorttype1"].ToString();
            }
        }
        if (dtlist.Rows[0]["hy_sortfield2"].ToString() != "")
        {
            if (cmdStr_SearchSort == "")
            {
                cmdStr_SearchSort = " order by hyc_" + dtlist.Rows[0]["hy_sortfield2"].ToString() + " " + dtlist.Rows[0]["hy_sorttype2"].ToString();
            }
            else
            {
                cmdStr_SearchSort += " ,hyc_" + dtlist.Rows[0]["hy_sortfield2"].ToString() + " " + dtlist.Rows[0]["hy_sorttype2"].ToString();
            }
        }
        if (dtlist.Rows[0]["hy_sortfield3"].ToString() != "")
        {
            if (cmdStr_SearchSort == "")
            {
                cmdStr_SearchSort = " order by hyc_" + dtlist.Rows[0]["hy_sortfield3"].ToString() + " " + dtlist.Rows[0]["hy_sorttype3"].ToString();
            }
            else
            {
                cmdStr_SearchSort += " ,hyc_" + dtlist.Rows[0]["hy_sortfield3"].ToString() + " " + dtlist.Rows[0]["hy_sorttype3"].ToString();
            }
        }
        if (this.txtfieldid.Value != "" && this.txtfieldsort.Value != "")
        {
            cmdStr_SearchSort = " order by hyc_" + this.txtfieldid.Value + " " + this.txtfieldsort.Value + " ";
        }
        if (cmdStr_SearchSort == "")
        {
            //没有配置,则默认按登记日期
            cmdStr_SearchSort = " order by hy_djsj desc ";
        }
        //---排序---结束

        //--根据查询条件得到返回数据集--s
        DataTable dt = new DataTable();         //单页数据集
        DataTable dt_total = new DataTable();   //数据总条数,返回总条数值
        DataTable dttable = Hyoa_tableconfig.GetTable(this.txttableid.Value);  //得到表配置信息查看当前表是否有流程 hy_ifflowdoc

        string cmdStr = "";

        string ls_from = "";
        ls_from = " hyc_" + this.txttableid.Value + " where 1=1 and hy_djrbmid='" + Session["hydeptid"].ToString() + "' " + cmdStr_Search;
        if (Session["conntype"].ToString() == "SQL")
        {
            cmdStr = "select top " + PageSize.Text + " * from " + ls_from;
            cmdStr += " and DOCID not in (select top " + ((PageNo - 1) * int.Parse(PageSize.Text)).ToString() + " DOCID from " + ls_from + cmdStr_SearchSort + ") " + cmdStr_SearchSort;
        }
        if (Session["conntype"].ToString() == "ORACLE")
        {
            cmdStr = " select * from ( ";
            cmdStr += " select my_table.*, rownum as my_rownum from ";
            cmdStr += " ( ";

            cmdStr += " select * from hyc_" + this.txttableid.Value + " where 1=1 and hy_djrbmid='" + Session["hydeptid"].ToString() + "' " + cmdStr_Search + cmdStr_SearchSort;

            cmdStr += " )  my_table ";
            cmdStr += " where rownum<= " + ((PageNo) * int.Parse(PageSize.Text)).ToString();
            cmdStr += " ) where my_rownum> " + ((PageNo - 1) * int.Parse(PageSize.Text)).ToString();
        }
        dt = Hyoa_global.GetDataTable(cmdStr);
        cmdStr = "select count(*) from " + ls_from;
        dt_total = Hyoa_global.GetDataTable(cmdStr);
        //--根据查询条件得到返回数据集--e

        //开始输出----整合成HTML为数据行
        DataTable tempTable = dt.Clone();
        DataColumn col = new DataColumn("displaycol", typeof(String)); //定义新的一列  add
        tempTable.Columns.Add(col);  //追加一列  add
        string lscolname = "";
        string lscolnameid = "";
        string lscolwidth = "";
        string ls_col = "";
        string[] lvcolname;
        string[] lvcolnameid;
        string[] lvcolwidth;
        string lscolwidthper;
        lscolname = dtlist.Rows[0]["hy_columnshow"].ToString();  //要显示的列名:附件,标题,收文来源
        lscolnameid = dtlist.Rows[0]["hy_columnshowid"].ToString();  //要显示的列名id:uploadfile1,Hy_bt,Hy_swly
        lscolwidth = dtlist.Rows[0]["hy_width"].ToString();  //要显示的列名id:10,20,30
        lvcolname = lscolname.Split(',');
        lvcolnameid = lscolnameid.Split(',');
        lvcolwidth = lscolwidth.Split(',');
        if (dt.Rows.Count <= 0)
        {
            //如果没有数据则输出表头
            for (int n = 0; n < lvcolname.Length; n++)
            {
                if (n >= lvcolwidth.Length)
                { lscolwidthper = ""; }//此判断是为了防止对应宽度没有输入时,会溢出报错。
                else
                { lscolwidthper = lvcolwidth[n]; }
                this.lbdisplaytitle.Text += "<td width=\"" + lscolwidthper + "%\" class=\"TdcellHead\"><p align=\"center\">" + lvcolname[n] + "</td>";
            }
        }
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            DataRow dr = tempTable.NewRow();
            //输出主表所有字段,start
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            //输出主表所有字段,end

            //////开始得到列的值
            DataTable dtgetsqlfield;
            for (int m = 0; m < lvcolname.Length; m++)
            {
                //如果有数据,则输出数据
                if (m >= lvcolwidth.Length)
                { lscolwidthper = ""; }//此判断是为了防止对应宽度没有输入时,会溢出报错。
                else
                { lscolwidthper = lvcolwidth[m]; }

                dtgetsqlfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(this.txtmudelid.Value, lvcolnameid[m], this.txttableid.Value);

                if (i % System.Int32.Parse(PageSize.Text) == 0)
                    this.lbdisplaytitle.Text += "<td width=\"" + lscolwidthper + "%\" class=\"TdcellHead\"><p align=\"center\"><a href=\"#\" title=\"点击可排序\" onclick=\"fun_sort('" + lvcolnameid[m] + "');\">" + lvcolname[m] + "</a></p></td>";

                //根据字段英文名,得到数据库中对应的字段
                string lsgetsqlfield = "hyc_" + dtgetsqlfield.Rows[0]["hy_fieldid"].ToString();
                //根据数据库中对应的字段,得到输出字段的值start (日期型根据格式进行了转换)
                string lsgetputfiled = "";
                if (dtgetsqlfield.Rows[0]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                {
                    if (dt.Rows[i][lsgetsqlfield].ToString() != "")
                        lsgetputfiled = System.DateTime.Parse(dt.Rows[i][lsgetsqlfield].ToString()).ToShortDateString();
                }
                else
                {
                    //解决Float小数点后面出现N位小数乱码的问题
                    if (dtgetsqlfield.Rows[0]["hy_fieldtype"].ToString() == "数值")
                    {
                        if (dt.Rows[i][lsgetsqlfield].ToString() != "")
                        {
                            //是否包含小数点,包含的话,取小数点后两位
                            if (dt.Rows[i][lsgetsqlfield].ToString().Contains(".") == true)
                            {
                                lsgetputfiled = float.Parse(dt.Rows[i][lsgetsqlfield].ToString()).ToString("F2");
                            }
                            else
                            {
                                lsgetputfiled = float.Parse(dt.Rows[i][lsgetsqlfield].ToString()).ToString();
                            }
                        }
                        else
                        {
                            lsgetputfiled = "0";
                        }
                        //lsgetputfiled = dt.Rows[i][lsgetsqlfield].ToString();
                    }
                    else
                    {
                        lsgetputfiled = dt.Rows[i][lsgetsqlfield].ToString();
                    }

                }
                if (lsgetputfiled == "")
                    lsgetputfiled = "&nbsp;";
                //根据得到的SQL字段,得到输出字段的值end
                if (dtgetsqlfield.Rows[0]["hy_ifdbsybt"].ToString() == "是")
                {
                    ls_col += "<td width=\"" + lscolwidthper + "%\" align=\"center\"><a href=\"#\" onclick=\"var ss='main.aspx?op=modify&mid=" + dt.Rows[i]["hy_mudelid"].ToString() + "&tableid=" + dt.Rows[i]["hy_tableid"].ToString() + "&docid=" + dt.Rows[i]["DOCID"].ToString() + "&url='+window.location;window.location=ss;\">" + lsgetputfiled + "</a></td>";
                }
                else
                {
                    ls_col += "<td width=\"" + lscolwidthper + "%\" align=\"center\">" + lsgetputfiled + "</td>";
                }
            }
            //如果是流程表单,则最后追加两列(当前环节和当前处理人)
            //表头
            if (dt.Rows[i]["hy_flowid"].ToString() != "" && dt.Rows[i]["hy_flowid"].ToString() != null && i == 0)
            {
                this.lbdisplaytitle.Text += "<td width=\"10%\" class=\"TdcellHead\"><p align=\"center\">当前环节</td>";
                this.lbdisplaytitle.Text += "<td width=\"10%\" class=\"TdcellHead\"><p align=\"center\">当前处理人</td>";
            }
            //数据
            if (dt.Rows[i]["hy_flowid"].ToString() != "" && dt.Rows[i]["hy_flowid"].ToString() != null)
            {
                ls_col += "<td width=\"10%\" align=\"center\">" + dt.Rows[i]["hy_curtachename"].ToString() + "&nbsp;</td>";
                ls_col += "<td width=\"10%\" align=\"center\">" + dt.Rows[i]["hy_curclrname"].ToString() + "&nbsp;</td>";
            }

            dr["displaycol"] = ls_col;  //将新值赋给相应的列  add
            ls_col = "";
            tempTable.Rows.Add(dr);
        }

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

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

            }
        }
        this.ShowTotalPage.Text = TotalPage.ToString();
        this.rptlist.DataSource = tempTable;
        this.rptlist.DataBind();
        dt.Clear();

        //列表中的一些特殊处理,都放在这个函数内
        DataPlay_Tscl();
    }
예제 #28
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_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
        Hyoa_tableconfig.ID = this.txtdocid.Text;
        Hyoa_tableconfig.hy_mudelid = this.ddlmudelid.SelectedValue.ToString();
        Hyoa_tableconfig.hy_name = this.txtname.Value;
        Hyoa_tableconfig.hy_onload = this.txthy_onload.Text;
        Hyoa_tableconfig.hy_sort = float.Parse(this.txtsort.Value);
        Hyoa_tableconfig.hy_ifflowdoc = this.ddlifflowdoc.SelectedValue;
        Hyoa_tableconfig.hy_ifdisplayall = this.ddlifdisplayall.SelectedValue;
        Hyoa_tableconfig.hy_ifcomment = this.ddlifcomment.SelectedValue;
        Hyoa_tableconfig.hy_ispuballByflowYB = this.ddlispuballByflowYB.SelectedValue;
        Hyoa_tableconfig.hy_tablerole = this.ddltablerole.SelectedValue;
        Hyoa_tableconfig.hy_colnum = float.Parse(this.ddldisplaycol.SelectedValue);
        Hyoa_tableconfig.hy_field1 = "";
        Hyoa_tableconfig.hy_field2 = "";
        Hyoa_tableconfig.hy_field3 = "";
        Hyoa_tableconfig.hy_field4 = "";
        Hyoa_tableconfig.hy_field5 = "";

        if (this.txtop.Value == "add")
        {
            //先判断是否已经存在
            DataTable dt = Hyoa_tableconfig.GetTable(this.txtdocid.Text);
            if (dt.Rows.Count > 0)
            {
                Response.Write("<script>alert('该表单编号已存在,请重新填写!');history.back();</script>");
                return;
            }
            if (this.txtdocid.Text.Length < 6)
            {
                Response.Write("<script>alert('表单编号长度必须大于5位!');history.back();</script>");
                return;
            }
            if (this.txtdocid.Text.Substring(0, 5) != "Table")
            {
                Response.Write("<script>alert('表单编号必须以Table开头!');history.back();</script>");
                return;
            }
            Hyoa_tableconfig.Insert();
            //创建SQL表
            if (CreateSQLTable()==false)
            {
                ls_tip = "生成表结构失败,请联系管理员!";
            }
        }
        else
        {
            Hyoa_tableconfig.Update();

            //修改时,保存完成后同时更新对应的字段中FLOWID值(如果非流程则置为空,如果是流程则置为值)
            HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
            if (this.ddlifflowdoc.SelectedValue == "是")
            {
                HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
                DataTable dt_flow = Hyoa_flowinfor.Getflowinforbymudelid(this.ddlmudelid.SelectedValue);
                if (dt_flow.Rows.Count > 0)
                {
                    Hyoa_flowfield.Updateflowid_For_tacheconfig(dt_flow.Rows[0]["hy_flowid"].ToString(), this.txtdocid.Text);
                }

            }
            else
            {
                Hyoa_flowfield.Updateflowid_For_tacheconfig("", this.txtdocid.Text);
            }

            //修改后,同时更新对应的字段中的模块ID,为了解决当表单中对应的模块修改后,字段中没有更新的BUG
            Hyoa_flowfield.Updatemudelid_For_tableconfig(this.ddlmudelid.SelectedValue, this.txtdocid.Text);
        }

        //处理完成后的提示及跳转
        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>");
        }
    }
예제 #29
0
    private void DataPlay(int PageNo)
    {
        //得到当前模块对应的role
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dt_mudel = Hyoa_mudel.Getmudel(this.txtmudelid.Value);
        string ls_role = "Role9999";
        if (dt_mudel.Rows.Count > 0)
            ls_role = dt_mudel.Rows[0]["hy_roleid"].ToString();
        //根据表ID和模块ID得到当前传进来的模块是否有流程
        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
        DataTable dttableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.txtmudelid.Value, this.txttableid.Value);
        //判断当前用户是否有删除权限
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (dttableconfig.Rows[0]["hy_ifflowdoc"].ToString() == "是")
        {
            //如果有流程的话,新建按钮就一直显示,不用作判断的,只要判断删除按钮就行。
            if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
            {
                this.isrole.Value = "1";
                this.delcontrol.Visible = true;
                this.newcontrol.Visible = true;
                //this.copycontrol.Visible = false;   //流程模块暂时都不能复制
            }
            else
            {
                this.isrole.Value = "0";
                this.newcontrol.Visible = true;
            }
        }
        else
        {
            //如果非流程(授权用户统一管理)
            if(dttableconfig.Rows[0]["hy_tablerole"].ToString() == "0")
            {
                if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
                {
                    this.isrole.Value = "1";
                    this.newcontrol.Visible = true;
                    this.delcontrol.Visible = true;
                    //this.copycontrol.Visible = true;
                }
                else
                {
                    this.isrole.Value = "0";
                }
            }
            //如果非流程(每个人管理自己的信息)
            if (dttableconfig.Rows[0]["hy_tablerole"].ToString() == "1")
            {
                this.isrole.Value = "1";
                this.newcontrol.Visible = true;
                this.delcontrol_my.Visible = true;
                //this.copycontrol.Visible = true;
            }
            //如果非流程(每个人操作自己的信息、授权用户可管理所有信息)
            if (dttableconfig.Rows[0]["hy_tablerole"].ToString() == "2")
            {
                if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
                {
                    this.isrole.Value = "1";
                    this.newcontrol.Visible = true;
                    this.delcontrol.Visible = true;
                    //this.copycontrol.Visible = true;
                }
                else
                {
                    this.isrole.Value = "0";
                    this.newcontrol.Visible = true;
                    this.delcontrol_my.Visible = true;
                    //this.copycontrol.Visible = true;
                }
            }
        }

        //得到当前页号
        this.lbdisplaytitle.Text = "";
        this.curpage.Text = PageNo.ToString();

        //---查询条件---开始
        HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
        Hyoa_flowmain.hy_mudelid = this.txtmudelid.Value;
        Hyoa_flowmain.hy_tableid = this.txttableid.Value;
        Hyoa_flowmain.hy_bt = this.hy_bt.Text;
        Hyoa_flowmain.hy_djrname = this.hy_djrname.Text;
        Hyoa_flowmain.hy_djrbmname = this.hy_djrbmname.Text;
        Hyoa_flowmain.hy_djsj_start = this.hy_djsj_start.Text;
        Hyoa_flowmain.hy_djsj_end = this.hy_djsj_end.Text;
        Hyoa_flowmain.hy_bt = this.hy_bt.Text;
        Hyoa_flowmain.hy_content1 = this.hy_content1.Text;
        Hyoa_flowmain.hy_content2 = this.hy_content2.Text;
        Hyoa_flowmain.hy_content3 = this.hy_content3.Text;
        Hyoa_flowmain.hy_content4 = this.hy_content4.Text;
        Hyoa_flowmain.hy_content5 = this.hy_content5.Text;
        Hyoa_flowmain.hy_field1 = this.hy_field1.Text;
        Hyoa_flowmain.hy_field2 = this.hy_field2.Text;
        Hyoa_flowmain.hy_field3 = this.hy_field3.Text;
        Hyoa_flowmain.hy_field4 = this.hy_field4.Text;
        Hyoa_flowmain.hy_field5 = this.hy_field5.Text;
        Hyoa_flowmain.hy_field6 = this.hy_field6.Text;
        Hyoa_flowmain.hy_field7 = this.hy_field7.Text;
        Hyoa_flowmain.hy_field8 = this.hy_field8.Text;
        Hyoa_flowmain.hy_field9 = this.hy_field9.Text;
        Hyoa_flowmain.hy_field10 = this.hy_field10.Text;
        Hyoa_flowmain.hy_field11 = this.hy_field11.Text;
        Hyoa_flowmain.hy_field12 = this.hy_field12.Text;
        Hyoa_flowmain.hy_field13 = this.hy_field13.Text;
        Hyoa_flowmain.hy_field14 = this.hy_field14.Text;
        Hyoa_flowmain.hy_field15 = this.hy_field15.Text;
        Hyoa_flowmain.hy_field16 = this.hy_field16.Text;
        Hyoa_flowmain.hy_field17 = this.hy_field17.Text;
        Hyoa_flowmain.hy_field18 = this.hy_field18.Text;
        Hyoa_flowmain.hy_field19 = this.hy_field19.Text;
        Hyoa_flowmain.hy_field20 = this.hy_field20.Text;
        Hyoa_flowmain.hy_field21 = this.hy_field21.Text;
        Hyoa_flowmain.hy_field22 = this.hy_field22.Text;
        Hyoa_flowmain.hy_field23 = this.hy_field23.Text;
        Hyoa_flowmain.hy_field24 = this.hy_field24.Text;
        Hyoa_flowmain.hy_field25 = this.hy_field25.Text;
        Hyoa_flowmain.hy_field26 = this.hy_field26.Text;
        Hyoa_flowmain.hy_field27 = this.hy_field27.Text;
        Hyoa_flowmain.hy_field28 = this.hy_field28.Text;
        Hyoa_flowmain.hy_field29 = this.hy_field29.Text;
        Hyoa_flowmain.hy_field30 = this.hy_field30.Text;
        Hyoa_flowmain.hy_field31_start = this.hy_field31_start.Text;
        Hyoa_flowmain.hy_field32_start = this.hy_field32_start.Text;
        Hyoa_flowmain.hy_field33_start = this.hy_field33_start.Text;
        Hyoa_flowmain.hy_field34_start = this.hy_field34_start.Text;
        Hyoa_flowmain.hy_field35_start = this.hy_field35_start.Text;
        Hyoa_flowmain.hy_field31_end = this.hy_field31_end.Text;
        Hyoa_flowmain.hy_field32_end = this.hy_field32_end.Text;
        Hyoa_flowmain.hy_field33_end = this.hy_field33_end.Text;
        Hyoa_flowmain.hy_field34_end = this.hy_field34_end.Text;
        Hyoa_flowmain.hy_field35_end = this.hy_field35_end.Text;
        if (this.hy_field36_start.Text == "")
        {
            this.hy_field36_start.Text = "0";
        }
        if (this.hy_field37_start.Text == "")
        {
            this.hy_field37_start.Text = "0";
        }
        if (this.hy_field38_start.Text == "")
        {
            this.hy_field38_start.Text = "0";
        }
        if (this.hy_field39_start.Text == "")
        {
            this.hy_field39_start.Text = "0";
        }
        if (this.hy_field40_start.Text == "")
        {
            this.hy_field40_start.Text = "0";
        }
        if (this.hy_field36_end.Text == "")
        {
            this.hy_field36_end.Text = "0";
        }
        if (this.hy_field37_end.Text == "")
        {
            this.hy_field37_end.Text = "0";
        }
        if (this.hy_field38_end.Text == "")
        {
            this.hy_field38_end.Text = "0";
        }
        if (this.hy_field39_end.Text == "")
        {
            this.hy_field39_end.Text = "0";
        }
        if (this.hy_field40_end.Text == "")
        {
            this.hy_field40_end.Text = "0";
        }
        Hyoa_flowmain.hy_field36_start = float.Parse(this.hy_field36_start.Text);
        Hyoa_flowmain.hy_field37_start = float.Parse(this.hy_field37_start.Text);
        Hyoa_flowmain.hy_field38_start = float.Parse(this.hy_field38_start.Text);
        Hyoa_flowmain.hy_field39_start = float.Parse(this.hy_field39_start.Text);
        Hyoa_flowmain.hy_field40_start = float.Parse(this.hy_field40_start.Text);
        Hyoa_flowmain.hy_field36_end = float.Parse(this.hy_field36_end.Text);
        Hyoa_flowmain.hy_field37_end = float.Parse(this.hy_field37_end.Text);
        Hyoa_flowmain.hy_field38_end = float.Parse(this.hy_field38_end.Text);
        Hyoa_flowmain.hy_field39_end = float.Parse(this.hy_field39_end.Text);
        Hyoa_flowmain.hy_field40_end = float.Parse(this.hy_field40_end.Text);
        Hyoa_flowmain.hy_field41 = this.hy_field41.Text;
        Hyoa_flowmain.hy_field42 = this.hy_field42.Text;
        Hyoa_flowmain.hy_field43 = this.hy_field43.Text;
        Hyoa_flowmain.hy_field44 = this.hy_field44.Text;
        Hyoa_flowmain.hy_field45 = this.hy_field45.Text;
        Hyoa_flowmain.hy_field46 = this.hy_field46.Text;
        Hyoa_flowmain.hy_field47 = this.hy_field47.Text;
        Hyoa_flowmain.hy_field48 = this.hy_field48.Text;
        Hyoa_flowmain.hy_field49 = this.hy_field49.Text;
        Hyoa_flowmain.hy_field50 = this.hy_field50.Text;
        Hyoa_flowmain.hy_field51 = this.hy_field51.Text;
        Hyoa_flowmain.hy_field52 = this.hy_field52.Text;
        Hyoa_flowmain.hy_field53 = this.hy_field53.Text;
        Hyoa_flowmain.hy_field54 = this.hy_field54.Text;
        Hyoa_flowmain.hy_field55 = this.hy_field55.Text;
        Hyoa_flowmain.hy_field56 = this.hy_field56.Text;
        Hyoa_flowmain.hy_field57 = this.hy_field57.Text;
        Hyoa_flowmain.hy_field58 = this.hy_field58.Text;
        Hyoa_flowmain.hy_field59 = this.hy_field59.Text;
        Hyoa_flowmain.hy_field60 = this.hy_field60.Text;

        Hyoa_flowmain.hy_field61_start = this.hy_field61_start.Text;
        Hyoa_flowmain.hy_field62_start = this.hy_field62_start.Text;
        Hyoa_flowmain.hy_field63_start = this.hy_field63_start.Text;
        Hyoa_flowmain.hy_field64_start = this.hy_field64_start.Text;
        Hyoa_flowmain.hy_field65_start = this.hy_field65_start.Text;
        Hyoa_flowmain.hy_field66_start = this.hy_field66_start.Text;
        Hyoa_flowmain.hy_field67_start = this.hy_field67_start.Text;
        Hyoa_flowmain.hy_field68_start = this.hy_field68_start.Text;
        Hyoa_flowmain.hy_field69_start = this.hy_field69_start.Text;
        Hyoa_flowmain.hy_field70_start = this.hy_field70_start.Text;
        Hyoa_flowmain.hy_field61_end = this.hy_field61_end.Text;
        Hyoa_flowmain.hy_field62_end = this.hy_field62_end.Text;
        Hyoa_flowmain.hy_field63_end = this.hy_field63_end.Text;
        Hyoa_flowmain.hy_field64_end = this.hy_field64_end.Text;
        Hyoa_flowmain.hy_field65_end = this.hy_field65_end.Text;
        Hyoa_flowmain.hy_field66_end = this.hy_field66_end.Text;
        Hyoa_flowmain.hy_field67_end = this.hy_field67_end.Text;
        Hyoa_flowmain.hy_field68_end = this.hy_field68_end.Text;
        Hyoa_flowmain.hy_field69_end = this.hy_field69_end.Text;
        Hyoa_flowmain.hy_field70_end = this.hy_field70_end.Text;

        if (this.hy_field71_start.Text == "")
        {
            this.hy_field71_start.Text = "0";
        }
        if (this.hy_field72_start.Text == "")
        {
            this.hy_field72_start.Text = "0";
        }
        if (this.hy_field73_start.Text == "")
        {
            this.hy_field73_start.Text = "0";
        }
        if (this.hy_field74_start.Text == "")
        {
            this.hy_field74_start.Text = "0";
        }
        if (this.hy_field75_start.Text == "")
        {
            this.hy_field75_start.Text = "0";
        }
        if (this.hy_field76_start.Text == "")
        {
            this.hy_field76_start.Text = "0";
        }
        if (this.hy_field77_start.Text == "")
        {
            this.hy_field77_start.Text = "0";
        }
        if (this.hy_field78_start.Text == "")
        {
            this.hy_field78_start.Text = "0";
        }
        if (this.hy_field79_start.Text == "")
        {
            this.hy_field79_start.Text = "0";
        }
        if (this.hy_field80_start.Text == "")
        {
            this.hy_field80_start.Text = "0";
        }
        if (this.hy_field71_end.Text == "")
        {
            this.hy_field71_end.Text = "0";
        }
        if (this.hy_field72_end.Text == "")
        {
            this.hy_field72_end.Text = "0";
        }
        if (this.hy_field73_end.Text == "")
        {
            this.hy_field73_end.Text = "0";
        }
        if (this.hy_field74_end.Text == "")
        {
            this.hy_field74_end.Text = "0";
        }
        if (this.hy_field75_end.Text == "")
        {
            this.hy_field75_end.Text = "0";
        }
        if (this.hy_field76_end.Text == "")
        {
            this.hy_field76_end.Text = "0";
        }
        if (this.hy_field77_end.Text == "")
        {
            this.hy_field77_end.Text = "0";
        }
        if (this.hy_field78_end.Text == "")
        {
            this.hy_field78_end.Text = "0";
        }
        if (this.hy_field79_end.Text == "")
        {
            this.hy_field79_end.Text = "0";
        }
        if (this.hy_field80_end.Text == "")
        {
            this.hy_field80_end.Text = "0";
        }

        if (this.hy_field81_start.Text == "")
        {
            this.hy_field81_start.Text = "0";
        }
        if (this.hy_field82_start.Text == "")
        {
            this.hy_field82_start.Text = "0";
        }
        if (this.hy_field83_start.Text == "")
        {
            this.hy_field83_start.Text = "0";
        }
        if (this.hy_field84_start.Text == "")
        {
            this.hy_field84_start.Text = "0";
        }
        if (this.hy_field85_start.Text == "")
        {
            this.hy_field85_start.Text = "0";
        }
        if (this.hy_field86_start.Text == "")
        {
            this.hy_field86_start.Text = "0";
        }
        if (this.hy_field87_start.Text == "")
        {
            this.hy_field87_start.Text = "0";
        }
        if (this.hy_field88_start.Text == "")
        {
            this.hy_field88_start.Text = "0";
        }
        if (this.hy_field89_start.Text == "")
        {
            this.hy_field89_start.Text = "0";
        }
        if (this.hy_field90_start.Text == "")
        {
            this.hy_field90_start.Text = "0";
        }
        if (this.hy_field81_end.Text == "")
        {
            this.hy_field81_end.Text = "0";
        }
        if (this.hy_field82_end.Text == "")
        {
            this.hy_field82_end.Text = "0";
        }
        if (this.hy_field83_end.Text == "")
        {
            this.hy_field83_end.Text = "0";
        }
        if (this.hy_field84_end.Text == "")
        {
            this.hy_field84_end.Text = "0";
        }
        if (this.hy_field85_end.Text == "")
        {
            this.hy_field85_end.Text = "0";
        }
        if (this.hy_field86_end.Text == "")
        {
            this.hy_field86_end.Text = "0";
        }
        if (this.hy_field87_end.Text == "")
        {
            this.hy_field87_end.Text = "0";
        }
        if (this.hy_field88_end.Text == "")
        {
            this.hy_field88_end.Text = "0";
        }
        if (this.hy_field89_end.Text == "")
        {
            this.hy_field89_end.Text = "0";
        }
        if (this.hy_field90_end.Text == "")
        {
            this.hy_field90_end.Text = "0";
        }
        //ztm
        if (this.hy_field91_start.Text == "")
        {
            this.hy_field91_start.Text = "0";
        }
        if (this.hy_field92_start.Text == "")
        {
            this.hy_field92_start.Text = "0";
        }
        if (this.hy_field93_start.Text == "")
        {
            this.hy_field93_start.Text = "0";
        }
        if (this.hy_field94_start.Text == "")
        {
            this.hy_field94_start.Text = "0";
        }
        if (this.hy_field95_start.Text == "")
        {
            this.hy_field95_start.Text = "0";
        }
        if (this.hy_field96_start.Text == "")
        {
            this.hy_field96_start.Text = "0";
        }
        if (this.hy_field97_start.Text == "")
        {
            this.hy_field97_start.Text = "0";
        }
        if (this.hy_field98_start.Text == "")
        {
            this.hy_field98_start.Text = "0";
        }
        if (this.hy_field99_start.Text == "")
        {
            this.hy_field99_start.Text = "0";
        }
        if (this.hy_field100_start.Text == "")
        {
            this.hy_field100_start.Text = "0";
        }
        if (this.hy_field91_end.Text == "")
        {
            this.hy_field91_end.Text = "0";
        }
        if (this.hy_field92_end.Text == "")
        {
            this.hy_field92_end.Text = "0";
        }
        if (this.hy_field93_end.Text == "")
        {
            this.hy_field93_end.Text = "0";
        }
        if (this.hy_field94_end.Text == "")
        {
            this.hy_field94_end.Text = "0";
        }
        if (this.hy_field95_end.Text == "")
        {
            this.hy_field95_end.Text = "0";
        }
        if (this.hy_field96_end.Text == "")
        {
            this.hy_field96_end.Text = "0";
        }
        if (this.hy_field97_end.Text == "")
        {
            this.hy_field97_end.Text = "0";
        }
        if (this.hy_field98_end.Text == "")
        {
            this.hy_field98_end.Text = "0";
        }
        if (this.hy_field99_end.Text == "")
        {
            this.hy_field99_end.Text = "0";
        }
        if (this.hy_field100_end.Text == "")
        {
            this.hy_field100_end.Text = "0";
        }
        Hyoa_flowmain.hy_field71_start = float.Parse(this.hy_field71_start.Text);
        Hyoa_flowmain.hy_field72_start = float.Parse(this.hy_field72_start.Text);
        Hyoa_flowmain.hy_field73_start = float.Parse(this.hy_field73_start.Text);
        Hyoa_flowmain.hy_field74_start = float.Parse(this.hy_field74_start.Text);
        Hyoa_flowmain.hy_field75_start = float.Parse(this.hy_field75_start.Text);
        Hyoa_flowmain.hy_field76_start = float.Parse(this.hy_field76_start.Text);
        Hyoa_flowmain.hy_field77_start = float.Parse(this.hy_field77_start.Text);
        Hyoa_flowmain.hy_field78_start = float.Parse(this.hy_field78_start.Text);
        Hyoa_flowmain.hy_field79_start = float.Parse(this.hy_field79_start.Text);
        Hyoa_flowmain.hy_field80_start = float.Parse(this.hy_field80_start.Text);

        Hyoa_flowmain.hy_field71_end = float.Parse(this.hy_field71_end.Text);
        Hyoa_flowmain.hy_field72_end = float.Parse(this.hy_field72_end.Text);
        Hyoa_flowmain.hy_field73_end = float.Parse(this.hy_field73_end.Text);
        Hyoa_flowmain.hy_field74_end = float.Parse(this.hy_field74_end.Text);
        Hyoa_flowmain.hy_field75_end = float.Parse(this.hy_field75_end.Text);
        Hyoa_flowmain.hy_field76_end = float.Parse(this.hy_field76_end.Text);
        Hyoa_flowmain.hy_field77_end = float.Parse(this.hy_field77_end.Text);
        Hyoa_flowmain.hy_field78_end = float.Parse(this.hy_field78_end.Text);
        Hyoa_flowmain.hy_field79_end = float.Parse(this.hy_field79_end.Text);
        Hyoa_flowmain.hy_field80_end = float.Parse(this.hy_field80_end.Text);

        Hyoa_flowmain.hy_field81_start = float.Parse(this.hy_field81_start.Text);
        Hyoa_flowmain.hy_field82_start = float.Parse(this.hy_field82_start.Text);
        Hyoa_flowmain.hy_field83_start = float.Parse(this.hy_field83_start.Text);
        Hyoa_flowmain.hy_field84_start = float.Parse(this.hy_field84_start.Text);
        Hyoa_flowmain.hy_field85_start = float.Parse(this.hy_field85_start.Text);
        Hyoa_flowmain.hy_field86_start = float.Parse(this.hy_field86_start.Text);
        Hyoa_flowmain.hy_field87_start = float.Parse(this.hy_field87_start.Text);
        Hyoa_flowmain.hy_field88_start = float.Parse(this.hy_field88_start.Text);
        Hyoa_flowmain.hy_field89_start = float.Parse(this.hy_field89_start.Text);
        Hyoa_flowmain.hy_field90_start = float.Parse(this.hy_field90_start.Text);

        Hyoa_flowmain.hy_field81_end = float.Parse(this.hy_field81_end.Text);
        Hyoa_flowmain.hy_field82_end = float.Parse(this.hy_field82_end.Text);
        Hyoa_flowmain.hy_field83_end = float.Parse(this.hy_field83_end.Text);
        Hyoa_flowmain.hy_field84_end = float.Parse(this.hy_field84_end.Text);
        Hyoa_flowmain.hy_field85_end = float.Parse(this.hy_field85_end.Text);
        Hyoa_flowmain.hy_field86_end = float.Parse(this.hy_field86_end.Text);
        Hyoa_flowmain.hy_field87_end = float.Parse(this.hy_field87_end.Text);
        Hyoa_flowmain.hy_field88_end = float.Parse(this.hy_field88_end.Text);
        Hyoa_flowmain.hy_field89_end = float.Parse(this.hy_field89_end.Text);
        Hyoa_flowmain.hy_field90_end = float.Parse(this.hy_field90_end.Text);

        Hyoa_flowmain.hy_field91_start = float.Parse(this.hy_field91_start.Text);
        Hyoa_flowmain.hy_field92_start = float.Parse(this.hy_field92_start.Text);
        Hyoa_flowmain.hy_field93_start = float.Parse(this.hy_field93_start.Text);
        Hyoa_flowmain.hy_field94_start = float.Parse(this.hy_field94_start.Text);
        Hyoa_flowmain.hy_field95_start = float.Parse(this.hy_field95_start.Text);
        Hyoa_flowmain.hy_field96_start = float.Parse(this.hy_field96_start.Text);
        Hyoa_flowmain.hy_field97_start = float.Parse(this.hy_field97_start.Text);
        Hyoa_flowmain.hy_field98_start = float.Parse(this.hy_field98_start.Text);
        Hyoa_flowmain.hy_field99_start = float.Parse(this.hy_field99_start.Text);
        Hyoa_flowmain.hy_field100_start = float.Parse(this.hy_field100_start.Text);

        Hyoa_flowmain.hy_field91_end = float.Parse(this.hy_field91_end.Text);
        Hyoa_flowmain.hy_field92_end = float.Parse(this.hy_field92_end.Text);
        Hyoa_flowmain.hy_field93_end = float.Parse(this.hy_field93_end.Text);
        Hyoa_flowmain.hy_field94_end = float.Parse(this.hy_field94_end.Text);
        Hyoa_flowmain.hy_field95_end = float.Parse(this.hy_field95_end.Text);
        Hyoa_flowmain.hy_field96_end = float.Parse(this.hy_field96_end.Text);
        Hyoa_flowmain.hy_field97_end = float.Parse(this.hy_field97_end.Text);
        Hyoa_flowmain.hy_field98_end = float.Parse(this.hy_field98_end.Text);
        Hyoa_flowmain.hy_field99_end = float.Parse(this.hy_field99_end.Text);
        Hyoa_flowmain.hy_field100_end = float.Parse(this.hy_field100_end.Text);

        Hyoa_flowmain.hy_curclrid = this.Session["hyuid"].ToString();
        Hyoa_flowmain.hy_curuserid = this.Session["hyuid"].ToString();
        //排序
        HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
        DataTable dt_listconfig = Hyoa_listconfig.GetlistconfigByTableid(this.txttableid.Value);
        if (dt_listconfig.Rows.Count > 0)
        {
            Hyoa_flowmain.hy_sorttype = dt_listconfig.Rows[0]["hy_sortfield"].ToString() + " " + dt_listconfig.Rows[0]["hy_sorttype"].ToString();
        }

        //---查询条件---结束

        //--根据查询条件得到返回数据集--s
        DataTable dt;
        DataTable dttable = Hyoa_tableconfig.GetTable(this.txttableid.Value);  //得到表配置信息查看当前表是否有流程 hy_ifflowdoc
        dt = Hyoa_flowmain.GetflowmainsByIf_db();  //输出当前处理人是自己的dt
        //if (dttable.Rows[0]["hy_ifflowdoc"].ToString()=="是")
        //{
        //    //this.Response.Write("<script>alert('" + dttable.Rows[0]["hy_ispuballByflowYB"].ToString() + "')</script>");
        //     //dt = Hyoa_flowmain.GetflowmainsByIf();  //输出流程的dt
        //    if (dttable.Rows[0]["hy_ispuballByflowYB"].ToString() == "是")
        //    {
        //        dt = Hyoa_flowmain.GetflowmainsByIf_jsDisplayAll();  //输出流程的dt
        //    }
        //    else
        //    {
        //        dt = Hyoa_flowmain.GetflowmainsByIf();  //输出流程的dt
        //    }
        //}
        //else
        //{
        //    if (dttable.Rows[0]["hy_ifdisplayall"].ToString() == "是")
        //    {
        //        dt = Hyoa_flowmain.GetAllflowmainsByNoFlows();//输出所有的dt
        //    }
        //    else
        //    {
        //        dt = Hyoa_flowmain.GetPersonerflowmainsByNoFlows();//输出自己的dt
        //    }
        //}
        //--根据查询条件得到返回数据集--e

        //开始输出----整合成HTML为数据行
        DataTable tempTable = dt.Clone();
        DataColumn col = new DataColumn("displaycol", typeof(String)); //定义新的一列  add
        tempTable.Columns.Add(col);  //追加一列  add
        string lscolname = "";
        string lscolnameid = "";
        string lscolwidth = "";
        string ls_col = "";
        string[] lvcolname;
        string[] lvcolnameid;
        string[] lvcolwidth;
        string lscolwidthper;

        //HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
        DataTable dtlist = Hyoa_listconfig.GetlistconfigsbyMudelidAndTableid(this.txtmudelid.Value,this.txttableid.Value);
        lscolname = dtlist.Rows[0]["hy_columnshow"].ToString();  //要显示的列名:附件,标题,收文来源
        lscolnameid = dtlist.Rows[0]["hy_columnshowid"].ToString();  //要显示的列名id:uploadfile1,Hy_bt,Hy_swly
        lscolwidth = dtlist.Rows[0]["hy_width"].ToString();  //要显示的列名id:10,20,30
        lvcolname = lscolname.Split(',');
        lvcolnameid = lscolnameid.Split(',');
        lvcolwidth = lscolwidth.Split(',');
        if (dt.Rows.Count <= 0)
        {
            //如果没有数据则输出表头
            for (int n = 0; n < lvcolname.Length; n++)
            {
                if (n >= lvcolwidth.Length)
                { lscolwidthper = ""; }//此判断是为了防止对应宽度没有输入时,会溢出报错。
                else
                { lscolwidthper = lvcolwidth[n]; }
                this.lbdisplaytitle.Text += "<td width=\"" + lscolwidthper + "%\" class=\"TdcellHead\"><p align=\"center\">" + lvcolname[n] + "</td>";
            }
        }
        for (int i = (PageNo - 1) * System.Int32.Parse(PageSize.Text); i < PageNo * System.Int32.Parse(PageSize.Text); i++)
        {
            if (i > dt.Rows.Count - 1)
                break;

            DataRow dr = tempTable.NewRow();
            //输出主表所有字段,start
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            //输出主表所有字段,end

            //////开始得到列的值
            HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
            DataTable dtgetsqlfield;
            for (int m = 0; m < lvcolname.Length; m++)
            {
                //如果有数据,则输出数据
                if (m >= lvcolwidth.Length)
                { lscolwidthper = ""; }//此判断是为了防止对应宽度没有输入时,会溢出报错。
                else
                { lscolwidthper = lvcolwidth[m]; }

                dtgetsqlfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(this.txtmudelid.Value, lvcolnameid[m],this.txttableid.Value);
                //ztm
                if (i % System.Int32.Parse(PageSize.Text) == 0)
                    this.lbdisplaytitle.Text += "<td width=\"" + lscolwidthper + "%\" class=\"TdcellHead\"><p align=\"center\">" + lvcolname[m] + "</td>";

                //根据字段英文名,得到数据库中对应的字段
                string lsgetsqlfield = dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString();
                //根据数据库中对应的字段,得到输出字段的值start (日期型根据格式进行了转换)
                string lsgetputfiled="";
                if (dtgetsqlfield.Rows[0]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                {
                    lsgetputfiled = System.DateTime.Parse(dt.Rows[i][lsgetsqlfield].ToString()).ToShortDateString();
                }
                else
                {
                    //解决Float小数点后面出现N位小数乱码的问题
                    if (dtgetsqlfield.Rows[0]["hy_fieldtype"].ToString() == "数值")
                    {
                        //是否包含小数点,包含的话,取小数点后两位
                        if (dt.Rows[i][lsgetsqlfield].ToString().Contains(".") == true)
                        {
                            lsgetputfiled = float.Parse(dt.Rows[i][lsgetsqlfield].ToString()).ToString("F2");
                        }
                        else
                        {
                            lsgetputfiled = float.Parse(dt.Rows[i][lsgetsqlfield].ToString()).ToString();
                        }

                        //lsgetputfiled = dt.Rows[i][lsgetsqlfield].ToString();
                    }else
                    {
                        lsgetputfiled = dt.Rows[i][lsgetsqlfield].ToString();
                    }

                }
                if (lsgetputfiled == "")
                    lsgetputfiled = "&nbsp;";
                //根据得到的SQL字段,得到输出字段的值end
                if (lsgetputfiled == "1900-1-1")
                    lsgetputfiled = "";
                ls_col += "<td width=\"" + lscolwidthper + "%\" align=\"center\">" + lsgetputfiled + "</td>";
            }
            //如果是流程表单,则最后追加两列(当前环节和当前处理人)
            //表头
            if (dt.Rows[i]["hy_flowid"].ToString() != "" && dt.Rows[i]["hy_flowid"].ToString() != null && i == (PageNo - 1) * System.Int32.Parse(PageSize.Text))
            {
                this.lbdisplaytitle.Text += "<td width=\"10%\" class=\"TdcellHead\"><p align=\"center\">当前环节</td>";
                this.lbdisplaytitle.Text += "<td width=\"10%\" class=\"TdcellHead\"><p align=\"center\">当前处理人</td>";
            }
            //数据
            if (dt.Rows[i]["hy_flowid"].ToString() != "" && dt.Rows[i]["hy_flowid"].ToString() != null)
            {
                ls_col += "<td width=\"10%\" align=\"center\">" + dt.Rows[i]["hy_curtachename"].ToString() + "&nbsp;</td>";
                ls_col += "<td width=\"10%\" align=\"center\">" + dt.Rows[i]["hy_curclrname"].ToString() + "&nbsp;</td>";
            }

            dr["displaycol"] = ls_col;  //将新值赋给相应的列  add
            ls_col = "";
            tempTable.Rows.Add(dr);
        }

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

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

            }
        }
        this.ShowTotalPage.Text = TotalPage.ToString();
        this.rptlist.DataSource = tempTable;
        this.rptlist.DataBind();
        dt.Clear();
    }
예제 #30
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的特殊处理
            }
        }
    }