相关TableLayoutPanel分页显示自定义控件
public partial class AcrossGrid : UserControl
{
/// <summary>
/// 一页数量
/// </summary>
private int _RowCount = ;
/// <summary>
/// 数据源
/// </summary>
public List<string> DataList { get; set; } = new List<string>(); public AcrossGrid()
{
InitializeComponent();
} /// <summary>
/// 请空
/// </summary>
public void Clear()
{
DataList.Clear();
tableLPClear();
label_YeShu.Text = "1/1";
} private void tableLPClear()
{
for (int i = ; i < tableLP.Controls.Count; i++)
{
Label lbl = (Label)tableLP.Controls[i];
lbl.Text = "";
}
} /// <summary>
/// 加载数据
/// </summary>
/// <param name="list">数据源</param>
/// <param name="name">完整材料,缺少的材料,多的材料</param>
public void Init(List<string> list)
{
Clear();
if (list == null || list.Count < ) return; DataList = list;
label_YeShu.Text = "1/" + (list.Count + _RowCount - ) / _RowCount; LoadData(, _RowCount);
} /// <summary>
///
/// </summary>
/// <param name="pageNumber">页码</param>
/// <param name="pageSize">页数</param>
private void LoadData(int pageNumber, int pageSize)
{
tableLPClear();
int j = ;
for (int i = (pageNumber - ) * pageSize; i < DataList.Count && j < pageSize; i++)
{
//
// label5
//
Label lbl = (Label)tableLP.Controls[j]; lbl.Text = DataList[i]; j++;
}
label_YeShu.Text = pageNumber + "/" + (DataList.Count + _RowCount - ) / _RowCount;
} private void btnNext_Click(object sender, EventArgs e)
{
string ys = label_YeShu.Text;
string[] ysLst = ys.Split('/');
if (int.Parse(ysLst[]) >= int.Parse(ysLst[])) return;
LoadData(int.Parse(ysLst[]) + , _RowCount);
} private void btnLast_Click(object sender, EventArgs e)
{
string ys = label_YeShu.Text;
string[] ysLst = ys.Split('/');
if (int.Parse(ysLst[]) <= ) return;
LoadData(int.Parse(ysLst[]) - , _RowCount);
}
}
partial class AcrossGrid
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null; /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
} #region 组件设计器生成的代码 /// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label_YeShu = new System.Windows.Forms.Label();
this.btnNext = new System.Windows.Forms.Button();
this.btnLast = new System.Windows.Forms.Button();
this.tableLP = new System.Windows.Forms.TableLayoutPanel();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.tableLP.SuspendLayout();
this.SuspendLayout();
//
// label_YeShu
//
this.label_YeShu.BackColor = System.Drawing.Color.Transparent;
this.label_YeShu.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label_YeShu.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label_YeShu.Location = new System.Drawing.Point(, );
this.label_YeShu.Name = "label_YeShu";
this.label_YeShu.Size = new System.Drawing.Size(, );
this.label_YeShu.TabIndex = ;
this.label_YeShu.Text = "1/1";
this.label_YeShu.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnNext
//
this.btnNext.BackgroundImage = global::LControls.Properties.Resources.next_xy;
this.btnNext.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.btnNext.FlatAppearance.BorderSize = ;
this.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNext.Location = new System.Drawing.Point(, );
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(, );
this.btnNext.TabIndex = ;
this.btnNext.UseVisualStyleBackColor = true;
this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
//
// btnLast
//
this.btnLast.BackgroundImage = global::LControls.Properties.Resources.last_xy;
this.btnLast.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.btnLast.FlatAppearance.BorderSize = ;
this.btnLast.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLast.Location = new System.Drawing.Point(, );
this.btnLast.Name = "btnLast";
this.btnLast.Size = new System.Drawing.Size(, );
this.btnLast.TabIndex = ;
this.btnLast.UseVisualStyleBackColor = true;
this.btnLast.Click += new System.EventHandler(this.btnLast_Click);
//
// tableLP
//
this.tableLP.BackColor = System.Drawing.Color.Transparent;
this.tableLP.ColumnCount = ;
this.tableLP.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLP.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLP.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLP.Controls.Add(this.label1, , );
this.tableLP.Controls.Add(this.label2, , );
this.tableLP.Controls.Add(this.label3, , );
this.tableLP.Controls.Add(this.label4, , );
this.tableLP.Controls.Add(this.label5, , );
this.tableLP.Controls.Add(this.label6, , );
this.tableLP.Controls.Add(this.label7, , );
this.tableLP.Controls.Add(this.label8, , );
this.tableLP.Controls.Add(this.label9, , );
this.tableLP.Controls.Add(this.label10, , );
this.tableLP.Controls.Add(this.label11, , );
this.tableLP.Controls.Add(this.label12, , );
this.tableLP.Controls.Add(this.label13, , );
this.tableLP.Controls.Add(this.label14, , );
this.tableLP.Controls.Add(this.label15, , );
this.tableLP.Controls.Add(this.label16, , );
this.tableLP.Controls.Add(this.label17, , );
this.tableLP.Controls.Add(this.label18, , );
this.tableLP.Controls.Add(this.label19, , );
this.tableLP.Controls.Add(this.label20, , );
this.tableLP.Controls.Add(this.label21, , );
this.tableLP.Location = new System.Drawing.Point(, );
this.tableLP.Name = "tableLP";
this.tableLP.RowCount = ;
this.tableLP.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
this.tableLP.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
this.tableLP.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
this.tableLP.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
this.tableLP.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
this.tableLP.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
this.tableLP.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
this.tableLP.Size = new System.Drawing.Size(, );
this.tableLP.TabIndex = ;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label1.Location = new System.Drawing.Point(, );
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(, );
this.label1.TabIndex = ;
this.label1.Text = "";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label2.Location = new System.Drawing.Point(, );
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(, );
this.label2.TabIndex = ;
this.label2.Text = "";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label3.Location = new System.Drawing.Point(, );
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(, );
this.label3.TabIndex = ;
this.label3.Text = "";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label4.Location = new System.Drawing.Point(, );
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(, );
this.label4.TabIndex = ;
this.label4.Text = "";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label5.Location = new System.Drawing.Point(, );
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(, );
this.label5.TabIndex = ;
this.label5.Text = "";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label6.Location = new System.Drawing.Point(, );
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(, );
this.label6.TabIndex = ;
this.label6.Text = "";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label7.Location = new System.Drawing.Point(, );
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(, );
this.label7.TabIndex = ;
this.label7.Text = "";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label8.Location = new System.Drawing.Point(, );
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(, );
this.label8.TabIndex = ;
this.label8.Text = "";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label9.Location = new System.Drawing.Point(, );
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(, );
this.label9.TabIndex = ;
this.label9.Text = "";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label10.Location = new System.Drawing.Point(, );
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(, );
this.label10.TabIndex = ;
this.label10.Text = "";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label11.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label11.Location = new System.Drawing.Point(, );
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(, );
this.label11.TabIndex = ;
this.label11.Text = "";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label12.Location = new System.Drawing.Point(, );
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(, );
this.label12.TabIndex = ;
this.label12.Text = "";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label13.Location = new System.Drawing.Point(, );
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(, );
this.label13.TabIndex = ;
this.label13.Text = "";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label14.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label14.Location = new System.Drawing.Point(, );
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(, );
this.label14.TabIndex = ;
this.label14.Text = "";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label15.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label15.Location = new System.Drawing.Point(, );
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(, );
this.label15.TabIndex = ;
this.label15.Text = "";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label16.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label16.Location = new System.Drawing.Point(, );
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(, );
this.label16.TabIndex = ;
this.label16.Text = "";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label17.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label17.Location = new System.Drawing.Point(, );
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(, );
this.label17.TabIndex = ;
this.label17.Text = "";
//
// label18
//
this.label18.AutoSize = true;
this.label18.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label18.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label18.Location = new System.Drawing.Point(, );
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(, );
this.label18.TabIndex = ;
this.label18.Text = "";
//
// label19
//
this.label19.AutoSize = true;
this.label19.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label19.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label19.Location = new System.Drawing.Point(, );
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(, );
this.label19.TabIndex = ;
this.label19.Text = "";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label20.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label20.Location = new System.Drawing.Point(, );
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(, );
this.label20.TabIndex = ;
this.label20.Text = "";
//
// label21
//
this.label21.AutoSize = true;
this.label21.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.label21.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.label21.Location = new System.Drawing.Point(, );
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(, );
this.label21.TabIndex = ;
this.label21.Text = "";
//
// AcrossGrid
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tableLP);
this.Controls.Add(this.label_YeShu);
this.Controls.Add(this.btnNext);
this.Controls.Add(this.btnLast);
this.Name = "AcrossGrid";
this.Size = new System.Drawing.Size(, );
this.tableLP.ResumeLayout(false);
this.tableLP.PerformLayout();
this.ResumeLayout(false); } #endregion private System.Windows.Forms.Label label_YeShu;
private System.Windows.Forms.Button btnNext;
private System.Windows.Forms.Button btnLast;
private System.Windows.Forms.TableLayoutPanel tableLP;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label18;
}
相关TableLayoutPanel分页显示自定义控件的更多相关文章
- JSP分页显示实例(基于Bootstrap)
首先介绍一款简单利落的分页显示利器:bootstrap-paginator 效果截图: GitHub官方下载地址:https://github.com/lyonlai/bootstrap-pagina ...
- 基于Jquery+Ajax+Json实现分页显示
1.后台action产生json数据. List blackList = blackService.getBlackInfoList(mobileNum, gatewayid, startDate, ...
- Spring boot入门(三):SpringBoot集成结合AdminLTE(Freemarker),利用generate自动生成代码,利用DataTable和PageHelper进行分页显示
关于SpringBoot和PageHelper,前篇博客已经介绍过Spring boot入门(二):Spring boot集成MySql,Mybatis和PageHelper插件,前篇博客大致讲述了S ...
- day70 cookie & session 前后端交互分页显示
本文转载自qimi博客,cnblog.liwenzhou.com 概要: 我们的cookie是保存在浏览器中的键值对 为什么要有cookie? 我们在访问浏览器的时候,千万个人访问同一个页面,我们只要 ...
- Orchard运用 - 定制博客分页显示
一般,对于条目过多的系统或博客,分页显示是最简单的方式.目前分页方式基本有三种格式: 1.显示所有信息,包括标明当前页面,提供上一页和下一页链接和使用首页和末页链接. 2.只标注上一页和下一页链接. ...
- django-xadmin定制之分页显示数量
环境:xadmin-for-python3 python3.5.2 django1.9.12 主要思路:利用django-xadmin的插件原理和原有分页插件的逻辑,单独定义一个分页显示数插件,效果如 ...
- 基于SpringBoot从零构建博客网站 - 分页显示文章列表功能
显示文章列表一般都是采用分页显示,比如每页10篇文章显示.这样就不用每次就将所有的文章查询出来,而且当文章数量特别多的时候,如果一次性查询出来很容易出现OOM异常. 后台的分页插件采用的是mybati ...
- 108)PHP分页显示
一个代码页的链接:https://www.cnblogs.com/mmykdbc/p/6688460.html 首先一个简单的代码展示: 目录关系: 数据库表格展示: 结果展示: 然后 代码展示 ...
- Java 与 Mysql连接,并分页显示
这是我第一个上规模的Java项目,我们必须在一周内完成的作业,零基础学习Java,网上收集了很多资料,逐渐对面向对象的思想有所了解,但还是半灌水,后期打算结合项目系统地学习一遍Java.老师布置的任务 ...
随机推荐
- vue中element 的上传功能
element 的上传功能 最近有个需求,需要在上传文件前,可以进行弹窗控制是否上传upload 看完文档后,感觉有两种思路可以实现 基于before-upload :上传文件之前的钩子,参数为上传的 ...
- java程序设计基础篇 复习笔记 第六单元
第六章 一维数组 1 数组初始化语法 array initializer 2 for each loop 3 off-by-one error 通常是在循环中该使用<的地方使用了<= 4 ...
- UML_03_类图
一.前言 类图是UML结构图,在类和接口的层次上显示设计系统的结构,显示它们的特性.约束和关系等,是定义其它图的基础. 二.类图 如上图,在类图中表示方法如下: 斜体 :抽象类.抽象方法 下划线 :静 ...
- python金融分析项目
1.进入ipython: C:\Users\Administrator>ipython Python (v3. , ::) [MSC v. bit (AM D64)] Type 'copyrig ...
- [转载]latex插入两栏的图形或表格
转载自:http://blog.csdn.net/huilingwu/article/details/51649250 latex进行两栏排版时,有时会遇到一些宽度较大的图形或表格,没办法挤在一栏中, ...
- Java基础部分全套教程.
这是我自己早前听课时整理的java基础全套知识,使用于初学者,也可以适用于中级的程序员,我做成了chm文档的类型,你们可以下载 笔记是比较系统全面,可以抵得上市场上90%的学习资料.讨厌那些随便乱写的 ...
- ubuntu下mysql安装提供外网访问
修改配置文件 1. sudo apt-get install mysql-server #安装mysql服务器 2. sudo apt-get install mysql-client #安装mys ...
- Jmeter-ForEach控制器
ForEach Controller需要配合‘用户定义的变量’来使用,作用是参数化 名称:字面意思,ForEach Controller的名称 注释:字面意思 输入变量前缀:变量的前缀:如要使用的变量 ...
- 语义耦合(Semantic Coupling)
跟小伙伴一起重构一段 UI,试图将用户界面和业务代码分离的时候,小伙伴试图在业务代码中直接调用 UI.我们当然都知道这会产生耦合,于是小伙伴试图定义一些属性.变量或接口来解决这个耦合.虽然在代码的静态 ...
- hadoop2.2使用手册2:如何运行自带wordcount
问题导读:1.hadoop2.x自带wordcount在什么位置?2.运行wordcount程序,需要做哪些准备? 此篇是在hadoop2完全分布式最新高可靠安装文档 hadoop2.X使用手册1:通 ...