public List<TestCases> GetTestCasesFromVersion(Versions curVer)
        {
            automationDataSet.versionsRow thisrow = automationDataSet.versions.FindByid(curVer.Id);
            automationDataSet.testcasesRow[] rows = (automationDataSet.testcasesRow[])thisrow.GetChildRows("verid");

            List<TestCases> tcList = new List<TestCases>();

            foreach (automationDataSet.testcasesRow row in rows)
            {

                TestCases curTc = new TestCases();

                curTc.Id = row.id;
                curTc.Version_id = row.version_id;
                curTc.Case_id = row.case_id;
                curTc.Name = row.name;
                curTc.Desc = row.desc;
                curTc.Lastrun = row.lastrun;
                curTc.State = row.state;
                curTc.Preset = row.preset;

                tcList.Add(curTc);
            }

            return tcList;
        }
        public List<Versions> GetVersions()
        {
            List<Versions> verList = new List<Versions>();

            foreach (automationDataSet.versionsRow row in automationDataSet.versions)
            {
                Versions curVer = new Versions();

                curVer.Id = row.id;
                curVer.Ver = row.version;
                curVer.Desc = row.description;

                verList.Add(curVer);
            }

            return verList;
        }
 private void changeVersion(Versions curVersion)
 {
     FillNodes(stepBrowser, dataHandler.GetTestCasesFromVersion(curVersion));
 }
        public void DeleteVersion(Versions curVer)
        {
            automationDataSet.versionsRow curRow = automationDataSet.versions.FindByid(curVer.Id);

            curRow.Delete();
        }
        public void CommitVersion(Versions curVer)
        {
            automationDataSet.versionsRow curRow = automationDataSet.versions.FindByid(curVer.Id);

            if (curRow == null)
            {
                curRow = automationDataSet.versions.NewversionsRow();
                curRow.version = curVer.Ver;
                curRow.description = curVer.Desc;
                automationDataSet.versions.Rows.Add(curRow);
            }
            else
            {
                curRow.version = curVer.Ver;
                curRow.description = curVer.Desc;
            }

            versionsTableAdapter.Update(curRow);

        }