private void cmdLoadData_Click(object sender, RoutedEventArgs e) { using (CleanUp clean = new CleanUp()) { DatabaseCommands commands = new DatabaseCommands(); FileInfo[] Pointfiles = FileLoader.ReadFiles(txtPointPath.Text, "*.txt"); FileInfo[] PolyLinefiles = FileLoader.ReadFiles(txtPolylinePath.Text, "*.dwg"); commands.LoadData(DateCreated, Pointfiles, PolyLinefiles, DestFolderPath.SelectedPath); #region MyRegion // renew DateStamp #endregion DateCreated = DateTime.Now; } MessageBox.Show("Load Completed!"); }
private void cmdNewTask_Click(object sender, RoutedEventArgs e) { //check time stamp if (CheckTimeStamp()) { return; } using (CleanUp clean = new CleanUp()) { Settings settings = new Settings(); if (txtDateCreated.Text != null) { settings.DateStamp = DateCreated; settings.CourseName = txtCourseName.Text; settings.CreateDXF = chkCreateDXF.IsChecked != null && ((bool)chkCreateDXF.IsChecked ? true : false); settings.DestDXFFolder = txtNewDXFPath.Text; settings.DestinationFolder = txtNewDWGPath.Text; settings.GlobalPointFilePath = txtPointPath.Text; settings.GlobalPolylineFilePath = txtPolylinePath.Text; settings.ProjectCity = txtPrjectCity.Text; settings.ProjectCreator = txtUserName.Text; settings.ProjectDate = DateCreated; settings.ProjectManager = txtManager.Text; settings.ProjectSurveyor = txtSurveyor.Text; settings.SeverPath = txtServerPath.Text; settings.ProjectName = txtProjectName.Text; settings.TemplateDWG = txtTemplatePath.Text; //myseSettings.StartTime = String.Empty; //myseSettings.EndTime = String.Empty; } DatabaseCommands commands = new DatabaseCommands(); commands.NewTask(DateCreated, settings); } MessageBox.Show("Task Created! " + DateCreated); }