示例#1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Manage_Project m = new Manage_Project();

            this.Hide();
            m.Show();
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            String        cmd    = String.Format("Select Id from [ProjectA].[dbo].[Project] WHERE [ProjectA].[dbo].[Project].Title = '{0}'", procombo.Text);
            SqlDataReader reader = DatabaseConnection.getInstance().getData(cmd);
            int?          id     = null;

            while (reader.Read())
            {
                id = (int)reader.GetValue(0);
            }
            cmd = String.Format("Select Advisor.Id from Advisor JOIN Person ON Advisor.Id = Person.Id Where FirstName + LastName = '{0}'", advcombo.Text);
            SqlCommand a = new SqlCommand(cmd, DatabaseConnection.getInstance().getConnection());
            int        ad;

            ad  = (Int32)a.ExecuteScalar();
            cmd = String.Format("Select Id from Lookup Where Value = '{0}'", advr.Text);
            a   = new SqlCommand(cmd, DatabaseConnection.getInstance().getConnection());
            int advor;

            advor = (Int32)a.ExecuteScalar();


            cmd = String.Format("INSERT INTO ProjectAdvisor(AdvisorId,ProjectId,AdvisorRole,AssignmentDate) values('{0}','{1}','{2}',GetDate() )", ad, id, advor);
            DatabaseConnection.getInstance().exectuteQuery(cmd);
            Manage_Project m = new Manage_Project();

            this.Hide();
            m.Show();
        }
示例#3
0
        private void proj_Click(object sender, EventArgs e)
        {
            Manage_Project p = new Manage_Project();

            this.Hide();
            p.Show();
        }
示例#4
0
        private void back1_Click(object sender, EventArgs e)
        {
            Manage_Project s = new Manage_Project();

            this.Hide();
            s.Show();
        }
示例#5
0
        private void btnManageProjects_Click(object sender, EventArgs e)
        {
            Manage_Project b = new Manage_Project();

            b.Show();
            this.Hide();
        }