Esempio n. 1
0
        private TreeDataGridTestApp.DataSet1.TestTableRow CreateRow(Guid idParent)
        {
            Guid     id = Guid.NewGuid();
            string   s  = id.ToString();
            DateTime dt = new DateTime(new Random().Next(1700, 2010), new Random().Next(1, 12), new Random().Next(1, 28));

            TreeDataGridTestApp.DataSet1.TestTableRow row = dataSet11.TestTable.NewTestTableRow();
            row.id       = id;
            row.idParent = idParent;
            row.Name     = s;
            row.Date     = dt;

            return(row);
        }
Esempio n. 2
0
        private void CreateData(Guid idParent, int level)
        {
            if (level > 4)
            {
                return;
            }

            int count = new Random().Next(1, _countRows);

            for (int i = 0; i < count; i++)
            {
                TreeDataGridTestApp.DataSet1.TestTableRow row = CreateRow(idParent);
                this.dataSet11.TestTable.AddTestTableRow(row);
            }
        }