Beispiel #1
0
        private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            AddProject ap = new AddProject();

            this.Hide();
            ap.Show();
        }
Beispiel #2
0
        private void btnlogin_Click(object sender, EventArgs e)
        {
            AddProject ad = new AddProject();

            this.Hide();
            ad.Show();
        }
Beispiel #3
0
        private void btnProjects_Click(object sender, EventArgs e)
        {
            this.Hide();
            AddProject AP = new AddProject();

            AP.Show();
        }
Beispiel #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(conStr);

            con.Open();
            string Insert;

            if (con.State == System.Data.ConnectionState.Open)
            {
                Insert = "insert into Project( Description, Title) values ( '" + Convert.ToString(txtDerscription.Text) + "' , '" + Convert.ToString(txtprojecttitle.Text) + "' )";
                SqlCommand cmd = new SqlCommand(Insert, con);
                cmd.ExecuteNonQuery();
            }
            MessageBox.Show("Project Added in DataBase");
            AddProject ap = new AddProject();

            this.Close();
            ap.Show();
        }
Beispiel #5
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Hide();
            AddStudent AS = new AddStudent();

            AS.Show();
            AddAdvisor AD = new AddAdvisor();

            AD.Show();
            AddProject AP = new AddProject();

            AP.Show();
            MakeGroups MG = new MakeGroups();
            //MG.Show();
            CreateGroup CG = new CreateGroup();
            //CG.Show();
            AddEvaluation AE = new AddEvaluation();

            AE.Show();
        }
Beispiel #6
0
 private void cmdAddProject_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txttitle.Text) && !string.IsNullOrEmpty(txtdescription.Text))
     {
         SqlConnection con = new SqlConnection(conStr);
         con.Open();
         if (con.State == System.Data.ConnectionState.Open)
         {
             string     Insert = "INSERT INTO Project(Description, Title) VALUES('" + Convert.ToString(txtdescription.Text) + "', '" + Convert.ToString(txttitle.Text) + "')";
             SqlCommand cmd    = new SqlCommand(Insert, con);
             cmd.ExecuteNonQuery();
         }
         MessageBox.Show("Successfully Added");
         this.Close();
         AddProject AP = new AddProject();
         AP.Show();
     }
     else
     {
         MessageBox.Show("Enter the values");
     }
 }
Beispiel #7
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            selected = dataGridView1.CurrentCell.RowIndex;
            DataGridViewRow r = dataGridView1.Rows[selected];

            id = (int)r.Cells[1].Value;
            if (e.ColumnIndex == 0)
            {
                SqlConnection con = new SqlConnection(conStr);
                con.Open();
                if (con.State == System.Data.ConnectionState.Open)
                {
                    string     query = "Delete from Project where Id = '" + id + "'";
                    SqlCommand s     = new SqlCommand(query, con);
                    s.ExecuteNonQuery();
                }
                MessageBox.Show("Succesfully Deleted");
                AddProject ap = new AddProject();
                this.Close();
                ap.Show();
            }
        }