예제 #1
0
        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
        }
예제 #2
0
        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");
            }
        }
예제 #3
0
        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();
        }
예제 #4
0
        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();
            }
        }
예제 #5
0
        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
        }
예제 #6
0
        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();
        }
예제 #7
0
        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();
        }
예제 #8
0
        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.");
            }
        }
예제 #9
0
        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");
            }
        }
예제 #11
0
        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();
        }
예제 #12
0
        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);
            }
        }
예제 #13
0
        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!");
            }
        }
예제 #14
0
        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);
            }
        }
예제 #15
0
        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();
        }