-
Notifications
You must be signed in to change notification settings - Fork 0
/
frm4bAdmnRgstr.cs
107 lines (83 loc) · 3.06 KB
/
frm4bAdmnRgstr.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
using IOOP;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace IOOP
{
public partial class frm4bAdmnRgstr : Form
{
public string username;
public frm4bAdmnRgstr(string u)
{
InitializeComponent();
username = u;
}
private void radioButton3_CheckedChanged(object sender, EventArgs e)
{
}
private void label3_Click(object sender, EventArgs e)
{
}
private void label4_Click(object sender, EventArgs e)
{
}
private void label7_Click(object sender, EventArgs e)
{
}
private void frm4bAdmnRgstr_Load(object sender, EventArgs e)
{
}
private void btnAdmnBack_Click(object sender, EventArgs e)
{
frm4aAdmnHP cs = new frm4aAdmnHP(username);
cs.Show();
}
private void btnRgstr_Click(object sender, EventArgs e) //Enter information about the user's technician or receptionist
{
if (txtUsrnmebox.Text == "" || txtPsswrdbox.Text == "" || txtEmailbox.Text =="" || txtMblebox.Text == "" || cmbReg.Text == "")
{
MessageBox.Show("Incomplete Information");
txtUsrnmebox.Text = String.Empty; //empty out the username, password, email, mobilenumber and roles
txtPsswrdbox.Text = String.Empty;
txtEmailbox.Text = String.Empty;
txtMblebox.Text = String.Empty;
cmbReg.SelectedItem = String.Empty;
}
else
{
Users obj2 = new Users(txtUsrnmebox.Text, txtPsswrdbox.Text, txtEmailbox.Text, txtMblebox.Text, cmbReg.Text);
string status = obj2.registerNewAdmin(); // register in the new technician or receptionist
if (status != null)
{
MessageBox.Show(status);
txtUsrnmebox.Text = String.Empty; //empty out the text boxes again
txtPsswrdbox.Text = String.Empty;
txtEmailbox.Text = String.Empty;
txtMblebox.Text = String.Empty;
cmbReg.SelectedItem = String.Empty;
}
}
}
private void cmbReg_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void txtUsrnmebox_TextChanged(object sender, EventArgs e)
{
}
private void txtPsswrdbox_TextChanged(object sender, EventArgs e)
{
}
private void txtEmailbox_TextChanged(object sender, EventArgs e)
{
}
private void txtMblebox_TextChanged(object sender, EventArgs e)
{
}
}
}