NavRecords









How do I use Nav Records
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: Form1.cs Copy
254   public void NavRecords()
255   {
256
257    STUDID.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][1]);
258    TextBox1.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][2]);
259    TextBox2.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][3]);
260    TextBox3.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][4]);
261    TextBox4.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][5]);
262    TextBox5.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][6]);
263    TextBox6.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][7]);
264    TextBox7.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][8]);
265    TextBox8.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][9]);
266    TextBox9.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][10]);
267    TextBox10.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][11]);
268    TextBox11.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][12]);
269    TextBox12.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][13]);
270    TextBox13.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][14]);
271    TextBox14.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][15]);
272    TextBox15.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][16]);
273    TextBox16.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][17]);
274    TextBox17.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][18]);
275    TextBox18.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][19]);
276    TextBox19.Text = (string) (dsgrade.Tables["grade1"].Rows[inc][20]);
277
278   }
File name: Form1.cs Copy
282   public void FRST_Click(System.Object sender, System.EventArgs e)
283   {
284    dsgrade = gradeclass.DataModule.navigate();
285    if (inc != 0)
286    {
287     inc = 0;
288     NavRecords();
289     MessageBox.Show("First Record");
290    }
291   }
File name: Form1.cs Copy
293   public void PREV_Click(System.Object sender, System.EventArgs e)
294   {
295
296    dsgrade = gradeclass.DataModule.navigate();
297    if (inc > 0)
298    {
299     inc--;
300     NavRecords();
301    }
302    else if (inc == -1)
303    {
304     MessageBox.Show("No Records Yet");
305    }
306    else if (inc == 0)
307    {
308     MessageBox.Show("First Record");
309    }
310
311
312   }
File name: Form1.cs Copy
314   public void LAST_Click(System.Object sender, System.EventArgs e)
315   {
316    dsgrade = gradeclass.DataModule.navigate();
317    MaxRows = dsgrade.Tables["grade1"].Rows.Count;
318    if (inc != MaxRows)
319    {
320     inc = MaxRows - 1;
321     NavRecords();
322    }
323    else
324    {
325     MessageBox.Show("Last Record");
326    }
327   }
File name: Form1.cs Copy
329   public void NXT_Click(System.Object sender, System.EventArgs e)
330   {
331    dsgrade = gradeclass.DataModule.navigate();
332    try
333    {
334     if (inc != MaxRows - 1)
335     {
336      inc++;
337      NavRecords();
338     }
339    }
340    catch (Exception)
341    {
342     MessageBox.Show("No More Rows");
343    }
344   }

NavRecords 199 lượt xem

Gõ tìm kiếm nhanh...