Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  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.OleDb;
  10.  
  11. namespace StudentForm
  12. {
  13. public partial class Form2 : Form
  14. {
  15. private OleDbConnection conn;
  16. private OleDbCommand command;
  17. private String connParam = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\L12Y12W27\Documents\Database2.accdb";
  18. public Form2()
  19. {
  20. OpenDBConnection();
  21. InitializeComponent();
  22. }
  23. public void OpenDBConnection()
  24. {
  25. conn = new OleDbConnection(connParam);
  26. command = new OleDbCommand();
  27. }
  28. public void ClosedDBConnection()
  29. {
  30. conn.Close();
  31. }
  32. private void Form2_Load(object sender, EventArgs e)
  33. {
  34. InitializeComponent();
  35. DateTime date = DateTime.Now;
  36. DateTime due = DateTime.Now.AddDays(3);
  37.  
  38. label1.Text = date.ToString("M/dd/yy");
  39. label2.Text = date.ToString("M/dd/yy");
  40. String one = "1";
  41. int x = Convert.ToInt32(one);
  42. double y = Convert.ToDouble("12.5");
  43. }
  44.  
  45. private void cmdCancel_Click(object sender, EventArgs e)
  46. {
  47. this.Close();
  48. }
  49.  
  50. private void cmdBorrow_Click(object sender, EventArgs e)
  51. {
  52.  
  53. }
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement