示例#1
0
        private void btnOdustani_Click(object sender, EventArgs e)
        {
            NewTableController controller   = new NewTableController();
            LoadProjects       loadProjects = new LoadProjects();

            if (brojAtributa < 1 || !controller.CheckPrimaryKey(dirPath1))
            {
                controller.DeleteTable(dirPath1);
                loadProjects.DeleteTableDependece(projectName1, tableName1 + ".dat");
            }
            this.Close();
        }
示例#2
0
        private void btnSpremi_Click(object sender, EventArgs e)
        {
            NewTableController controller   = new NewTableController();
            LoadProjects       loadProjects = new LoadProjects();

            if (brojAtributa < 1)
            {
                controller.DeleteTable(dirPath1);
                loadProjects.DeleteTableDependece(projectName1, tableName1 + ".dat");
                this.Close();
            }
            else
            {
                if (!controller.CheckPrimaryKey(dirPath1))
                {
                    MessageBox.Show("There is no primary key");
                }
                else
                {
                    this.Close();
                }
            }
        }