コード例 #1
0
ファイル: Form2.cs プロジェクト: Nida111/ProjectA
        private void button10_Click(object sender, EventArgs e)
        {
            this.Hide();
            GroupProject ee = new GroupProject();

            ee.Show();
        }
コード例 #2
0
        private void assignGroupProjectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GroupProject l = GroupProject.getInstance();

            l.Show();
            this.Hide();
        }
コード例 #3
0
        private void button9_Click(object sender, EventArgs e)
        {
            GroupProject bp = new GroupProject();

            this.Hide();
            bp.Show();
        }
コード例 #4
0
        private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            GroupProject cg = new GroupProject();

            this.Hide();
            cg.Show();
        }
コード例 #5
0
ファイル: Login.cs プロジェクト: hamzaarshad004/miniProject
        private void btnAssgnProject_Click(object sender, EventArgs e)
        {
            this.Hide();
            GroupProject GP = new GroupProject();

            GP.Show();
        }
コード例 #6
0
        private void button7_Click(object sender, EventArgs e)
        {
            this.Refresh();
            Refresh();
            this.Hide();
            GroupProject ss = new GroupProject();

            ss.Show();
        }
コード例 #7
0
 public static GroupProject getInstance()
 {
     if (l == null)
     {
         l = new GroupProject();
         l.Show();
         return(l);
     }
     else
     {
         return(l);
     }
 }
コード例 #8
0
        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();
            }
        }
コード例 #9
0
        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();
                }
            }
        }
コード例 #10
0
ファイル: Main.cs プロジェクト: HinaMaqsood/MiniProjectA
        private void button5_Click(object sender, EventArgs e)
        {
            GroupProject id2 = new GroupProject();

            id2.Show();
        }