forked from mattbuhagiar/SOFT130
/
customer_edit.cs
54 lines (48 loc) · 1.84 KB
/
customer_edit.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
namespace SOFT130Project
{
public partial class frmCustomerEdit : Form
{
public frmCustomerEdit(file this_fileClass)
{
InitializeComponent();
fileClass = this_fileClass;
}
bool showMainMenu = true;
file fileClass;
private void frmCustomerEdit_Load(object sender, EventArgs e)
{
tmrDateTime_Tick(sender, e);
int currentCustomerNum = fileClass.getcurrentCustomerNum();
ArrayList returnedData = fileClass.readFile();
Customer thisCustomer = (Customer)returnedData[currentCustomerNum];
txtFirstName.Text = thisCustomer.getfirstName();
txtSurname.Text = thisCustomer.getsurname();
txtDob.Text = thisCustomer.getdob();
txtInitials.Text = thisCustomer.getinitials();
txtTitle.Text = thisCustomer.gettitle();
txtPassword.Text = thisCustomer.getpassword();
txtNumberName.Text = thisCustomer.gethouseNameNumber();
txtStreetName.Text = thisCustomer.getstreetName();
txtAddressArea.Text = thisCustomer.getaddressArea();
txtCityTown.Text = thisCustomer.getcityTown();
txtCounty.Text = thisCustomer.getcounty();
txtPostcode.Text = thisCustomer.getpostcode();
}
private void tmrDateTime_Tick(object sender, EventArgs e)
{
DateTime CurrTime = DateTime.Now;
lblDate.Text = CurrTime.ToString("D");
lblTime.Text = CurrTime.ToString("hh:mm:ss tt", CultureInfo.CreateSpecificCulture("en-US"));
}
}
}