Пример #1
0
 //上一条信息
 private void button2_Click(object sender, EventArgs e)
 {
     //判断他是否小于1
     if (id > 1)
     {
         //每点击一次上一条 Id减1
         id -= 1;
         wfVehileDetails wfVehileDetails = new wfVehileDetails(id, total);
         wfVehileDetails.Show();
     }
     else
     {
         MessageBox.Show("已经是第一条!");
     }
 }
Пример #2
0
        //下一条信息
        private void button1_Click(object sender, EventArgs e)
        {
            //id号是否大于总记录条数

            if (id < total)
            {
                id += 1;
                wfVehileDetails wfVehileDetails = new wfVehileDetails(id, total);
                wfVehileDetails.Show();
            }
            else
            {
                MessageBox.Show("已经是最后一条记录了!");
            }

            //下一条  id增加1
        }