Exemplo n.º 1
0
        private void cmdSave_Click(object sender, EventArgs e)
        {
            if (tProjectName.Text.Trim() == "")
            {
                MessageBox.Show("Please enter a project name.", "Add Project", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            if (cbServerGroup.Text.Trim() == "")
            {
                MessageBox.Show("Please select a server group for this project.", "Add Project", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            using (DataStuff sn = new DataStuff())
            {
                sn.SaveProject(tProjectName.Text, tProjectDescription.Text, UserID, cbServerGroup.Text, "Y");
                NewProjectName = tProjectName.Text;

                MessageBox.Show("Project saved.", "Add Project", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
        }