当前位置: 首页>>代码示例>>C#>>正文


C# HyoaClass.Hyoa_tableconfig.GetTable方法代码示例

本文整理汇总了C#中HyoaClass.Hyoa_tableconfig.GetTable方法的典型用法代码示例。如果您正苦于以下问题:C# HyoaClass.Hyoa_tableconfig.GetTable方法的具体用法?C# HyoaClass.Hyoa_tableconfig.GetTable怎么用?C# HyoaClass.Hyoa_tableconfig.GetTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HyoaClass.Hyoa_tableconfig的用法示例。


在下文中一共展示了HyoaClass.Hyoa_tableconfig.GetTable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

    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 = "付款";
        }
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:84,代码来源:main.aspx.cs

示例2: Button_Save_Click

    //保存
    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>");
        }
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:88,代码来源:main_tableconfig.aspx.cs

示例3: Page_Load

    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();
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:74,代码来源:main_print.aspx.cs

示例4: Page_Load

    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;
            }

        }
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:69,代码来源:list_db.aspx.cs

示例5: DataPlay

    private void DataPlay(int PageNo)
    {
        //得到当前模块对应的全权用户组
        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)
        {
            if (dt_mudel.Rows[0]["hy_qqroleid"] == null)
            {
                return;
            }
            else
            {
                if (dt_mudel.Rows[0]["hy_qqroleid"] == "")
                {
                    return;
                }
                else
                {
                    ls_role = dt_mudel.Rows[0]["hy_qqroleid"].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 (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
        {
            this.isrole.Value = "1";
        }
        else
        {
            this.isrole.Value = "0";
            Response.Write("<script>alert('您无权访问此页面的数据!');self.close();</script>");
            return;
        }

        //根据表单得到对应的所有字段
        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);     //列表配置

        this.lbdisplaytitle.Text = "";

        //---排序---开始
        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 == "")
        {
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:101,代码来源:list_qqyh_printall.aspx.cs

示例6: Page_Load

    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();
        //判断是否有合同编号
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:101,代码来源:main_look.aspx.cs

示例7: Page_Load

    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();
        }
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:64,代码来源:list_selfdept.aspx.cs

示例8: Page_Load

    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;
                this.Getslbh();
                //得到表单名称
                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;
            }
            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_flc.aspx?mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&listid=" + this.txtlistid.Text;
                getreturnurl(); //特殊返回地址
            }

        }
        DataPlay();
        // add by wjs 20141029 start
        if (this.txtop.Value != "add")
        {
            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.td2.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.td_submit2.Visible = true;
            }
        }
        if (this.hy_tableid.Text == "Tablesjgl")
        {
            if (Hy_IfHaveRole(this.hy_mudelid.Text, this.Session["hyuid"].ToString()) == "1")
            {
                this.td_gxsj.Visible = true;
            }
        }
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:96,代码来源:main_flc.aspx.cs

示例9: DataPlay

    //打开文档显示
    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 ";
                            }
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:Webapp,代码行数:101,代码来源:Search_All.aspx.cs

示例10: DataPlay

    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_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();
        //如果非流程(授权用户可新建信息、可删除所有信息)
        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;
            }
        }
        //如果非流程(授权用户可新建、只能删自己新建的信息)
        if (dttableconfig.Rows[0]["hy_tablerole"].ToString() == "3")
        {
            if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
            {
                this.isrole.Value = "1";
                this.newcontrol.Visible = true;
                this.delcontrol_sq.Visible = true;
                //this.copycontrol.Visible = true;
            }
        }

        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++)
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:101,代码来源:list_flc.aspx.cs

示例11: DataPlay

    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_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();
        //如果非流程(授权用户统一管理)
        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;
            }
            else
            {
                this.isrole.Value = "0";
                this.newcontrol.Visible = true;
                this.delcontrol_my.Visible = true;
            }
        }

        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 + "%' ";
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:101,代码来源:list_fl.aspx.cs

示例12: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        hyoa = new HyoaClass.Hyoa_global();
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("login.aspx");
        if (!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["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["docid"] != null)
            {
                string docid = "";
                docid = this.Request.QueryString["docid"].ToString();
                if (docid.Contains(","))
                    docid = docid.Substring(0, docid.IndexOf(","));

                this.txtdocid.Value = docid;
            }
            string ls_sql = "SELECT * FROM hyc_Tablesjgl WHERE DOCID = '" + this.txtdocid.Value + "'";
            DataTable dt = hyoa.GetDataTable(ls_sql);
            if (dt.Rows.Count > 0)
            {
                this.xmmc.Value = dt.Rows[0]["hyc_xmmc"].ToString();
                this.fzr.Value = dt.Rows[0]["hyc_fzr"].ToString();
                this.ys.Value = dt.Rows[0]["hyc_ys"].ToString();
                this.jssjjh.Value = dt.Rows[0]["hyc_jssjjh"].ToString();
                this.cglc.Value = dt.Rows[0]["hyc_cglc"].ToString();
                this.jtxq.Value = dt.Rows[0]["hyc_jtxq"].ToString();
                this.khjcr.Value = dt.Rows[0]["hyc_khjcr"].ToString();
                this.jzds.Value = dt.Rows[0]["hyc_jzds"].ToString();
                this.swot.Value = dt.Rows[0]["hyc_swot"].ToString();
                this.mqjd.Value = dt.Rows[0]["hyc_mqjd"].ToString();
                this.xybjh.Value = dt.Rows[0]["hyc_xybjh"].ToString();
                this.zywt.Value = dt.Rows[0]["hyc_zywt"].ToString();
                this.jb.Value = dt.Rows[0]["hyc_jb"].ToString();
                this.xmlx.Value = dt.Rows[0]["hyc_xmlx"].ToString();
                this.sjxl.Value = dt.Rows[0]["hyc_sjxl"].ToString();
                DateTime dtime = new DateTime();
                if (DateTime.TryParse(dt.Rows[0]["hyc_djsj"].ToString(), out dtime))
                {
                    this.djsj.Value = dtime.ToString("yyyy-MM-dd");
                }
            }
            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
            }
            if (this.Request.QueryString["op"] != null)
            {
                string op = "";
                op = this.Request.QueryString["op"].ToString();
                if (op.Contains(","))
                    op = op.Substring(0, op.IndexOf(","));

                this.txtop.Value = op;
            }
            if (this.txtop.Value == "modify")
            {
                this.txturl.Value = "main_flc.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "";
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:101,代码来源:main_sjgl.aspx.cs

示例13: DataPlay

    //加载主表单    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"] == "add")
            {
                //文档ID(保存POST到当前页面时,DOCID不重新加载)
                if (!this.IsPostBack)
                {
                    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);
                            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 == "")
                                    {
                                        Response.Write("<script>alert('您无权进行此项操作,请联系管理员!');window.location='" + this.txturl.Value + "';</script>");
                                        this.td_submit.Visible = false;
                                        this.td_nextstep.Visible = false;
                                        return;
                                    }
                                    else
                                    {
                                        Response.Write("<script>alert('您无权进行此项操作,请联系管理员!');self.close();</script>");
                                        return;
                                    }
                                }
                            }
                            dt.Clear();
                            this.td_nextstep.Visible = true; //提交
                        }
                    }
                    //加载页面
                    GetMainTableHtml("0", this.txtSystemClRight.Value, "1", this.hy_curtacheid.Text);
                    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";
                    }
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:101,代码来源:wap_main.aspx.cs

示例14: DataPlay

    private void DataPlay()
    {
        //加载可选择的表
        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();

        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_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
            if (this.Request.QueryString["op"] == "modify")
            {
                this.txtdocid.Value = this.Request.QueryString["docid"].ToString();
                DataTable dt = Hyoa_flowfield.Getflowfield(this.txtdocid.Value);
                if (dt.Rows.Count > 0)
                {
                    this.txttableid.Text = dt.Rows[0]["hy_tableid"].ToString();
                    this.txtmudelid.Text = dt.Rows[0]["hy_mudelid"].ToString();

                    //得到流程编号(如果当前字段所在的表单是流程表单,则需要读取FLOWID)
                    DataTable dt_table = Hyoa_tableconfig.GetTable(this.txttableid.Text);
                    if (dt_table.Rows.Count > 0)
                    {
                        if (dt_table.Rows[0]["hy_ifflowdoc"].ToString() == "是")
                        {
                            HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
                            DataTable dt_flow = Hyoa_flowinfor.Getflowinforbymudelid(this.txtmudelid.Text);
                            if (dt_flow.Rows.Count > 0)
                            {
                                this.txtflowid.Text = dt_flow.Rows[0]["hy_flowid"].ToString();
                            }
                        }
                        else
                        {
                            this.txtflowid.Text = "";
                        }
                    }

                    this.txtfieldid.Text = dt.Rows[0]["hy_fieldid"].ToString();
                    this.txtfieldid.Enabled = false;
                    this.txtfieldname.Text = dt.Rows[0]["hy_fieldname"].ToString();
                    this.ddlfieldtype.SelectedValue = dt.Rows[0]["hy_fieldtype"].ToString();
                    this.txtfieldtype_old.Text = dt.Rows[0]["hy_fieldtype"].ToString();
                    this.ddlifreadonly.SelectedValue = dt.Rows[0]["hy_ifreadonly"].ToString();
                    this.ddldefaultvaluetype.SelectedValue = dt.Rows[0]["hy_defaultvaluetype"].ToString();
                    this.txtdefaultvalue.Text = dt.Rows[0]["hy_defaultvalue"].ToString();
                    this.ddloptiontype.SelectedValue = dt.Rows[0]["hy_optiontype"].ToString();
                    this.txtoptions.Text = dt.Rows[0]["hy_options"].ToString();
                    this.txtonclick.Text = dt.Rows[0]["hy_onclick"].ToString();
                    this.txtondblclick.Text = dt.Rows[0]["hy_ondblclick"].ToString();
                    this.txtonchange.Text = dt.Rows[0]["hy_onchange"].ToString();
                    this.txtonkeydown.Text = dt.Rows[0]["hy_onkeydown"].ToString();
                    this.txtonkeyup.Text = dt.Rows[0]["hy_onkeyup"].ToString();
                    this.txtonfocus.Text = dt.Rows[0]["hy_onfocus"].ToString();
                    this.txtonblur.Text = dt.Rows[0]["hy_onblur"].ToString();
                    this.txtclass.Text = dt.Rows[0]["hy_class"].ToString();
                    this.txtwidth.Text = dt.Rows[0]["hy_width"].ToString();
                    this.txtheight.Text = dt.Rows[0]["hy_height"].ToString();
                    this.ddltdnums.SelectedValue = dt.Rows[0]["hy_tdnums"].ToString();
                    this.txtsort.Text = dt.Rows[0]["hy_sort"].ToString();
                    this.txtwordlimit.Text = dt.Rows[0]["hy_wordlimit"].ToString();
                    this.ddlrequired.SelectedValue = dt.Rows[0]["hy_required"].ToString();
                    this.ddlalign.SelectedValue = dt.Rows[0]["hy_align"].ToString();
                    this.ddlifhiddle.SelectedValue = dt.Rows[0]["hy_ifhiddle"].ToString();
                    this.ddlifdbsybt.SelectedValue = dt.Rows[0]["hy_ifdbsybt"].ToString();
                }
                dt.Clear();
            }
            else
            {
                //得到模块ID
                DataTable dt = Hyoa_tableconfig.GetTable(this.txttableid.Text);
                if (dt.Rows.Count > 0)
                {
                    this.txtmudelid.Text = dt.Rows[0]["hy_mudelid"].ToString();
                }
                else
                {
                    Response.Write("<script>alert('读取表单信息出错!');history.back();</script>");
                }
                //得到流程编号(如果当前字段所在的表单是流程表单,则需要读取FLOWID)
                if (dt.Rows[0]["hy_ifflowdoc"].ToString() == "是")
                {
                    HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
                    DataTable dt_flow = Hyoa_flowinfor.Getflowinforbymudelid(this.txtmudelid.Text);
                    if (dt_flow.Rows.Count > 0)
                    {
                        this.txtflowid.Text = dt_flow.Rows[0]["hy_flowid"].ToString();
                    }
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:101,代码来源:main_flowfield.aspx.cs

示例15: DataPlay

    //加载主表单    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")
            {
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:101,代码来源:main.aspx.cs


注:本文中的HyoaClass.Hyoa_tableconfig.GetTable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。