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分页显示自定义控件的更多相关文章

  1. JSP分页显示实例(基于Bootstrap)

    首先介绍一款简单利落的分页显示利器:bootstrap-paginator 效果截图: GitHub官方下载地址:https://github.com/lyonlai/bootstrap-pagina ...

  2. 基于Jquery+Ajax+Json实现分页显示

    1.后台action产生json数据. List blackList = blackService.getBlackInfoList(mobileNum, gatewayid, startDate, ...

  3. Spring boot入门(三):SpringBoot集成结合AdminLTE(Freemarker),利用generate自动生成代码,利用DataTable和PageHelper进行分页显示

    关于SpringBoot和PageHelper,前篇博客已经介绍过Spring boot入门(二):Spring boot集成MySql,Mybatis和PageHelper插件,前篇博客大致讲述了S ...

  4. day70 cookie & session 前后端交互分页显示

    本文转载自qimi博客,cnblog.liwenzhou.com 概要: 我们的cookie是保存在浏览器中的键值对 为什么要有cookie? 我们在访问浏览器的时候,千万个人访问同一个页面,我们只要 ...

  5. Orchard运用 - 定制博客分页显示

    一般,对于条目过多的系统或博客,分页显示是最简单的方式.目前分页方式基本有三种格式: 1.显示所有信息,包括标明当前页面,提供上一页和下一页链接和使用首页和末页链接. 2.只标注上一页和下一页链接. ...

  6. django-xadmin定制之分页显示数量

    环境:xadmin-for-python3 python3.5.2 django1.9.12 主要思路:利用django-xadmin的插件原理和原有分页插件的逻辑,单独定义一个分页显示数插件,效果如 ...

  7. 基于SpringBoot从零构建博客网站 - 分页显示文章列表功能

    显示文章列表一般都是采用分页显示,比如每页10篇文章显示.这样就不用每次就将所有的文章查询出来,而且当文章数量特别多的时候,如果一次性查询出来很容易出现OOM异常. 后台的分页插件采用的是mybati ...

  8. 108)PHP分页显示

    一个代码页的链接:https://www.cnblogs.com/mmykdbc/p/6688460.html 首先一个简单的代码展示: 目录关系: 数据库表格展示: 结果展示:   然后  代码展示 ...

  9. Java 与 Mysql连接,并分页显示

    这是我第一个上规模的Java项目,我们必须在一周内完成的作业,零基础学习Java,网上收集了很多资料,逐渐对面向对象的思想有所了解,但还是半灌水,后期打算结合项目系统地学习一遍Java.老师布置的任务 ...

随机推荐

  1. HDU 4696 Answers (脑补+数形结合)

    题意 给一个图,每个点的出度为1,每个点的权值为1或者2.给Q个询问,问是否能找到一条路径的权值和M. 思路 由于每个点的出度为1,所以必然存在环.又因为c[i]只能取1或者2,可以组成任意值,所以只 ...

  2. ansible 调用playbook api执行(一)

    一 调用ansible playbook api执行playbook 1 准备好hosts文件 root@ansible:~/ansible/playbooks# cat hosts [all:var ...

  3. ReadWriteLock读写锁

    ReadWriteLock维护了一对锁,读锁可允许多个读线程并发使用,写锁是独占的. 下面通过一个简单的例子来了解ReadWriteLock. package com.ccfdod.juc; impo ...

  4. CSS样式--移动划过超链接鼠标变手型详解

    用css控制鼠标样式的语法如下:<span style="cursor:*">文本或其它页面元素</span>把 * 换成如下15个效果的一种: 下面是对这 ...

  5. lvs fullnat部署手册(一)fullnat内核编译篇

    标签:kernel rpm lvs fullnat 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://shanks.blog.51c ...

  6. node 封装db层

    var db = {}; var mysql = require('mysql'); var pool = mysql.createPool({ connectionLimit: , host: '1 ...

  7. 内存保护机制及绕过方法——利用Ret2Libc绕过DEP之ZwSetInformationProcess函数

    1.    DEP内存保护机制 1.1   DEP工作原理 分析缓冲区溢出攻击,其根源在于现代计算机对数据和代码没有明确区分这一先天缺陷,就目前来看重新去设计计算机体系结构基本上是不可能的,我们只能靠 ...

  8. C# 用Mutex或进程限制一台电脑上同时打开多个实例

    private void Form1_Load(object sender, EventArgs e)        {            bool requestInitialOwnership ...

  9. 添加operations模块

    添加operations模块,models内容为: from django.db import models from datetime import datetime from users.mode ...

  10. iOS-AFNetworking3.0上传大量(1000张)图片到服务器

    背景: 最近项目要做上传图片功能,图片必须是高清的,所以不让压缩,上传图片是大量的,比如几百张,这个如果是用afn,将图片直接for循环加入到formData里会出现一个问题,临时变量太多,导致内存紧 ...