Compare commits
No commits in common. "659833c5bfbaac5c47dce42e3f8b3bbc9ebc4fe3" and "3ec7c11797667a5fd9c33d372fe66c765aa074d9" have entirely different histories.
659833c5bf
...
3ec7c11797
@ -22,8 +22,6 @@ namespace VEPROMS
|
|||||||
string procList = "";
|
string procList = "";
|
||||||
string docvList = "";
|
string docvList = "";
|
||||||
int AnnotationTyp;
|
int AnnotationTyp;
|
||||||
string AnnotationName = "";
|
|
||||||
string totalDeleteCnt = "";
|
|
||||||
List<ProcedureInfo> pil2 = new List<ProcedureInfo>();
|
List<ProcedureInfo> pil2 = new List<ProcedureInfo>();
|
||||||
List<DocVersionInfo> dvil2 = new List<DocVersionInfo>();
|
List<DocVersionInfo> dvil2 = new List<DocVersionInfo>();
|
||||||
private frmBatchRefresh mainForm = null;
|
private frmBatchRefresh mainForm = null;
|
||||||
@ -101,29 +99,16 @@ namespace VEPROMS
|
|||||||
private AnnotationTypeInfoList myAnnotationTypeInfoList = null;
|
private AnnotationTypeInfoList myAnnotationTypeInfoList = null;
|
||||||
private LocalAnnotationTypeInfoList myLocalAnnotationTypeInfoList = null;
|
private LocalAnnotationTypeInfoList myLocalAnnotationTypeInfoList = null;
|
||||||
|
|
||||||
// Process used to cleanup annotations "(Proceed?" button)
|
// Process used to cleanup annotations "(Proceed?" button)
|
||||||
private void button1_Click(object sender, EventArgs e)
|
private void button1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
TextBox frm2 = mainForm.GettxtProcess();
|
|
||||||
TextBox frm3 = mainForm.GettxtResults();
|
|
||||||
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
|
|
||||||
AnnotationName = System.Convert.ToString(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Value);
|
|
||||||
frm3.AppendText("Deleting Annotations: Annotation Type: " + '"' + AnnotationName + '"');
|
|
||||||
frm3.AppendText(Environment.NewLine + "P = Procedure, F = Folder" + Environment.NewLine);
|
|
||||||
int deletecountProc = 0;
|
|
||||||
int deletecountDocv = 0;
|
|
||||||
foreach (var p in pil2)
|
foreach (var p in pil2)
|
||||||
{
|
{
|
||||||
if (p.IsProcedure)
|
if (p.IsProcedure)
|
||||||
{
|
{
|
||||||
//AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
|
TextBox frm2 = mainForm.GettxtProcess();
|
||||||
//AnnotationName = System.Convert.ToString(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Value);
|
frm2.AppendText(p.DisplayNumber + ' ' + p.DisplayText);
|
||||||
//deletecountProc = Annotation.getAnnotationProcCnt(AnnotationTyp, getAnnotationProcItems(p));
|
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
|
||||||
deletecountProc = Annotation.getAnnotationProcCnt(AnnotationTyp, p.ItemID.ToString());
|
|
||||||
frm2.AppendText(Environment.NewLine + p.DisplayNumber + ' ' + p.DisplayText);
|
|
||||||
//frm3.AppendText(Environment.NewLine + "P: " + p.DisplayNumber + '"' + p.DisplayText + '"' + " Type: " + '"' + AnnotationName + '"' + " count: " + deletecountProc);
|
|
||||||
frm3.AppendText(Environment.NewLine + "P: " + p.DisplayNumber + '"' + p.DisplayText + '"' + " Delete count: " + deletecountProc);
|
|
||||||
Annotation.DeleteAnnotationProcByType(AnnotationTyp, p.ItemID.ToString());
|
Annotation.DeleteAnnotationProcByType(AnnotationTyp, p.ItemID.ToString());
|
||||||
lblCountNumber.Text = "0";
|
lblCountNumber.Text = "0";
|
||||||
}
|
}
|
||||||
@ -133,22 +118,15 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
if (d.IsDocVersion)
|
if (d.IsDocVersion)
|
||||||
{
|
{
|
||||||
//AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
|
TextBox frm2 = mainForm.GettxtProcess();
|
||||||
//AnnotationName = System.Convert.ToString(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Value);
|
frm2.AppendText(d.ActiveParent.ToString());
|
||||||
deletecountDocv = Annotation.getAnnotationCountDocv(AnnotationTyp, d.VersionID.ToString());
|
|
||||||
frm2.AppendText(Environment.NewLine + d.ActiveParent.ToString());
|
|
||||||
frm3.AppendText(Environment.NewLine + "F: " + '"' + d.ActiveParent.ToString() + '"' + " Delete count: " + deletecountDocv);
|
|
||||||
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
|
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
|
||||||
Annotation.DeleteAnnotationDocvByType(AnnotationTyp, d.VersionID.ToString());
|
Annotation.DeleteAnnotationDocvByType(AnnotationTyp, d.VersionID.ToString());
|
||||||
|
|
||||||
lblCountNumber.Text = "0";
|
lblCountNumber.Text = "0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
frm3.AppendText(Environment.NewLine + Environment.NewLine + "Total Annotations Deleted: " + totalDeleteCnt + Environment.NewLine + Environment.NewLine);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// Retrieve number of annotations that will be deleted.
|
||||||
// Retrieve number of annotations that will be deleted.
|
|
||||||
private void lbAnnotationTypes_SelectedIndexChanged(object sender, EventArgs e)
|
private void lbAnnotationTypes_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
btnClean.Enabled = false;
|
btnClean.Enabled = false;
|
||||||
@ -167,7 +145,6 @@ namespace VEPROMS
|
|||||||
deletecountDocv = Annotation.getAnnotationCountDocv(AnnotationTyp, getAnnotationDocvItems(dvil2));
|
deletecountDocv = Annotation.getAnnotationCountDocv(AnnotationTyp, getAnnotationDocvItems(dvil2));
|
||||||
}
|
}
|
||||||
lblCountNumber.Text = (deletecountProc + deletecountDocv).ToString();
|
lblCountNumber.Text = (deletecountProc + deletecountDocv).ToString();
|
||||||
totalDeleteCnt = (deletecountProc + deletecountDocv).ToString();
|
|
||||||
btnClean.Enabled = true;
|
btnClean.Enabled = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -179,5 +156,3 @@ namespace VEPROMS
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,13 +61,6 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
return txtProcess;
|
return txtProcess;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make txtResults text box available to frmAnnotationsClean form.
|
|
||||||
internal TextBox GettxtResults()
|
|
||||||
{
|
|
||||||
return txtResults;
|
|
||||||
}
|
|
||||||
|
|
||||||
// NOTE: removed the Refresh ROs and Refresh Transitions and ROs options (now only Transitions can be refreshed)
|
// NOTE: removed the Refresh ROs and Refresh Transitions and ROs options (now only Transitions can be refreshed)
|
||||||
// the Update ROs and Refresh ROs logic was merged together. The Update ROs will functionally do both
|
// the Update ROs and Refresh ROs logic was merged together. The Update ROs will functionally do both
|
||||||
// also annotations will be placed on step elements that have RO changes
|
// also annotations will be placed on step elements that have RO changes
|
||||||
@ -1729,7 +1722,7 @@ namespace VEPROMS
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Write progress status
|
// Write progress status
|
||||||
txtProcess.AppendText("Deleting Annotations..." + Environment.NewLine);
|
txtProcess.AppendText("Deleting Annotations...");
|
||||||
|
|
||||||
// Create a list of procedures the user selected
|
// Create a list of procedures the user selected
|
||||||
List<ProcedureInfo> pil = new List<ProcedureInfo>();
|
List<ProcedureInfo> pil = new List<ProcedureInfo>();
|
||||||
@ -1799,5 +1792,3 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user