Added code to handle new Close buttons
Added code to translate old formatid's to new formatid's Added new Close buttons
This commit is contained in:
parent
2baf923df5
commit
fbe6dba810
@ -15,8 +15,15 @@ namespace DataLoader
|
|||||||
{
|
{
|
||||||
public partial class dlgExportImport : Form
|
public partial class dlgExportImport : Form
|
||||||
{
|
{
|
||||||
|
private Dictionary<int, string> oldFormat;
|
||||||
|
private Dictionary<string, int> newFormat;
|
||||||
private int oldRODbID;
|
private int oldRODbID;
|
||||||
private int newRODbID;
|
private int newRODbID;
|
||||||
|
private FolderInfo _MyNewFolder;
|
||||||
|
public FolderInfo MyNewFolder
|
||||||
|
{
|
||||||
|
get { return _MyNewFolder; }
|
||||||
|
}
|
||||||
private string PEIPath;
|
private string PEIPath;
|
||||||
private string _MyMode;
|
private string _MyMode;
|
||||||
private FolderInfo MyFolder = null;
|
private FolderInfo MyFolder = null;
|
||||||
@ -32,7 +39,7 @@ namespace DataLoader
|
|||||||
_MyMode = mode;
|
_MyMode = mode;
|
||||||
MyFolder = folderInfo;
|
MyFolder = folderInfo;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.Text += " for " + folderInfo.Name;
|
this.Text = mode + " Dialog for " + folderInfo.Name;
|
||||||
}
|
}
|
||||||
public dlgExportImport(string mode, ProcedureInfo procedureInfo)
|
public dlgExportImport(string mode, ProcedureInfo procedureInfo)
|
||||||
{
|
{
|
||||||
@ -101,6 +108,7 @@ namespace DataLoader
|
|||||||
private DateTime MyStart;
|
private DateTime MyStart;
|
||||||
private void btnDoExport_Click(object sender, EventArgs e)
|
private void btnDoExport_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
btnExport.Enabled = false;
|
||||||
if (MyFolder != null)
|
if (MyFolder != null)
|
||||||
{
|
{
|
||||||
this.Cursor = Cursors.WaitCursor;
|
this.Cursor = Cursors.WaitCursor;
|
||||||
@ -127,7 +135,8 @@ namespace DataLoader
|
|||||||
lblExportStatus.Text = "Export Completed in " + elapsed.ToString();
|
lblExportStatus.Text = "Export Completed in " + elapsed.ToString();
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
}
|
}
|
||||||
}
|
btnCloseExport.Enabled = true;
|
||||||
|
}
|
||||||
private void SaveExportData()
|
private void SaveExportData()
|
||||||
{
|
{
|
||||||
XmlDocument xd = new XmlDocument();
|
XmlDocument xd = new XmlDocument();
|
||||||
@ -145,7 +154,8 @@ namespace DataLoader
|
|||||||
}
|
}
|
||||||
private void btnDoImport_Click(object sender, EventArgs e)
|
private void btnDoImport_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.Cursor = Cursors.WaitCursor;
|
btnImport.Enabled = false;
|
||||||
|
this.Cursor = Cursors.WaitCursor;
|
||||||
MyStart = DateTime.Now;
|
MyStart = DateTime.Now;
|
||||||
btnDoImport.Enabled = false;
|
btnDoImport.Enabled = false;
|
||||||
lblImportStatus.Text = "Performing Import";
|
lblImportStatus.Text = "Performing Import";
|
||||||
@ -156,7 +166,8 @@ namespace DataLoader
|
|||||||
TimeSpan elapsed = DateTime.Now.Subtract(MyStart);
|
TimeSpan elapsed = DateTime.Now.Subtract(MyStart);
|
||||||
lblImportStatus.Text = "Import Completed in " + elapsed.ToString();
|
lblImportStatus.Text = "Import Completed in " + elapsed.ToString();
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
}
|
btnCloseImport.Enabled = true;
|
||||||
|
}
|
||||||
private void LoadImportDataDocument()
|
private void LoadImportDataDocument()
|
||||||
{
|
{
|
||||||
ZipEntry ze = MyExpxZipFile[0];
|
ZipEntry ze = MyExpxZipFile[0];
|
||||||
@ -164,7 +175,9 @@ namespace DataLoader
|
|||||||
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
|
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
|
||||||
XmlDocument xd = new XmlDocument();
|
XmlDocument xd = new XmlDocument();
|
||||||
xd.Load(fn);
|
xd.Load(fn);
|
||||||
|
LoadFormats(xd);
|
||||||
Folder ff = AddFolder(Folder.Get(MyFolder.FolderID), xd);
|
Folder ff = AddFolder(Folder.Get(MyFolder.FolderID), xd);
|
||||||
|
_MyNewFolder = FolderInfo.Get(ff.FolderID);
|
||||||
AddAnnotationTypes(xd);
|
AddAnnotationTypes(xd);
|
||||||
DocVersionInfo dvi = AddDocVersion(ff, xd);
|
DocVersionInfo dvi = AddDocVersion(ff, xd);
|
||||||
xd = null;
|
xd = null;
|
||||||
@ -190,6 +203,22 @@ namespace DataLoader
|
|||||||
AddTransitions();
|
AddTransitions();
|
||||||
SaveTransitionAndItemContentIDs();
|
SaveTransitionAndItemContentIDs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void LoadFormats(XmlDocument xd)
|
||||||
|
{
|
||||||
|
oldFormat = new Dictionary<int, string>();
|
||||||
|
XmlNodeList nl = xd.SelectNodes("folder/formats/format");
|
||||||
|
foreach (XmlNode nd in nl)
|
||||||
|
{
|
||||||
|
int formatid = int.Parse(nd.Attributes.GetNamedItem("formatid").InnerText);
|
||||||
|
string name = nd.Attributes.GetNamedItem("name").InnerText;
|
||||||
|
oldFormat.Add(formatid, name);
|
||||||
|
}
|
||||||
|
newFormat = new Dictionary<string, int>();
|
||||||
|
FormatInfoList fil = FormatInfoList.Get();
|
||||||
|
foreach (FormatInfo fi in fil)
|
||||||
|
newFormat.Add(fi.Name, fi.FormatID);
|
||||||
|
}
|
||||||
Dictionary<int, ItemInfo> dicParentItem = null;
|
Dictionary<int, ItemInfo> dicParentItem = null;
|
||||||
private void UpdateParentItem(int depth, ItemInfo ii)
|
private void UpdateParentItem(int depth, ItemInfo ii)
|
||||||
{
|
{
|
||||||
@ -780,10 +809,26 @@ namespace DataLoader
|
|||||||
xe.Attributes.SetNamedItem(AddAttribute(xd, "usrid", fi.UsrID.ToString()));
|
xe.Attributes.SetNamedItem(AddAttribute(xd, "usrid", fi.UsrID.ToString()));
|
||||||
xd.AppendChild(xe);
|
xd.AppendChild(xe);
|
||||||
ExportAnnotationTypes(xe, "annotationtypes");
|
ExportAnnotationTypes(xe, "annotationtypes");
|
||||||
|
ExportFormats(xe, "formats");
|
||||||
if (fi.FolderDocVersionCount > 0)
|
if (fi.FolderDocVersionCount > 0)
|
||||||
foreach (DocVersionInfo dvi in fi.FolderDocVersions)
|
foreach (DocVersionInfo dvi in fi.FolderDocVersions)
|
||||||
ExportDocVersion(xe, dvi, "docversion");
|
ExportDocVersion(xe, dvi, "docversion");
|
||||||
}
|
}
|
||||||
|
private void ExportFormats(XmlElement xn, string nodename)
|
||||||
|
{
|
||||||
|
XmlElement xe = xn.OwnerDocument.CreateElement(nodename);
|
||||||
|
FormatInfoList fil = FormatInfoList.Get();
|
||||||
|
foreach (FormatInfo fi in fil)
|
||||||
|
ExportFormat(xe, fi, "format");
|
||||||
|
xn.AppendChild(xe);
|
||||||
|
}
|
||||||
|
private void ExportFormat(XmlElement xn, FormatInfo fi, string nodename)
|
||||||
|
{
|
||||||
|
XmlElement xe = xn.OwnerDocument.CreateElement(nodename);
|
||||||
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatid", fi.FormatID.ToString()));
|
||||||
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "name", fi.Name));
|
||||||
|
xn.AppendChild(xe);
|
||||||
|
}
|
||||||
private void ExportAnnotationTypes(XmlElement xn, string nodename)
|
private void ExportAnnotationTypes(XmlElement xn, string nodename)
|
||||||
{
|
{
|
||||||
XmlElement xe = xn.OwnerDocument.CreateElement(nodename);
|
XmlElement xe = xn.OwnerDocument.CreateElement(nodename);
|
||||||
@ -1735,7 +1780,9 @@ namespace DataLoader
|
|||||||
string shortname = xr.GetAttribute("shortname");
|
string shortname = xr.GetAttribute("shortname");
|
||||||
string usrid = xr.GetAttribute("usrid");
|
string usrid = xr.GetAttribute("usrid");
|
||||||
DateTime dts = DateTime.Parse(xr.GetAttribute("dts"));
|
DateTime dts = DateTime.Parse(xr.GetAttribute("dts"));
|
||||||
folder = Folder.MakeFolder(folder, folder.MyConnection, name, title, shortname, null, null, dts, usrid);
|
string formatid = xr.GetAttribute("formatid");
|
||||||
|
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid));
|
||||||
|
folder = Folder.MakeFolder(folder, folder.MyConnection, name, title, shortname, format, null, dts, usrid);
|
||||||
//f.Save();
|
//f.Save();
|
||||||
return folder;
|
return folder;
|
||||||
}
|
}
|
||||||
@ -1748,9 +1795,17 @@ namespace DataLoader
|
|||||||
string shortname = xd.DocumentElement.Attributes.GetNamedItem("shortname").InnerText;
|
string shortname = xd.DocumentElement.Attributes.GetNamedItem("shortname").InnerText;
|
||||||
string usrid = xd.DocumentElement.Attributes.GetNamedItem("usrid").InnerText;
|
string usrid = xd.DocumentElement.Attributes.GetNamedItem("usrid").InnerText;
|
||||||
DateTime dts = DateTime.Parse(xd.DocumentElement.Attributes.GetNamedItem("dts").InnerText);
|
DateTime dts = DateTime.Parse(xd.DocumentElement.Attributes.GetNamedItem("dts").InnerText);
|
||||||
Folder f = Folder.MakeFolder(p, p.MyConnection, name, title, shortname, null, null, dts, usrid);
|
string formatid = xd.DocumentElement.Attributes.GetNamedItem("formatid").InnerText;
|
||||||
|
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid));
|
||||||
|
Folder f = Folder.MakeFolder(p, p.MyConnection, name, title, shortname, format, null, dts, usrid);
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
private Format OldToNewFormat(int formatID)
|
||||||
|
{
|
||||||
|
string formatName = oldFormat[formatID];
|
||||||
|
formatID = newFormat[formatName];
|
||||||
|
return Format.Get(formatID);
|
||||||
|
}
|
||||||
private DocVersion AddDocVersion(Folder f, XmlReader xr)
|
private DocVersion AddDocVersion(Folder f, XmlReader xr)
|
||||||
{
|
{
|
||||||
int versiontype = int.Parse(xr.GetAttribute("versiontype"));
|
int versiontype = int.Parse(xr.GetAttribute("versiontype"));
|
||||||
@ -1759,7 +1814,7 @@ namespace DataLoader
|
|||||||
string userid = xr.GetAttribute("userid");
|
string userid = xr.GetAttribute("userid");
|
||||||
DateTime dts = DateTime.Parse(xr.GetAttribute("dts"));
|
DateTime dts = DateTime.Parse(xr.GetAttribute("dts"));
|
||||||
string formatid = xr.GetAttribute("formatid");
|
string formatid = xr.GetAttribute("formatid");
|
||||||
Format format = formatid == string.Empty ? null : Format.Get(int.Parse(formatid));
|
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid));
|
||||||
DocVersion dv = DocVersion.MakeDocVersion(f, versiontype, name, null, null, format, config, dts, userid);
|
DocVersion dv = DocVersion.MakeDocVersion(f, versiontype, name, null, null, format, config, dts, userid);
|
||||||
return dv;
|
return dv;
|
||||||
}
|
}
|
||||||
@ -1784,7 +1839,7 @@ namespace DataLoader
|
|||||||
string userid = xe.Attributes.GetNamedItem("userid").InnerText;
|
string userid = xe.Attributes.GetNamedItem("userid").InnerText;
|
||||||
DateTime dts = DateTime.Parse(xe.Attributes.GetNamedItem("dts").InnerText);
|
DateTime dts = DateTime.Parse(xe.Attributes.GetNamedItem("dts").InnerText);
|
||||||
string formatid = xe.Attributes.GetNamedItem("formatid").InnerText;
|
string formatid = xe.Attributes.GetNamedItem("formatid").InnerText;
|
||||||
Format format = formatid == string.Empty ? null : Format.Get(int.Parse(formatid));
|
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid));
|
||||||
DocVersion dv = DocVersion.MakeDocVersion(f, versiontype, name, null, null, format, config, dts, userid);
|
DocVersion dv = DocVersion.MakeDocVersion(f, versiontype, name, null, null, format, config, dts, userid);
|
||||||
XmlNode xassoc = xe.SelectSingleNode("association");
|
XmlNode xassoc = xe.SelectSingleNode("association");
|
||||||
if (xassoc != null)
|
if (xassoc != null)
|
||||||
@ -1885,7 +1940,7 @@ namespace DataLoader
|
|||||||
p.DTS = dts;
|
p.DTS = dts;
|
||||||
p.UserID = userid;
|
p.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
p.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
p.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
p.MyContent.Config = config;
|
p.MyContent.Config = config;
|
||||||
p.MyContent.DTS = dts;
|
p.MyContent.DTS = dts;
|
||||||
p.MyContent.UserID = userid;
|
p.MyContent.UserID = userid;
|
||||||
@ -1914,7 +1969,7 @@ namespace DataLoader
|
|||||||
p.DTS = dts;
|
p.DTS = dts;
|
||||||
p.UserID = userid;
|
p.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
p.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
p.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
p.MyContent.Config = config;
|
p.MyContent.Config = config;
|
||||||
p.MyContent.DTS = dts;
|
p.MyContent.DTS = dts;
|
||||||
p.MyContent.UserID = userid;
|
p.MyContent.UserID = userid;
|
||||||
@ -2060,7 +2115,7 @@ namespace DataLoader
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2088,7 +2143,7 @@ namespace DataLoader
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2138,7 +2193,7 @@ namespace DataLoader
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2166,7 +2221,7 @@ namespace DataLoader
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2214,7 +2269,7 @@ namespace DataLoader
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2242,7 +2297,7 @@ namespace DataLoader
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2290,7 +2345,7 @@ namespace DataLoader
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2318,7 +2373,7 @@ namespace DataLoader
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2366,7 +2421,7 @@ namespace DataLoader
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2394,7 +2449,7 @@ namespace DataLoader
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2448,7 +2503,7 @@ namespace DataLoader
|
|||||||
sect.DTS = dts;
|
sect.DTS = dts;
|
||||||
sect.UserID = userid;
|
sect.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
sect.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
sect.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
sect.MyContent.Config = config;
|
sect.MyContent.Config = config;
|
||||||
sect.MyContent.DTS = dts;
|
sect.MyContent.DTS = dts;
|
||||||
sect.MyContent.UserID = userid;
|
sect.MyContent.UserID = userid;
|
||||||
@ -2476,7 +2531,7 @@ namespace DataLoader
|
|||||||
sect.DTS = dts;
|
sect.DTS = dts;
|
||||||
sect.UserID = userid;
|
sect.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
sect.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
sect.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
sect.MyContent.Config = config;
|
sect.MyContent.Config = config;
|
||||||
sect.MyContent.DTS = dts;
|
sect.MyContent.DTS = dts;
|
||||||
sect.MyContent.UserID = userid;
|
sect.MyContent.UserID = userid;
|
||||||
@ -2591,5 +2646,15 @@ namespace DataLoader
|
|||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
|
||||||
|
private void btnCloseExport_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCloseImport_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
36
PROMS/DataLoader/dlgExportImport.designer.cs
generated
36
PROMS/DataLoader/dlgExportImport.designer.cs
generated
@ -54,6 +54,8 @@ namespace DataLoader
|
|||||||
this.label2 = new System.Windows.Forms.Label();
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
this.ofd = new System.Windows.Forms.OpenFileDialog();
|
this.ofd = new System.Windows.Forms.OpenFileDialog();
|
||||||
this.sfd = new System.Windows.Forms.SaveFileDialog();
|
this.sfd = new System.Windows.Forms.SaveFileDialog();
|
||||||
|
this.btnCloseExport = new System.Windows.Forms.Button();
|
||||||
|
this.btnCloseImport = new System.Windows.Forms.Button();
|
||||||
this.lblExportTime = new System.Windows.Forms.Label();
|
this.lblExportTime = new System.Windows.Forms.Label();
|
||||||
this.lblImportTime = new System.Windows.Forms.Label();
|
this.lblImportTime = new System.Windows.Forms.Label();
|
||||||
this.pnlExport.SuspendLayout();
|
this.pnlExport.SuspendLayout();
|
||||||
@ -62,6 +64,7 @@ namespace DataLoader
|
|||||||
//
|
//
|
||||||
// pnlExport
|
// pnlExport
|
||||||
//
|
//
|
||||||
|
this.pnlExport.Controls.Add(this.btnCloseExport);
|
||||||
this.pnlExport.Controls.Add(this.lblExportTime);
|
this.pnlExport.Controls.Add(this.lblExportTime);
|
||||||
this.pnlExport.Controls.Add(this.lblExportStatus);
|
this.pnlExport.Controls.Add(this.lblExportStatus);
|
||||||
this.pnlExport.Controls.Add(this.pbExportStep);
|
this.pnlExport.Controls.Add(this.pbExportStep);
|
||||||
@ -76,7 +79,7 @@ namespace DataLoader
|
|||||||
this.pnlExport.Controls.Add(this.label1);
|
this.pnlExport.Controls.Add(this.label1);
|
||||||
this.pnlExport.Location = new System.Drawing.Point(12, 12);
|
this.pnlExport.Location = new System.Drawing.Point(12, 12);
|
||||||
this.pnlExport.Name = "pnlExport";
|
this.pnlExport.Name = "pnlExport";
|
||||||
this.pnlExport.Size = new System.Drawing.Size(610, 199);
|
this.pnlExport.Size = new System.Drawing.Size(618, 199);
|
||||||
this.pnlExport.TabIndex = 0;
|
this.pnlExport.TabIndex = 0;
|
||||||
//
|
//
|
||||||
// lblExportStatus
|
// lblExportStatus
|
||||||
@ -180,6 +183,7 @@ namespace DataLoader
|
|||||||
//
|
//
|
||||||
// pnlImport
|
// pnlImport
|
||||||
//
|
//
|
||||||
|
this.pnlImport.Controls.Add(this.btnCloseImport);
|
||||||
this.pnlImport.Controls.Add(this.lblImportTime);
|
this.pnlImport.Controls.Add(this.lblImportTime);
|
||||||
this.pnlImport.Controls.Add(this.lblImportStatus);
|
this.pnlImport.Controls.Add(this.lblImportStatus);
|
||||||
this.pnlImport.Controls.Add(this.pbImportStep);
|
this.pnlImport.Controls.Add(this.pbImportStep);
|
||||||
@ -194,7 +198,7 @@ namespace DataLoader
|
|||||||
this.pnlImport.Controls.Add(this.label2);
|
this.pnlImport.Controls.Add(this.label2);
|
||||||
this.pnlImport.Location = new System.Drawing.Point(12, 217);
|
this.pnlImport.Location = new System.Drawing.Point(12, 217);
|
||||||
this.pnlImport.Name = "pnlImport";
|
this.pnlImport.Name = "pnlImport";
|
||||||
this.pnlImport.Size = new System.Drawing.Size(610, 225);
|
this.pnlImport.Size = new System.Drawing.Size(618, 225);
|
||||||
this.pnlImport.TabIndex = 1;
|
this.pnlImport.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// lblImportStatus
|
// lblImportStatus
|
||||||
@ -311,7 +315,7 @@ namespace DataLoader
|
|||||||
// lblExportTime
|
// lblExportTime
|
||||||
//
|
//
|
||||||
this.lblExportTime.AutoSize = true;
|
this.lblExportTime.AutoSize = true;
|
||||||
this.lblExportTime.Location = new System.Drawing.Point(407, 30);
|
this.lblExportTime.Location = new System.Drawing.Point(392, 29);
|
||||||
this.lblExportTime.Name = "lblExportTime";
|
this.lblExportTime.Name = "lblExportTime";
|
||||||
this.lblExportTime.Size = new System.Drawing.Size(28, 13);
|
this.lblExportTime.Size = new System.Drawing.Size(28, 13);
|
||||||
this.lblExportTime.TabIndex = 11;
|
this.lblExportTime.TabIndex = 11;
|
||||||
@ -321,13 +325,35 @@ namespace DataLoader
|
|||||||
// lblImportTime
|
// lblImportTime
|
||||||
//
|
//
|
||||||
this.lblImportTime.AutoSize = true;
|
this.lblImportTime.AutoSize = true;
|
||||||
this.lblImportTime.Location = new System.Drawing.Point(407, 31);
|
this.lblImportTime.Location = new System.Drawing.Point(392, 30);
|
||||||
this.lblImportTime.Name = "lblImportTime";
|
this.lblImportTime.Name = "lblImportTime";
|
||||||
this.lblImportTime.Size = new System.Drawing.Size(28, 13);
|
this.lblImportTime.Size = new System.Drawing.Size(28, 13);
|
||||||
this.lblImportTime.TabIndex = 17;
|
this.lblImportTime.TabIndex = 17;
|
||||||
this.lblImportTime.Text = "0.00";
|
this.lblImportTime.Text = "0.00";
|
||||||
this.lblImportTime.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
this.lblImportTime.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
//
|
//
|
||||||
|
// btnCloseExport
|
||||||
|
//
|
||||||
|
this.btnCloseExport.Enabled = false;
|
||||||
|
this.btnCloseExport.Location = new System.Drawing.Point(562, 32);
|
||||||
|
this.btnCloseExport.Name = "btnCloseExport";
|
||||||
|
this.btnCloseExport.Size = new System.Drawing.Size(53, 23);
|
||||||
|
this.btnCloseExport.TabIndex = 12;
|
||||||
|
this.btnCloseExport.Text = "Close";
|
||||||
|
this.btnCloseExport.UseVisualStyleBackColor = true;
|
||||||
|
this.btnCloseExport.Click += new System.EventHandler(this.btnCloseExport_Click);
|
||||||
|
//
|
||||||
|
// btnCloseImport
|
||||||
|
//
|
||||||
|
this.btnCloseImport.Enabled = false;
|
||||||
|
this.btnCloseImport.Location = new System.Drawing.Point(562, 33);
|
||||||
|
this.btnCloseImport.Name = "btnCloseImport";
|
||||||
|
this.btnCloseImport.Size = new System.Drawing.Size(53, 23);
|
||||||
|
this.btnCloseImport.TabIndex = 18;
|
||||||
|
this.btnCloseImport.Text = "Close";
|
||||||
|
this.btnCloseImport.UseVisualStyleBackColor = true;
|
||||||
|
this.btnCloseImport.Click += new System.EventHandler(this.btnCloseImport_Click);
|
||||||
|
//
|
||||||
// dlgExportImport
|
// dlgExportImport
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@ -380,6 +406,8 @@ namespace DataLoader
|
|||||||
private System.Windows.Forms.Label lblImportStatus;
|
private System.Windows.Forms.Label lblImportStatus;
|
||||||
private System.Windows.Forms.Label lblExportTime;
|
private System.Windows.Forms.Label lblExportTime;
|
||||||
private System.Windows.Forms.Label lblImportTime;
|
private System.Windows.Forms.Label lblImportTime;
|
||||||
|
private System.Windows.Forms.Button btnCloseExport;
|
||||||
|
private System.Windows.Forms.Button btnCloseImport;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,6 +15,8 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
public partial class dlgExportImport : Form
|
public partial class dlgExportImport : Form
|
||||||
{
|
{
|
||||||
|
private Dictionary<int, string> oldFormat;
|
||||||
|
private Dictionary<string, int> newFormat;
|
||||||
private int oldRODbID;
|
private int oldRODbID;
|
||||||
private int newRODbID;
|
private int newRODbID;
|
||||||
private FolderInfo _MyNewFolder;
|
private FolderInfo _MyNewFolder;
|
||||||
@ -44,7 +46,7 @@ namespace VEPROMS
|
|||||||
_MyMode = mode;
|
_MyMode = mode;
|
||||||
MyProcedure = procedureInfo;
|
MyProcedure = procedureInfo;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.Text += " for " + procedureInfo.DisplayNumber;
|
this.Text = mode + " Dialog for " + procedureInfo.DisplayNumber;
|
||||||
}
|
}
|
||||||
private void dlgExportImport_Load(object sender, EventArgs e)
|
private void dlgExportImport_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@ -106,6 +108,7 @@ namespace VEPROMS
|
|||||||
private DateTime MyStart;
|
private DateTime MyStart;
|
||||||
private void btnDoExport_Click(object sender, EventArgs e)
|
private void btnDoExport_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
btnExport.Enabled = false;
|
||||||
if (MyFolder != null)
|
if (MyFolder != null)
|
||||||
{
|
{
|
||||||
this.Cursor = Cursors.WaitCursor;
|
this.Cursor = Cursors.WaitCursor;
|
||||||
@ -132,7 +135,8 @@ namespace VEPROMS
|
|||||||
lblExportStatus.Text = "Export Completed in " + elapsed.ToString();
|
lblExportStatus.Text = "Export Completed in " + elapsed.ToString();
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
}
|
}
|
||||||
}
|
btnCloseExport.Enabled = true;
|
||||||
|
}
|
||||||
private void SaveExportData()
|
private void SaveExportData()
|
||||||
{
|
{
|
||||||
XmlDocument xd = new XmlDocument();
|
XmlDocument xd = new XmlDocument();
|
||||||
@ -150,6 +154,7 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
private void btnDoImport_Click(object sender, EventArgs e)
|
private void btnDoImport_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
btnImport.Enabled = false;
|
||||||
this.Cursor = Cursors.WaitCursor;
|
this.Cursor = Cursors.WaitCursor;
|
||||||
MyStart = DateTime.Now;
|
MyStart = DateTime.Now;
|
||||||
btnDoImport.Enabled = false;
|
btnDoImport.Enabled = false;
|
||||||
@ -161,6 +166,7 @@ namespace VEPROMS
|
|||||||
TimeSpan elapsed = DateTime.Now.Subtract(MyStart);
|
TimeSpan elapsed = DateTime.Now.Subtract(MyStart);
|
||||||
lblImportStatus.Text = "Import Completed in " + elapsed.ToString();
|
lblImportStatus.Text = "Import Completed in " + elapsed.ToString();
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
|
btnCloseImport.Enabled = true;
|
||||||
}
|
}
|
||||||
private void LoadImportDataDocument()
|
private void LoadImportDataDocument()
|
||||||
{
|
{
|
||||||
@ -169,6 +175,7 @@ namespace VEPROMS
|
|||||||
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
|
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
|
||||||
XmlDocument xd = new XmlDocument();
|
XmlDocument xd = new XmlDocument();
|
||||||
xd.Load(fn);
|
xd.Load(fn);
|
||||||
|
LoadFormats(xd);
|
||||||
Folder ff = AddFolder(Folder.Get(MyFolder.FolderID), xd);
|
Folder ff = AddFolder(Folder.Get(MyFolder.FolderID), xd);
|
||||||
_MyNewFolder = FolderInfo.Get(ff.FolderID);
|
_MyNewFolder = FolderInfo.Get(ff.FolderID);
|
||||||
AddAnnotationTypes(xd);
|
AddAnnotationTypes(xd);
|
||||||
@ -196,6 +203,22 @@ namespace VEPROMS
|
|||||||
AddTransitions();
|
AddTransitions();
|
||||||
SaveTransitionAndItemContentIDs();
|
SaveTransitionAndItemContentIDs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void LoadFormats(XmlDocument xd)
|
||||||
|
{
|
||||||
|
oldFormat = new Dictionary<int, string>();
|
||||||
|
XmlNodeList nl = xd.SelectNodes("folder/formats/format");
|
||||||
|
foreach (XmlNode nd in nl)
|
||||||
|
{
|
||||||
|
int formatid = int.Parse(nd.Attributes.GetNamedItem("formatid").InnerText);
|
||||||
|
string name = nd.Attributes.GetNamedItem("name").InnerText;
|
||||||
|
oldFormat.Add(formatid, name);
|
||||||
|
}
|
||||||
|
newFormat = new Dictionary<string, int>();
|
||||||
|
FormatInfoList fil = FormatInfoList.Get();
|
||||||
|
foreach (FormatInfo fi in fil)
|
||||||
|
newFormat.Add(fi.Name, fi.FormatID);
|
||||||
|
}
|
||||||
Dictionary<int, ItemInfo> dicParentItem = null;
|
Dictionary<int, ItemInfo> dicParentItem = null;
|
||||||
private void UpdateParentItem(int depth, ItemInfo ii)
|
private void UpdateParentItem(int depth, ItemInfo ii)
|
||||||
{
|
{
|
||||||
@ -786,10 +809,26 @@ namespace VEPROMS
|
|||||||
xe.Attributes.SetNamedItem(AddAttribute(xd, "usrid", fi.UsrID.ToString()));
|
xe.Attributes.SetNamedItem(AddAttribute(xd, "usrid", fi.UsrID.ToString()));
|
||||||
xd.AppendChild(xe);
|
xd.AppendChild(xe);
|
||||||
ExportAnnotationTypes(xe, "annotationtypes");
|
ExportAnnotationTypes(xe, "annotationtypes");
|
||||||
|
ExportFormats(xe, "formats");
|
||||||
if (fi.FolderDocVersionCount > 0)
|
if (fi.FolderDocVersionCount > 0)
|
||||||
foreach (DocVersionInfo dvi in fi.FolderDocVersions)
|
foreach (DocVersionInfo dvi in fi.FolderDocVersions)
|
||||||
ExportDocVersion(xe, dvi, "docversion");
|
ExportDocVersion(xe, dvi, "docversion");
|
||||||
}
|
}
|
||||||
|
private void ExportFormats(XmlElement xn, string nodename)
|
||||||
|
{
|
||||||
|
XmlElement xe = xn.OwnerDocument.CreateElement(nodename);
|
||||||
|
FormatInfoList fil = FormatInfoList.Get();
|
||||||
|
foreach (FormatInfo fi in fil)
|
||||||
|
ExportFormat(xe, fi, "format");
|
||||||
|
xn.AppendChild(xe);
|
||||||
|
}
|
||||||
|
private void ExportFormat(XmlElement xn, FormatInfo fi, string nodename)
|
||||||
|
{
|
||||||
|
XmlElement xe = xn.OwnerDocument.CreateElement(nodename);
|
||||||
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatid", fi.FormatID.ToString()));
|
||||||
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "name", fi.Name));
|
||||||
|
xn.AppendChild(xe);
|
||||||
|
}
|
||||||
private void ExportAnnotationTypes(XmlElement xn, string nodename)
|
private void ExportAnnotationTypes(XmlElement xn, string nodename)
|
||||||
{
|
{
|
||||||
XmlElement xe = xn.OwnerDocument.CreateElement(nodename);
|
XmlElement xe = xn.OwnerDocument.CreateElement(nodename);
|
||||||
@ -1741,7 +1780,9 @@ namespace VEPROMS
|
|||||||
string shortname = xr.GetAttribute("shortname");
|
string shortname = xr.GetAttribute("shortname");
|
||||||
string usrid = xr.GetAttribute("usrid");
|
string usrid = xr.GetAttribute("usrid");
|
||||||
DateTime dts = DateTime.Parse(xr.GetAttribute("dts"));
|
DateTime dts = DateTime.Parse(xr.GetAttribute("dts"));
|
||||||
folder = Folder.MakeFolder(folder, folder.MyConnection, name, title, shortname, null, null, dts, usrid);
|
string formatid = xr.GetAttribute("formatid");
|
||||||
|
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid));
|
||||||
|
folder = Folder.MakeFolder(folder, folder.MyConnection, name, title, shortname, format, null, dts, usrid);
|
||||||
//f.Save();
|
//f.Save();
|
||||||
return folder;
|
return folder;
|
||||||
}
|
}
|
||||||
@ -1754,9 +1795,17 @@ namespace VEPROMS
|
|||||||
string shortname = xd.DocumentElement.Attributes.GetNamedItem("shortname").InnerText;
|
string shortname = xd.DocumentElement.Attributes.GetNamedItem("shortname").InnerText;
|
||||||
string usrid = xd.DocumentElement.Attributes.GetNamedItem("usrid").InnerText;
|
string usrid = xd.DocumentElement.Attributes.GetNamedItem("usrid").InnerText;
|
||||||
DateTime dts = DateTime.Parse(xd.DocumentElement.Attributes.GetNamedItem("dts").InnerText);
|
DateTime dts = DateTime.Parse(xd.DocumentElement.Attributes.GetNamedItem("dts").InnerText);
|
||||||
Folder f = Folder.MakeFolder(p, p.MyConnection, name, title, shortname, null, null, dts, usrid);
|
string formatid = xd.DocumentElement.Attributes.GetNamedItem("formatid").InnerText;
|
||||||
|
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid));
|
||||||
|
Folder f = Folder.MakeFolder(p, p.MyConnection, name, title, shortname, format, null, dts, usrid);
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
private Format OldToNewFormat(int formatID)
|
||||||
|
{
|
||||||
|
string formatName = oldFormat[formatID];
|
||||||
|
formatID = newFormat[formatName];
|
||||||
|
return Format.Get(formatID);
|
||||||
|
}
|
||||||
private DocVersion AddDocVersion(Folder f, XmlReader xr)
|
private DocVersion AddDocVersion(Folder f, XmlReader xr)
|
||||||
{
|
{
|
||||||
int versiontype = int.Parse(xr.GetAttribute("versiontype"));
|
int versiontype = int.Parse(xr.GetAttribute("versiontype"));
|
||||||
@ -1765,7 +1814,7 @@ namespace VEPROMS
|
|||||||
string userid = xr.GetAttribute("userid");
|
string userid = xr.GetAttribute("userid");
|
||||||
DateTime dts = DateTime.Parse(xr.GetAttribute("dts"));
|
DateTime dts = DateTime.Parse(xr.GetAttribute("dts"));
|
||||||
string formatid = xr.GetAttribute("formatid");
|
string formatid = xr.GetAttribute("formatid");
|
||||||
Format format = formatid == string.Empty ? null : Format.Get(int.Parse(formatid));
|
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid));
|
||||||
DocVersion dv = DocVersion.MakeDocVersion(f, versiontype, name, null, null, format, config, dts, userid);
|
DocVersion dv = DocVersion.MakeDocVersion(f, versiontype, name, null, null, format, config, dts, userid);
|
||||||
return dv;
|
return dv;
|
||||||
}
|
}
|
||||||
@ -1790,7 +1839,7 @@ namespace VEPROMS
|
|||||||
string userid = xe.Attributes.GetNamedItem("userid").InnerText;
|
string userid = xe.Attributes.GetNamedItem("userid").InnerText;
|
||||||
DateTime dts = DateTime.Parse(xe.Attributes.GetNamedItem("dts").InnerText);
|
DateTime dts = DateTime.Parse(xe.Attributes.GetNamedItem("dts").InnerText);
|
||||||
string formatid = xe.Attributes.GetNamedItem("formatid").InnerText;
|
string formatid = xe.Attributes.GetNamedItem("formatid").InnerText;
|
||||||
Format format = formatid == string.Empty ? null : Format.Get(int.Parse(formatid));
|
Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid));
|
||||||
DocVersion dv = DocVersion.MakeDocVersion(f, versiontype, name, null, null, format, config, dts, userid);
|
DocVersion dv = DocVersion.MakeDocVersion(f, versiontype, name, null, null, format, config, dts, userid);
|
||||||
XmlNode xassoc = xe.SelectSingleNode("association");
|
XmlNode xassoc = xe.SelectSingleNode("association");
|
||||||
if (xassoc != null)
|
if (xassoc != null)
|
||||||
@ -1891,7 +1940,7 @@ namespace VEPROMS
|
|||||||
p.DTS = dts;
|
p.DTS = dts;
|
||||||
p.UserID = userid;
|
p.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
p.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
p.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
p.MyContent.Config = config;
|
p.MyContent.Config = config;
|
||||||
p.MyContent.DTS = dts;
|
p.MyContent.DTS = dts;
|
||||||
p.MyContent.UserID = userid;
|
p.MyContent.UserID = userid;
|
||||||
@ -1920,7 +1969,7 @@ namespace VEPROMS
|
|||||||
p.DTS = dts;
|
p.DTS = dts;
|
||||||
p.UserID = userid;
|
p.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
p.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
p.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
p.MyContent.Config = config;
|
p.MyContent.Config = config;
|
||||||
p.MyContent.DTS = dts;
|
p.MyContent.DTS = dts;
|
||||||
p.MyContent.UserID = userid;
|
p.MyContent.UserID = userid;
|
||||||
@ -2066,7 +2115,7 @@ namespace VEPROMS
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2094,7 +2143,7 @@ namespace VEPROMS
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2144,7 +2193,7 @@ namespace VEPROMS
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2172,7 +2221,7 @@ namespace VEPROMS
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2220,7 +2269,7 @@ namespace VEPROMS
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2248,7 +2297,7 @@ namespace VEPROMS
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2296,7 +2345,7 @@ namespace VEPROMS
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2324,7 +2373,7 @@ namespace VEPROMS
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2372,7 +2421,7 @@ namespace VEPROMS
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2400,7 +2449,7 @@ namespace VEPROMS
|
|||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
step.UserID = userid;
|
step.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
step.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
step.MyContent.Config = config;
|
step.MyContent.Config = config;
|
||||||
step.MyContent.DTS = dts;
|
step.MyContent.DTS = dts;
|
||||||
step.MyContent.UserID = userid;
|
step.MyContent.UserID = userid;
|
||||||
@ -2454,7 +2503,7 @@ namespace VEPROMS
|
|||||||
sect.DTS = dts;
|
sect.DTS = dts;
|
||||||
sect.UserID = userid;
|
sect.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
sect.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
sect.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
sect.MyContent.Config = config;
|
sect.MyContent.Config = config;
|
||||||
sect.MyContent.DTS = dts;
|
sect.MyContent.DTS = dts;
|
||||||
sect.MyContent.UserID = userid;
|
sect.MyContent.UserID = userid;
|
||||||
@ -2482,7 +2531,7 @@ namespace VEPROMS
|
|||||||
sect.DTS = dts;
|
sect.DTS = dts;
|
||||||
sect.UserID = userid;
|
sect.UserID = userid;
|
||||||
if (formatid != string.Empty)
|
if (formatid != string.Empty)
|
||||||
sect.MyContent.MyFormat = Format.Get(int.Parse(formatid));
|
sect.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid));
|
||||||
sect.MyContent.Config = config;
|
sect.MyContent.Config = config;
|
||||||
sect.MyContent.DTS = dts;
|
sect.MyContent.DTS = dts;
|
||||||
sect.MyContent.UserID = userid;
|
sect.MyContent.UserID = userid;
|
||||||
@ -2597,5 +2646,15 @@ namespace VEPROMS
|
|||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
private void btnCloseExport_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCloseImport_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -56,12 +56,15 @@ namespace VEPROMS
|
|||||||
this.label2 = new System.Windows.Forms.Label();
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
this.ofd = new System.Windows.Forms.OpenFileDialog();
|
this.ofd = new System.Windows.Forms.OpenFileDialog();
|
||||||
this.sfd = new System.Windows.Forms.SaveFileDialog();
|
this.sfd = new System.Windows.Forms.SaveFileDialog();
|
||||||
|
this.btnCloseExport = new System.Windows.Forms.Button();
|
||||||
|
this.btnCloseImport = new System.Windows.Forms.Button();
|
||||||
this.pnlExport.SuspendLayout();
|
this.pnlExport.SuspendLayout();
|
||||||
this.pnlImport.SuspendLayout();
|
this.pnlImport.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// pnlExport
|
// pnlExport
|
||||||
//
|
//
|
||||||
|
this.pnlExport.Controls.Add(this.btnCloseExport);
|
||||||
this.pnlExport.Controls.Add(this.lblExportTime);
|
this.pnlExport.Controls.Add(this.lblExportTime);
|
||||||
this.pnlExport.Controls.Add(this.lblExportStatus);
|
this.pnlExport.Controls.Add(this.lblExportStatus);
|
||||||
this.pnlExport.Controls.Add(this.pbExportStep);
|
this.pnlExport.Controls.Add(this.pbExportStep);
|
||||||
@ -76,13 +79,13 @@ namespace VEPROMS
|
|||||||
this.pnlExport.Controls.Add(this.label1);
|
this.pnlExport.Controls.Add(this.label1);
|
||||||
this.pnlExport.Location = new System.Drawing.Point(12, 12);
|
this.pnlExport.Location = new System.Drawing.Point(12, 12);
|
||||||
this.pnlExport.Name = "pnlExport";
|
this.pnlExport.Name = "pnlExport";
|
||||||
this.pnlExport.Size = new System.Drawing.Size(610, 199);
|
this.pnlExport.Size = new System.Drawing.Size(618, 199);
|
||||||
this.pnlExport.TabIndex = 0;
|
this.pnlExport.TabIndex = 0;
|
||||||
//
|
//
|
||||||
// lblExportTime
|
// lblExportTime
|
||||||
//
|
//
|
||||||
this.lblExportTime.AutoSize = true;
|
this.lblExportTime.AutoSize = true;
|
||||||
this.lblExportTime.Location = new System.Drawing.Point(407, 30);
|
this.lblExportTime.Location = new System.Drawing.Point(392, 29);
|
||||||
this.lblExportTime.Name = "lblExportTime";
|
this.lblExportTime.Name = "lblExportTime";
|
||||||
this.lblExportTime.Size = new System.Drawing.Size(28, 13);
|
this.lblExportTime.Size = new System.Drawing.Size(28, 13);
|
||||||
this.lblExportTime.TabIndex = 11;
|
this.lblExportTime.TabIndex = 11;
|
||||||
@ -190,6 +193,7 @@ namespace VEPROMS
|
|||||||
//
|
//
|
||||||
// pnlImport
|
// pnlImport
|
||||||
//
|
//
|
||||||
|
this.pnlImport.Controls.Add(this.btnCloseImport);
|
||||||
this.pnlImport.Controls.Add(this.lblImportTime);
|
this.pnlImport.Controls.Add(this.lblImportTime);
|
||||||
this.pnlImport.Controls.Add(this.lblImportStatus);
|
this.pnlImport.Controls.Add(this.lblImportStatus);
|
||||||
this.pnlImport.Controls.Add(this.pbImportStep);
|
this.pnlImport.Controls.Add(this.pbImportStep);
|
||||||
@ -204,13 +208,13 @@ namespace VEPROMS
|
|||||||
this.pnlImport.Controls.Add(this.label2);
|
this.pnlImport.Controls.Add(this.label2);
|
||||||
this.pnlImport.Location = new System.Drawing.Point(12, 217);
|
this.pnlImport.Location = new System.Drawing.Point(12, 217);
|
||||||
this.pnlImport.Name = "pnlImport";
|
this.pnlImport.Name = "pnlImport";
|
||||||
this.pnlImport.Size = new System.Drawing.Size(610, 225);
|
this.pnlImport.Size = new System.Drawing.Size(618, 225);
|
||||||
this.pnlImport.TabIndex = 1;
|
this.pnlImport.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// lblImportTime
|
// lblImportTime
|
||||||
//
|
//
|
||||||
this.lblImportTime.AutoSize = true;
|
this.lblImportTime.AutoSize = true;
|
||||||
this.lblImportTime.Location = new System.Drawing.Point(407, 31);
|
this.lblImportTime.Location = new System.Drawing.Point(392, 30);
|
||||||
this.lblImportTime.Name = "lblImportTime";
|
this.lblImportTime.Name = "lblImportTime";
|
||||||
this.lblImportTime.Size = new System.Drawing.Size(28, 13);
|
this.lblImportTime.Size = new System.Drawing.Size(28, 13);
|
||||||
this.lblImportTime.TabIndex = 17;
|
this.lblImportTime.TabIndex = 17;
|
||||||
@ -328,6 +332,28 @@ namespace VEPROMS
|
|||||||
this.sfd.Filter = "PROMS Export Files|*.expx";
|
this.sfd.Filter = "PROMS Export Files|*.expx";
|
||||||
this.sfd.Title = "Export File Name";
|
this.sfd.Title = "Export File Name";
|
||||||
//
|
//
|
||||||
|
// btnCloseExport
|
||||||
|
//
|
||||||
|
this.btnCloseExport.Enabled = false;
|
||||||
|
this.btnCloseExport.Location = new System.Drawing.Point(562, 32);
|
||||||
|
this.btnCloseExport.Name = "btnCloseExport";
|
||||||
|
this.btnCloseExport.Size = new System.Drawing.Size(53, 23);
|
||||||
|
this.btnCloseExport.TabIndex = 12;
|
||||||
|
this.btnCloseExport.Text = "Close";
|
||||||
|
this.btnCloseExport.UseVisualStyleBackColor = true;
|
||||||
|
this.btnCloseExport.Click += new System.EventHandler(this.btnCloseExport_Click);
|
||||||
|
//
|
||||||
|
// btnCloseImport
|
||||||
|
//
|
||||||
|
this.btnCloseImport.Enabled = false;
|
||||||
|
this.btnCloseImport.Location = new System.Drawing.Point(562, 33);
|
||||||
|
this.btnCloseImport.Name = "btnCloseImport";
|
||||||
|
this.btnCloseImport.Size = new System.Drawing.Size(53, 23);
|
||||||
|
this.btnCloseImport.TabIndex = 18;
|
||||||
|
this.btnCloseImport.Text = "Close";
|
||||||
|
this.btnCloseImport.UseVisualStyleBackColor = true;
|
||||||
|
this.btnCloseImport.Click += new System.EventHandler(this.btnCloseImport_Click);
|
||||||
|
//
|
||||||
// dlgExportImport
|
// dlgExportImport
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@ -380,6 +406,8 @@ namespace VEPROMS
|
|||||||
private System.Windows.Forms.Label lblImportStatus;
|
private System.Windows.Forms.Label lblImportStatus;
|
||||||
private System.Windows.Forms.Label lblExportTime;
|
private System.Windows.Forms.Label lblExportTime;
|
||||||
private System.Windows.Forms.Label lblImportTime;
|
private System.Windows.Forms.Label lblImportTime;
|
||||||
|
private System.Windows.Forms.Button btnCloseExport;
|
||||||
|
private System.Windows.Forms.Button btnCloseImport;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user