private CommandsForCopy ParseCommand(string commands) { string[] lfile = commands.Split(','); CommandsForCopy file = new CommandsForCopy(); file.Order = lfile[0]; file.PointFile = lfile[1]; file.PolyFile = lfile[2]; file.DestFile = System.IO.Path.Combine(lfile[2], lfile[3]); file.time = Convert.ToDateTime(lfile[4]); return(file); }
private CommandsForCopy ParseCommand(string commands) {/* command = String.Format( * * "{0},{1},{2},{3},{4}", order, pointFile, polyfile.FirstOrDefault(), destination, timestamp);*/ string[] lfile = commands.Split(','); CommandsForCopy file = new CommandsForCopy(); file.Order = lfile[0]; file.PointFile = lfile[1]; file.PolyFile = lfile[2]; file.DestFile = System.IO.Path.Combine(lfile[2], lfile[3]); file.time = Convert.ToDateTime(lfile[4]); return(file); }
private void CopyFilesToLocal() { using (var context = GetDataBasePath.GetSql4Connection()) { var stack = from p in context.DrawingStack select p; foreach (var files in stack) { CommandsForCopy fi = ParseCommand(files.Function); FileFunctions.CopyFiles(fi.PointFile, fi.DestFile, Path.GetFileName(fi.PointFile)); FileFunctions.CopyFiles(fi.PolyFile, fi.DestFile, Path.GetFileName(fi.PolyFile)); } } }
private void CopyFilesToLocal() { using (var context = GetDataBasePath.GetSql4Connection()) { /* command = String.Format( * * "{0},{1},{2},{3},{4}", order, pointFile, polyfile.FirstOrDefault(), destination, timestamp);*/ //Get var stack = from p in context.DrawingStack select p; foreach (var files in stack) { CommandsForCopy fi = ParseCommand(files.Function); FileFunctions.CopyFiles(fi.PointFile, fi.DestFile, System.IO.Path.GetFileName(fi.PointFile)); FileFunctions.CopyFiles(fi.PolyFile, fi.DestFile, System.IO.Path.GetFileName(fi.PolyFile)); } //var lsetting = // from p in context.CommandStack // //where p.DateStamp == Convert.ToDateTime(txtDateCreated.Text) // select new { p.CourseName, p.DateStamp, p.ProjectCreator, p.ProjectName }; //dgTasks.ItemsSource = lsetting.ToList(); //foreach (var val in settings) //{ // DateCreated = DateTime.Now; // txtDateCreated.Text = DateCreated.ToString(); // return true; //} // settings = lsetting; //return settings; } }