Added new property "Process Only In Location" to limit the datasets that are converted when "Only Process this Procedure Set" is false.
Save the RevDate from the SET.DBF file.
This commit is contained in:
parent
4ed39bda97
commit
59b765e6d8
@ -80,6 +80,16 @@ namespace DataLoader
|
||||
get { return _LoadApproved; }
|
||||
set { _LoadApproved = value; }
|
||||
}
|
||||
private string _ProcessOnlyInLocation; // Folder
|
||||
[Category("16-Bit Data")]
|
||||
[DisplayName("Process Only In Location")]
|
||||
[Description("Limit to folder or group of folders (otherwise all plants will be processed)")]
|
||||
[EditorAttribute(typeof(UIFolderEditor), typeof(System.Drawing.Design.UITypeEditor))]
|
||||
public string ProcessOnlyInLocation
|
||||
{
|
||||
get { return _ProcessOnlyInLocation; }
|
||||
set { _ProcessOnlyInLocation = value; }
|
||||
}
|
||||
#endregion
|
||||
#region Format Data
|
||||
private string _FormatFolder; // Folder
|
||||
|
@ -171,6 +171,8 @@ namespace DataLoader
|
||||
DirectoryInfo dir = new DirectoryInfo(frmMain.MySettings.ProcedureSetPath);
|
||||
_OnlyThisFolder = dir.Parent.FullName.ToUpper();
|
||||
}
|
||||
else if ((frmMain.MySettings.ProcessOnlyInLocation ?? "") != "")
|
||||
_OnlyThisFolder = frmMain.MySettings.ProcessOnlyInLocation.ToUpper();
|
||||
else
|
||||
_OnlyThisFolder = "";
|
||||
}
|
||||
|
@ -57,7 +57,13 @@ namespace DataLoader
|
||||
ci = new ConfigInfo(null);
|
||||
ci.AddItem("Procedure", "ProcCode", tstr);
|
||||
}
|
||||
|
||||
//load revdate
|
||||
string tstr2 = dts.ToString("MM/dd/yyyy");
|
||||
if (tstr2 != null && tstr2 != "")
|
||||
{
|
||||
if (ci == null) ci = new ConfigInfo(null);
|
||||
ci.AddItem("Procedure", "RevDate", tstr2);
|
||||
}
|
||||
// Load in format data, i.e. default number of columns:
|
||||
string tstr1 = dr["Format"].ToString();
|
||||
if (tstr1 != null && tstr1 != "")
|
||||
|
@ -545,6 +545,8 @@ namespace DataLoader
|
||||
MySettings.VESamFile = Properties.Settings.Default.VeSamFilename;
|
||||
if (Properties.Settings.Default["DbfPathname"].ToString() != "")
|
||||
MySettings.ProcedureSetPath = Properties.Settings.Default.DbfPathname;
|
||||
if (Properties.Settings.Default["ProcessOnlyInLocation"].ToString() != "")
|
||||
MySettings.ProcessOnlyInLocation = Properties.Settings.Default.ProcessOnlyInLocation;
|
||||
if (Properties.Settings.Default["BackupFileName"].ToString() != "")
|
||||
MySettings.BackupFileName = Properties.Settings.Default.BackupFileName;
|
||||
if (Properties.Settings.Default["BackupFolder"].ToString() != "")
|
||||
@ -607,6 +609,7 @@ namespace DataLoader
|
||||
Properties.Settings.Default.VePromsFilename = MySettings.VEPromsPath;
|
||||
Properties.Settings.Default.VeSamFilename = MySettings.VESamFile;
|
||||
Properties.Settings.Default.DbfPathname = MySettings.ProcedureSetPath;
|
||||
Properties.Settings.Default.ProcessOnlyInLocation = MySettings.ProcessOnlyInLocation;
|
||||
Properties.Settings.Default.BackupFileName = MySettings.BackupFileName;
|
||||
Properties.Settings.Default.BackupFolder = MySettings.BackupFolder;
|
||||
Properties.Settings.Default.LogFileLoc = MySettings.LogFilePath;
|
||||
@ -913,13 +916,13 @@ namespace DataLoader
|
||||
ProcessTime = DateTime.Now;
|
||||
if (LoadApprovedData())
|
||||
{
|
||||
if (MessageBox.Show("Backup Database?", "Backup", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
Status = "Backing up Data";
|
||||
Backup("");
|
||||
MyInfo = "Backup Complete";
|
||||
}
|
||||
Status = "Processing Complete";
|
||||
if (MessageBox.Show("Backup Database?", "Backup", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
Status = "Backing up Data";
|
||||
Backup("");
|
||||
MyInfo = "Backup Complete";
|
||||
}
|
||||
Status = "Processing Complete";
|
||||
}
|
||||
else
|
||||
Status = "Loading 16 Bit Approval Data Failed";
|
||||
|
Loading…
x
Reference in New Issue
Block a user