public void startUp() { try { dataBase db = new dataBase(); fileFolder ff = new fileFolder(); //check the core folder database exists - if not create it ff.createFolder(path); ff.createFolder(path + @"extra\"); ff.createFolder(path + @"tasks\"); ff.createFolder(path + @"maintenence\"); ff.createFolder(path + @"maintenence\inventory\"); ff.createFolder(path + @"contractors\"); ff.createFolder(path + @"contractors\lists\"); ff.createFolder(path + @"\contractors\providers\lists\"); ff.createFolder(Application.StartupPath + @"\database\config\"); ff.createFolder(Application.StartupPath + @"\database\temp\"); db.create("contractor_lists", path + @"\contractors\lists\contractors.xml"); db.create("contractors_today", path + @"\contractors\" + fileNameDate + ".xml"); db.create("provider_lists", path + @"\contractors\providers\lists\providers.xml"); //check if tasks xml datbase exists db.create("tasks", path + @"tasks\tasklist.xml"); if (db.create("extra_tasks", path + @"extra\" + DateTime.Now.ToString("MMMM-yyyy") + ".xml")) { createExtraTasks(); } //check if todays tasks xml datbase exists if (db.create("root", path + DateTime.Now.ToString("d-MM-yyyy") + ".xml")) { //file does not exist returns true - create todays tasks createTodaysTasks(); } db.create("inventory", path + @"maintenence\inventory\list.xml"); db.create("item_maintenence", path + @"maintenence\"+fileNameDate+".xml"); //check for update } catch (Exception err) { debugTerminal terminal = new debugTerminal(); terminal.output(err.ToString()); } }
private void noMaintenence(object sender, EventArgs e) { applicationCore ap = new applicationCore(selectedDate); dataBase db = new dataBase(); if (db.create("item_maintenence", ap.path + @"maintenence\" + selectedDate + ".xml")) { ap.createTodaysTasks(); loadAllMaintenceItems(selectedDate); } labelMaintenenceNoTasks.Visible = false; buttonNoMaintenenceItems.Visible = false; }
private void noTasks(object sender, EventArgs e) { labelNoDailyItems.Visible = false; buttonNoDailyTasks.Visible = false; dataBase db = new dataBase(); applicationCore ap = new applicationCore(selectedDate); if (db.create("root", ap.path + selectedDate + ".xml")) { ap.createTodaysTasks(); loadTodaysTasks(selectedDate); } }
private void noContractors(object sender, EventArgs e) { dataBase db = new dataBase(); applicationCore ap = new applicationCore(selectedDate); db.create("contractors_today", ap.path + @"contractors\" + selectedDate + @".xml"); labelContractorsNoTasks.Visible = false; buttonNoContractors.Visible = false; }