static void Main(string[] args) { TrimApplication.Initialize(); using(Database db = new Database()) { for (int i = 0; i < 94; i++) { if (i == 98) { var sdsds = "ewrwer"; } //Classification cl = new Classification(db, 9144); Classification par = new Classification(db, 9144); Classification c = new Classification(db); c = par.NewLowerLevel(); c.Name = "EPL Test " + Guid.NewGuid().ToString(); c.RecordPattern = "/gggg"; c.LevelNumber = "/" + nextnumber().ToString().PadLeft(4, '0'); c.Save(); } } //List<int> test = new List<int>(); //for (int i = 1; i < 105; i++) //{ // int ibla = i * 10; // test.Add(ibla); // Console.WriteLine("Max test: " + test.Max().ToString() + " Last test: " + test.Last().ToString()); //} }
private static Classification CreateFolderStructure(string p, string parent, string lowertype, Database db, int lvlvalue) { string strnew = null; Classification par = new Classification(db, parent); Classification c = new Classification(db); c = par.NewLowerLevel(); c.Name = CleanupFolderName(p); if (lowertype == "c") { c.ChildPattern = "/gggg"; } else { c.RecordPattern = "/gggg"; } c.LevelNumber = "/" + lvlvalue.ToString().PadLeft(4, '0'); c.Save(); strnew = c.Title; toplevelUri = c.Uri; return c; }