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


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

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


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

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