private void createTeamButton_Click(object sender, EventArgs e) { TeamModel t = new TeamModel(); t.TeamName = teamNameValue.Text; t.TeamMembers = selectedTeamMembers; //Why not t= GlobalCondig.Connection.CreateTeam(t)? - Because CreateTeam parameter points to address, and it updates //parameter within function call GlobalConfig.Connection.CreateTeam(t); callingForm.TeamComplete(t); Close(); // TODO - If we aren't closing this form after creation, reset the form }
private void createTeamButton_Click(object sender, EventArgs e) { TeamModel t = new TeamModel(); if (teamNameValue.Text != string.Empty) { t.TeamName = teamNameValue.Text; t.TeamMembers = selectedTeamMembers; GlobalConfig.Connection.CreateTeam(t); callingForm.TeamComplete(t); Close(); } else { MessageBox.Show("Please enter Team Name"); } }
private void createTeamButton_Click(object sender, EventArgs e) { if (!IsTeamValid()) { MessageBox.Show("Entered data not valid.", "Invalid Data", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } TeamModel t = new TeamModel(); t.TeamName = teamNameValue.Text; t.TeamMembers = selectedTeamMembers; GlobalConfig.Connection.CreateTeam(t); callingForm.TeamComplete(t); this.Close(); }
private void BtnCreateTeam_Click(object sender, EventArgs e) { if (ValidateTeamNameField() == true && ValidateTeamMemberListView() == true) { TeamModel team = new TeamModel(); team.TeamName = txtTeamName.Text; team.TeamMembers = selectedTeamMembers; GlobalConfig.Connection.CreateTeam(team); SendEmailAfterCreatingTeam(team); MessageBox.Show("You have created team successfully!"); callingForm.TeamComplete(team); this.Close(); } }
private void CreateTeamButton_Click(object sender, EventArgs e) { TeamModel t = new TeamModel(); t.TeamName = teamNameValue.Text; t.TeamMembers = selectedTeamMembers; GlobalConfig.Connection.CreateTeam(t); callingForm.TeamComplete(t); this.Close(); // TODO If we dont close form after team creation reset form. //TODO Personal Thought?? Remove from SQL when remove happens.... //TODO ^ needs spSQL }
private void btnCreateTeam_Click(object sender, EventArgs e) { if (textBoxTeamName.Text == "") { MessageBox.Show("Team name cannot be empty."); return; } TeamModel t = new TeamModel(); t.TeamName = textBoxTeamName.Text; t.TeamMembers = selectedTeamMembers; GlobalConfig.Connection.CreateTeam(t); callingForm.TeamComplete(t); this.Close(); }
private void createTeamButton_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(createTeamValueTextBox.Text) || teamMembersListBox.Items.Count == 0) { MessageBox.Show("Team name or team member list cannot be empty"); return; } TeamModel team = new TeamModel(); team.TeamName = createTeamValueTextBox.Text; team.TeamMembers = selectedTeamMembers; GlobalConfig.Connection.CreateTeam(team); callingForm.TeamComplete(team); this.Close(); }
private void createTeamButton_Click(object sender, EventArgs e) { if (ValidateTeam()) { TeamModel t = new TeamModel( selectedTeamMembers, teamNameValue.Text); GlobalConfig.Connection.CreateTeam(t); callingForm.TeamComplete(t); this.Close(); } else { MessageBox.Show("Team has invalid information. Please check and try again."); } }
private void createTeamButton_Click(object sender, EventArgs e) { if (teamNameValue.Text == "") { MessageBox.Show("You need to enter a team name."); } else { TeamModel t = new TeamModel(); t.TeamName = teamNameValue.Text; t.TeamMembers = selectedTeamMembers; GlobalConfig.Connection.CreateTeam(t); callingForm.TeamComplete(t); this.Close(); } }
private void createTeamButton_Click(object sender, EventArgs e) { if (ValidateForm()) { TeamModel t = new TeamModel(); t.TeamName = teamNameTextBox.Text; t.TeamMembers = selectedTeamMembers; GlobalConfig.Connection.CreateTeam(t); callingForm.TeamComplete(t); Close(); } else { MessageBox.Show("This form has invalid data. Please check it and try again"); } }
private void createTeamButton_Click(object sender, EventArgs e) { Team t = new Team(); t.TeamName = teamNameValue.Text; t.TeamMembers = selectedTeamMembers; GlobalConfig.Connection.CreateTeam(t); //foreach(Person p in selectedTeamMembers) //{ // availableTeamMembers.Add(p); //} //selectedTeamMembers.Clear(); //WireUpLists(); //teamNameValue.Text = ""; callingForm.TeamComplete(t); this.Close(); }
private void createTeamButton_Click(object sender, EventArgs e) { if (TeamNameIsValid()) { TeamModel t = new TeamModel(); t.TeamName = teamNameTextBox.Text; t.TeamMembers = selectedTeamMembers; GlobalConfig.Connection.CreateTeam(t); callingForm.TeamComplete(t); this.Close(); } else { MessageBox.Show(InvalidFormMessage); } }
private void CreateTeamButton_Click(object sender, EventArgs e) { if (ValidateTeamName()) { TeamModel t = new TeamModel { TeamName = teamNameValue.Text, TeamMembers = selectedTeamMembers }; GlobalConfig.Connection.CreateTeam(t); callingForm.TeamComplete(t); this.Close(); } else { MessageBox.Show("You must give the team a name!"); } }
private void createTeamButton_Click(object sender, EventArgs e) { if (ValidateTeamInfo()) { TeamModel t = new TeamModel(); t.TeamName = teamNameValue.Text; t.TeamMembers = selectedTeamMembers; GlobalConfig.Connection.CreateTeam(t); callingForm.TeamComplete(t); this.Close(); } else { MessageBox.Show(Team_Resource.InvalidInformation); } }
private void createTeamButton_Click(object sender, EventArgs e) { Team team = new Team(); team.TeamName = teamNameValue.Text; team.TeamMembers.AddRange(selectedPerson); foreach (Person p in team.TeamMembers) { if (team.TeamMembersString != null) { team.TeamMembersString = team.TeamMembersString + $"|{p.Id}"; } else { team.TeamMembersString = team.TeamMembersString + $"{p.Id}"; } } GlobalConfig.Connections.CreateTeam(team); MessageBox.Show("Team created"); teamNameValue.Text = ""; receiver.TeamComplete(team); this.Close(); }