Best way to get btc ,C#


SUBMITTED BY: Guest

DATE: Nov. 18, 2013, 8:42 p.m.

FORMAT: Text only

SIZE: 2.8 kB

HITS: 628

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.Data.SqlClient;
  10. namespace Gst_Stg_Navigation
  11. {
  12. public partial class Form1 : Form
  13. {
  14. public Form1()
  15. {
  16. InitializeComponent();
  17. }
  18. SqlDataAdapter sqlda = new SqlDataAdapter("select * from stagiaire","data source= . ; initial catalog = ecole ; integrated security= true");
  19. DataSet ds = new DataSet();
  20. int i=0;
  21. private void Form1_Load(object sender, EventArgs e)
  22. {
  23. sqlda.Fill(ds, "Stagiaire");
  24. }
  25. private void btnPrem_Click(object sender, EventArgs e)
  26. {
  27. i = 0;
  28. txtCode.Text = ds.Tables["Stagiaire"].Rows[i][0].ToString();
  29. txtNom.Text = ds.Tables["Stagiaire"].Rows[i][1].ToString();
  30. txtPrenom.Text = ds.Tables["Stagiaire"].Rows[i][2].ToString();
  31. txtCode_Sp.Text = ds.Tables["Stagiaire"].Rows[i][3].ToString();
  32. }
  33. private void btnSuiv_Click(object sender, EventArgs e)
  34. {
  35. if (i < ds.Tables["Stagiaire"].Rows.Count - 1)
  36. {
  37. i++;
  38. txtCode.Text = ds.Tables["Stagiaire"].Rows[i][0].ToString();
  39. txtNom.Text = ds.Tables["Stagiaire"].Rows[i][1].ToString();
  40. txtPrenom.Text = ds.Tables["Stagiaire"].Rows[i][2].ToString();
  41. txtCode_Sp.Text = ds.Tables["Stagiaire"].Rows[i][3].ToString();
  42. }
  43. }
  44. private void btnPrec_Click(object sender, EventArgs e)
  45. {
  46. if (i >0)
  47. {
  48. i--;
  49. txtCode.Text = ds.Tables["Stagiaire"].Rows[i][0].ToString();
  50. txtNom.Text = ds.Tables["Stagiaire"].Rows[i][1].ToString();
  51. txtPrenom.Text = ds.Tables["Stagiaire"].Rows[i][2].ToString();
  52. txtCode_Sp.Text = ds.Tables["Stagiaire"].Rows[i][3].ToString();
  53. }
  54. }
  55. private void btnDern_Click(object sender, EventArgs e)
  56. {
  57. i = ds.Tables["Stagiaire"].Rows.Count - 1;
  58. txtCode.Text = ds.Tables["Stagiaire"].Rows[i][0].ToString();
  59. txtNom.Text = ds.Tables["Stagiaire"].Rows[i][1].ToString();
  60. txtPrenom.Text = ds.Tables["Stagiaire"].Rows[i][2].ToString();
  61. txtCode_Sp.Text = ds.Tables["Stagiaire"].Rows[i][3].ToString();
  62. }
  63. }
  64. }

comments powered by Disqus