Advertisement
wis3_guy

Vehicle Form

Apr 28th, 2013
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 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.  
  10. namespace vehicleGUI
  11. {
  12. public partial class Form1 : Form
  13. {
  14. Customer myCustomer = new Customer();
  15. Vehicle myVehicle = new Vehicle();
  16.  
  17.  
  18. public Form1()
  19. {
  20. InitializeComponent();
  21. }
  22.  
  23. private void clearButton_Click(object sender, EventArgs e)
  24. {
  25. fNameBox.Text = "";
  26. lNameBox.Text = "";
  27. pNumberBox.Text = "";
  28. ageBox.Text = "";
  29. creditScoreBox.Text = "";
  30. }
  31.  
  32. private static void validateButton_Click(object sender, EventArgs e)
  33. {
  34. /*
  35. call is_25 function
  36.  
  37. if function call is valid
  38.  
  39. MessageBox.Show("You have been assigned a vehicle")
  40.  
  41. else
  42. MessageBox.Show("No vehicle for you!")
  43. */
  44.  
  45. /*public bool is_TwentyFive()
  46. {
  47. MessageBox.Show("You've been assigned a 1999 Ford Taurus with a VIN number of 123456"), "VERIFY MSG", MessageBoxButtons.OK)
  48. return;
  49. }
  50.  
  51. else
  52. {
  53. MessageBox.Show("You've been denied. Please try again when you're not underaged.", "UNDERAGED BANNED", MessageBoxButtons.OK)
  54. return;
  55. }*/
  56.  
  57. }
  58.  
  59. private void retrieveButton_Click(object sender, EventArgs e)
  60. {
  61.  
  62. fNameBox.Text = myCustomer.firstName; //Ask about the conversions
  63. lNameBox.Text = myCustomer.lastName;
  64. pNumberBox.Text = Convert.ToString(myCustomer.phoneNumber);
  65. ageBox.Text = Convert.ToString(myCustomer.custAge);
  66. creditScoreBox.Text = Convert.ToString(myCustomer.CreditScore);
  67.  
  68.  
  69. }
  70.  
  71.  
  72. //private void button1_Click(object sender, EventArgs e)
  73. // {
  74.  
  75. // }
  76.  
  77.  
  78. }
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement