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


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

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


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

示例1: btnLogin_Click

 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("更新完成");
 }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:49,代码来源:updatehyc.aspx.cs

示例2: DataPlay

    private void DataPlay()
    {
        //加载可选择的表
        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
        DataTable dt_tableconfig = Hyoa_tableconfig.GetTables();
        this.ddlwhichtable.DataSource = dt_tableconfig;
        this.ddlwhichtable.DataTextField = "hy_name";
        this.ddlwhichtable.DataValueField = "ID";
        this.ddlwhichtable.DataBind();
        this.ddlwhichtable.Items.Insert(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; //保存
            }
            //旧文档
            if (this.Request.QueryString["op"] == "modify")
            {
                this.txtdocid.Value = this.Request.QueryString["docid"].ToString();

                HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
                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();
                    //this.txtflowid.Text = dt.Rows[0]["hy_flowid"].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.txtfieldname.Text = dt.Rows[0]["hy_fieldname"].ToString();
                    this.ddlfieldtype.SelectedValue = 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.txtsqlfield.Text = dt.Rows[0]["hy_sqlfield"].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();
                }
                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)
                    {
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:Webapp,代码行数:101,代码来源:main_flowfield.aspx.cs

示例3: DataPlay

    private void DataPlay(int PageNo)
    {
        //判断当前用户是否有新建删除权限
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
        {
            this.isrole.Value = "1";
            this.tdnewdoc.Visible = true; //新建
            this.tddeldoc.Visible = true; //删除
            this.tdcopydoc.Visible = true;//复制

        }
        else
        {
            this.isrole.Value = "0";
            this.tdnewdoc.Visible = false; //新建
            this.tddeldoc.Visible = false; //删除
            this.tdcopydoc.Visible = false;//复制
        }

        //得到当前页号
        this.curpage.Text = PageNo.ToString();
        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();

        DataTable dt = new DataTable();
        if (this.hy_name.Value != "")
        {
            dt = Hyoa_tableconfig.Getdocsbyname(this.hy_name.Value);
        }
        else
        {
            dt = Hyoa_tableconfig.GetTables();
        }

        DataTable tempTable = dt.Clone();
        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();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            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();
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:76,代码来源:list_tableconfig.aspx.cs


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