Ejemplo n.º 1
0
 private void toolStripXoacautruc_Click(object sender, EventArgs e)
 {
     try
     {
         if (m_v.is_dba_admin(m_userid))
         {
             if (treeView1.SelectedNode.Parent == null)
             {
                 if (MessageBox.Show(this, lan.Change_language_MessageText("Đồng ý xoá cấu trúc cơ sở dữ liệu (schema) <") + treeView1.SelectedNode.Text + "> và nội dung của nó!", "Thóng báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                 {
                     m_v.drop_schema(treeView1.SelectedNode.Text.ToString());
                     f_Load_Tree();
                 }
             }
             else if (treeView1.SelectedNode.Parent != null && treeView1.SelectedNode.Parent.Parent == null)
             {
                 if (MessageBox.Show(this, lan.Change_language_MessageText("Đồng ý xoá cấu trúc bảng(table) <") + treeView1.SelectedNode.Text + "> và nội dung của nó!", "Thóng báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                 {
                     m_v.drop_table(treeView1.SelectedNode.Parent.Text.ToString(), treeView1.SelectedNode.Text.ToString());
                     f_Load_Tree();
                 }
             }
         }
         else
         {
             MessageBox.Show(this, lan.Change_language_MessageText("Chỉ nhân viên thuộc nhóm Quản trị cơ sở dữ liệu mới được phép!"), m_v.s_AppName, MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch
     {
     }
 }