private void button10_Click(object sender, EventArgs e) { this.Hide(); GroupProject ee = new GroupProject(); ee.Show(); }
private void assignGroupProjectToolStripMenuItem_Click(object sender, EventArgs e) { GroupProject l = GroupProject.getInstance(); l.Show(); this.Hide(); }
private void button9_Click(object sender, EventArgs e) { GroupProject bp = new GroupProject(); this.Hide(); bp.Show(); }
private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { GroupProject cg = new GroupProject(); this.Hide(); cg.Show(); }
private void btnAssgnProject_Click(object sender, EventArgs e) { this.Hide(); GroupProject GP = new GroupProject(); GP.Show(); }
private void button7_Click(object sender, EventArgs e) { this.Refresh(); Refresh(); this.Hide(); GroupProject ss = new GroupProject(); ss.Show(); }
public static GroupProject getInstance() { if (l == null) { l = new GroupProject(); l.Show(); return(l); } else { return(l); } }
private void button6_Click(object sender, EventArgs e) { conn.Open(); int ad = Convert.ToInt32(comboBox3.SelectedItem.ToString()); //group id string reg = Convert.ToString(comboBox2.SelectedItem.ToString()); //project title string prooo = "SELECT Id FROM Project WHERE title='" + reg + "' "; SqlCommand InvAmou = new SqlCommand(prooo, conn); int pro = Convert.ToInt32(InvAmou.ExecuteScalar()); DateTime dt = DateTime.Today; try { String insert1 = "insert into GroupProject values('" + pro + "','" + ad + "','" + dt + "' ) "; SqlCommand sql1 = new SqlCommand(insert1, conn); int i1 = sql1.ExecuteNonQuery(); // to check if the student is registered or not if (i1 >= 1) { MessageBox.Show("project is assigned to group"); this.Refresh(); } else { { MessageBox.Show("Project not assigned to group"); } } this.Refresh(); Refresh(); this.Hide(); GroupProject ss = new GroupProject(); ss.Show(); conn.Close(); } catch (Exception ex) { MessageBox.Show("Already exists"); conn.Close(); } }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { conn.Open(); if (e.RowIndex == dataGridView1.NewRowIndex || e.RowIndex < 0) { return; } //Check if click is on specific column if (e.ColumnIndex == dataGridView1.Columns["DeleteButton"].Index) { int index = e.RowIndex; int IDD = Convert.ToInt32(dataGridView1.Rows[index].Cells[1].Value.ToString()); int idd = Convert.ToInt32(dataGridView1.Rows[index].Cells[2].Value.ToString()); try { string delete1 = String.Format("DELETE FROM GroupProject WHERE GroupId = '" + IDD + "' AND ProjectId='" + idd + "'"); SqlCommand de11 = new SqlCommand(delete1, conn); int i = de11.ExecuteNonQuery(); if (i >= 1) { MessageBox.Show(" Deletion Succesfull "); this.Refresh(); } else { MessageBox.Show(" Deletion Failed"); } this.Refresh(); Refresh(); this.Hide(); GroupProject ss = new GroupProject(); ss.Show(); conn.Close(); } catch (Exception a) { MessageBox.Show(a.Message); conn.Close(); } } }
private void button5_Click(object sender, EventArgs e) { GroupProject id2 = new GroupProject(); id2.Show(); }