Example #1
0
        private void createProject_Click(object sender, EventArgs e)
        {
            //check if form is finished correctly and completely
            if (Conditions.projectFormPasses(projectName.Text, projectStartDate.Text, releaseEndDate.Text, timezoneBox.Text,
                                             descriptionBox.Text, privateNo, privateYes))
            {
                int isPrivate;

                //check which radio button is checked for 'is project private'
                if (privateYes.Checked)
                {
                    isPrivate = 1;
                }
                else
                {
                    isPrivate = 0;
                }

                //get ID of the owner(creator) of the poject
                int id = SQL.getOwnerUserID(name);

                //get ID of the timezone
                //int tid = SQL.getTimeZoneID(timezoneBox.Text);
                int tid = 1;

                //put the project info in a list to send to 'addMembers' form
                List <object> project_info = new List <object>();
                project_info.Add(id);
                project_info.Add(projectName.Text);
                project_info.Add(releaseEndDate.Text);
                project_info.Add(tid);
                project_info.Add(projectStartDate.Text);
                project_info.Add(descriptionBox.Text);
                project_info.Add(isPrivate);

                FormCollection fc   = Application.OpenForms;
                Form           dash = new Form();

                foreach (Form frm1 in fc)
                {
                    if (frm1.Name == "Dashboard")
                    {
                        dash = frm1;
                    }
                }

                addMembers frm = new addMembers(name, projectName.Text, dash, this, true, project_info);
                frm.ShowDialog();
            }
        }
Example #2
0
        private void teamToolStripMenuItem_Click(object sender, EventArgs e)
        {
            addMembers frm = new addMembers(memberNameToolStripMenuItem.Text, projectNameToolStripMenuItem.Text);

            frm.Show();
        }