private void addBtn_Click(object sender, EventArgs e) { Role temp = new Role(); if (nameTxt.Text == string.Empty) { MessageBox.Show("Name field is blank. Please enter a name or click cancel"); } else { temp.Title = nameTxt.Text; temp.Colour = colorPicker.Color; Main.Roles.Add(temp); this.Close(); } }
public void AddRole(Role role) { m_roles.Add(role); }
public Employee(string name, Role role) { m_name = name; m_roles.Add(role); }