Esempio n. 1
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            string priv_type = Priv_Type_datagridview.Rows[e.RowIndex].Cells[0].Value.ToString();

            //Choose_Table chon_bang = new Choose_Table(conn);
            if (priv_type == "SELECT")
            {
                Choose_Table chon_bang = new Choose_Table(MainForm, priv_type);
                chon_bang.Show();
            }
            else if (priv_type == "UPDATE")
            {
                Choose_Table chon_bang = new Choose_Table(MainForm, priv_type);
                chon_bang.Show();
            }
            else if (priv_type == "INSERT")
            {
                Choose_Priv chon_priv = new Choose_Priv(MainForm, priv_type);
                chon_priv.Show();
            }
            else if (priv_type == "DELETE")
            {
                Choose_Table chon_priv = new Choose_Table(MainForm, priv_type);
                chon_priv.Show();
            }
            else
            {
                MessageBox.Show("LỖI!!");
            }
        }
Esempio n. 2
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            string Table_Name = All_Table_dataGridView.Rows[e.RowIndex].Cells["TABLE_NAME"].Value.ToString();
            string Owner      = All_Table_dataGridView.Rows[e.RowIndex].Cells["OWNER"].Value.ToString();

            Table_Name = Owner + "." + Table_Name;
            Choose_Priv form = new Choose_Priv(MainForm, Priv_Type, Table_Name);

            form.Show();
        }
Esempio n. 3
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            //try
            //{
            string Table_Name = All_Table_dataGridView.Rows[e.RowIndex].Cells["TABLE_NAME"].Value.ToString();
            string Owner      = All_Table_dataGridView.Rows[e.RowIndex].Cells["OWNER"].Value.ToString();

            Table_Name = Owner + "." + Table_Name;
            Choose_Priv form = new Choose_Priv(MainForm, Priv_Type, Table_Name);

            form.Show();
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.show(ex.Message);
            //}
        }
Esempio n. 4
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            //try
            //{
            string priv_type = Priv_Type_datagridview.Rows[e.RowIndex].Cells[0].Value.ToString();

            //Choose_Table chon_bang = new Choose_Table(conn);
            if (priv_type == "SELECT")
            {
                Choose_Table chon_bang = new Choose_Table(MainForm, priv_type);
                chon_bang.Show();
                return;
            }
            if (priv_type == "UPDATE")
            {
                Choose_Table chon_bang = new Choose_Table(MainForm, priv_type);
                chon_bang.Show();
                return;
            }
            if (priv_type == "INSERT")
            {
                Choose_Priv chon_priv = new Choose_Priv(MainForm, priv_type);
                chon_priv.Show();
                return;
                // mo cai thu muc len
            }
            if (priv_type == "DELETE")
            {
                Choose_Priv chon_priv = new Choose_Priv(MainForm, priv_type);
                chon_priv.Show();
                return;
            }
            if (priv_type == "ROLE")
            {
                Choose_Priv chon_priv = new Choose_Priv(MainForm, priv_type);
                chon_priv.Show();
                return;
            }
            MessageBox.Show("LỖI!!");
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(ex.Message);
            //}
        }