Compare commits

..

2 Commits

19 changed files with 52 additions and 105 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -231,6 +231,7 @@ namespace VEPROMS
cbxOpenAfterCreate2.Visible = oneProcedure; cbxOpenAfterCreate2.Visible = oneProcedure;
cbxOpenAfterCreate2.Checked = false; cbxOpenAfterCreate2.Checked = false;
cbxOverwritePDF2.Visible = oneProcedure; cbxOverwritePDF2.Visible = oneProcedure;
cbxOverwritePDF2.Checked = true;
gpnlDebug.Visible = Volian.Base.Library.VlnSettings.DebugMode; gpnlDebug.Visible = Volian.Base.Library.VlnSettings.DebugMode;
swtbtnGeneratePlacekeeper.Value = false; swtbtnGeneratePlacekeeper.Value = false;
cbxGenerateConActSum.Checked = false; cbxGenerateConActSum.Checked = false;
@@ -1224,6 +1225,9 @@ namespace VEPROMS
return true; return true;
} }
private void txbRevDate_Enter(object sender, EventArgs e) private void txbRevDate_Enter(object sender, EventArgs e)
{ {
txbDate = txbRevDate; txbDate = txbRevDate;

View File

@@ -425,9 +425,9 @@ namespace VEPROMS
MessageBox.Show(msg, "Import Completed", MessageBoxButtons.OK, MessageBoxIcon.Information); // C2020-042 changed mesage box title MessageBox.Show(msg, "Import Completed", MessageBoxButtons.OK, MessageBoxIcon.Information); // C2020-042 changed mesage box title
//MessageBox.Show(string.Format("Finished Importing:\n\n{0}", txtImport.Text.Substring(txtImport.Text.LastIndexOf("\\") + 1)), "Import", MessageBoxButtons.OK, MessageBoxIcon.Information); //MessageBox.Show(string.Format("Finished Importing:\n\n{0}", txtImport.Text.Substring(txtImport.Text.LastIndexOf("\\") + 1)), "Import", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
if (canceledPressed || !isImported) if (canceledPressed)
{ {
MessageBox.Show(string.Format("Cancelling the import of:\n\n{0}", txtImport.Text.Substring(txtImport.Text.LastIndexOf("\\") + 1)), "Cancelling Import", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(string.Format("Canceling the import of:\n\n{0}", txtImport.Text.Substring(txtImport.Text.LastIndexOf("\\") + 1)), "Import", MessageBoxButtons.OK, MessageBoxIcon.Information);
btnCloseImport.PerformClick(); btnCloseImport.PerformClick();
} }
} }
@@ -906,8 +906,8 @@ namespace VEPROMS
// C2020-032: Import Procedure set when existing name exists, allow user to import with 'Copy (#) of'. // C2020-032: Import Procedure set when existing name exists, allow user to import with 'Copy (#) of'.
// This is similar functionality to the import of a procedure without the overwrite part. // This is similar functionality to the import of a procedure without the overwrite part.
string msg = string.Format("The procedure set you are importing, {0}, already exists.\n\nDo you want to import {0} as a COPY of the existing set?\n\nThis will prefix the name with \"Copy (#) of\"", name); string msg = string.Format("The procedure set you are importing, {0}, already exists.\n\nDo you want to import {0} as a COPY of the existing set?\n\nThis will prefix the name with \"Copy (#) of\"", name);
DialogResult dr = MessageBox.Show(this, msg, "Create Copy Of Existing Procedure Set", MessageBoxButtons.OKCancel, MessageBoxIcon.Stop); DialogResult dr = MessageBox.Show(this, msg, "Create Copy Of Existing Procedure Set", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Stop);
if (dr == DialogResult.OK) if (dr == DialogResult.Yes)
{ {
string number = ""; string number = "";
int max = -1; int max = -1;
@@ -931,11 +931,6 @@ namespace VEPROMS
ff = AddFolder(Folder.Get(MyFolder.FolderID), xd, name); ff = AddFolder(Folder.Get(MyFolder.FolderID), xd, name);
} }
//else if (dr == System.Windows.Forms.DialogResult.Cancel)
//{
// //canceledPressed = true;
// //resolvedProcNum = false;
//}
else else
return false; return false;
} }

View File

@@ -11,7 +11,6 @@ using Volian.Controls.Library;
using DevComponents.DotNetBar; using DevComponents.DotNetBar;
using JR.Utils.GUI.Forms; using JR.Utils.GUI.Forms;
using Volian.Controls.Library; using Volian.Controls.Library;
using System.Linq;
namespace VEPROMS namespace VEPROMS
{ {
@@ -1800,21 +1799,6 @@ namespace VEPROMS
} }
} }
//B2024-074 If only deleting annotations from an individual procedure, verify can check out procedure.
string msgpi = string.Empty;
foreach (ProcedureInfo pi in pil)
{
//LINQ used for 1st check of if statement
//basically check if procedure was already part of a docVersionsFolder
//before checking if procedure was checked out already
//to avoid duplicate messages for checked out procedures
if (!dvil.Any(x => x.Procedures.Any(y => y.ItemID == pi.ItemID)) && !MySessionInfo.CanCheckOutItem(pi.ItemID, CheckOutType.Procedure, ref msgpi))
{
sbDocVersions.AppendLine(msgpi);
cancelledOut = true;
}
}
if (cancelledOut) if (cancelledOut)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();

View File

@@ -511,7 +511,7 @@ namespace VEPROMS
private void btnPC_Click(object sender, EventArgs e) private void btnPC_Click(object sender, EventArgs e)
{ {
if (MessageBox.Show(this, "Are you sure you want to add Applicability to this Working Draft?", "Add Applicability", MessageBoxButtons.YesNo, MessageBoxIcon.Stop) == DialogResult.Yes) if (MessageBox.Show(this, "Are you sure you want to add Applicability to this Working Draft?", "Add Applicability", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Stop) == DialogResult.Yes)
{ {
btnApplicability.Visible = true; btnApplicability.Visible = true;
tiApplicability.Visible = true; tiApplicability.Visible = true;

View File

@@ -156,38 +156,32 @@ namespace VEPROMS.CSLA.Library
SessionInfoList sil = DataPortal.Fetch<SessionInfoList>(new SessionInfoList.CanCheckOutItemCriteria(objectID, objectType)); SessionInfoList sil = DataPortal.Fetch<SessionInfoList>(new SessionInfoList.CanCheckOutItemCriteria(objectID, objectType));
if (sil.Count == 0) if (sil.Count == 0)
return true; return true;
if (objectType == CheckOutType.Session) if (objectType == CheckOutType.Session)
{ {
if (sil.Count == 1) if (sil.Count == 1)
{ {
OwnerInfoList oil = OwnerInfoList.GetBySessionID(sil[0].SessionID); OwnerInfoList oil = OwnerInfoList.GetBySessionID(sil[0].SessionID);
if (oil.Count == 0) if (oil.Count == 0)
return true; return true;
else else
{ {
message = "Export Procedure Set and Import Procedure Set are not available because you have open procedures or documents"; message = "Export Procedure Set and Import Procedure Set are not available because you have open procedures or documents";
return false; return false;
} }
} }
else else
{ {
message = "Export Procedure Set and Import Procedure Set are not available because there are other sessions open in the database"; message = "Export Procedure Set and Import Procedure Set are not available because there are other sessions open in the database";
return false; return false;
} }
} }
bool rv = true; bool rv = true;
// C2015-022 part of separate windows logic, check the processID instead of the sessionID // C2015-022 part of separate windows logic, check the processID instead of the sessionID
foreach (SessionInfo si in sil) foreach (SessionInfo si in sil)
{ {
if (si.ProcessID != this.ProcessID && objectType == CheckOutType.Procedure) if (si.ProcessID != this.ProcessID && objectType == CheckOutType.Procedure)
{ {
//B2024-074 If no Number for Procedure, Display Title message = string.Format("The procedure {0} is already checked out to {1}", ItemInfo.Get(objectID).MyProcedure.DisplayNumber, si.UserID);
ProcedureInfo tmpproc = ItemInfo.Get(objectID).MyProcedure;
string name = tmpproc.DisplayNumber;
if (string.IsNullOrEmpty(name))
{ name = tmpproc.DisplayText; }
message = string.Format("The procedure {0} is already checked out to {1}", name, si.UserID);
rv = rv && false; rv = rv && false;
} }
else if (si.ProcessID != this.ProcessID && objectType == CheckOutType.Document) else if (si.ProcessID != this.ProcessID && objectType == CheckOutType.Document)
@@ -201,16 +195,8 @@ namespace VEPROMS.CSLA.Library
OwnerInfo oi = OwnerInfo.GetBySessionIDandVersionID(si.SessionID, objectID); OwnerInfo oi = OwnerInfo.GetBySessionIDandVersionID(si.SessionID, objectID);
if (oi == null) if (oi == null)
message = message + string.Format("The working draft is already checked out to {0}", si.UserID) + Environment.NewLine; message = message + string.Format("The working draft is already checked out to {0}", si.UserID) + Environment.NewLine;
else if (oi.OwnerType == 0) else if(oi.OwnerType == 0)
{ message = message + string.Format("The procedure {0} is already checked out to {1}", ItemInfo.Get(oi.OwnerItemID).MyProcedure.DisplayNumber, si.UserID) + Environment.NewLine;
//B2024-074 If no Number for Procedure, Display Title
ProcedureInfo tmpproc = ItemInfo.Get(oi.OwnerItemID).MyProcedure;
string name = tmpproc.DisplayNumber;
if (string.IsNullOrEmpty(name))
{ name = tmpproc.DisplayText; }
message = message + string.Format("The procedure {0} is already checked out to {1}", name, si.UserID) + Environment.NewLine;
}
else if (oi.OwnerType == 1) else if (oi.OwnerType == 1)
message = message + string.Format("The document {0} is already checked out to {1}", DocumentInfo.Get(oi.OwnerItemID).DocumentEntries[0].MyContent.Text, si.UserID) + Environment.NewLine; message = message + string.Format("The document {0} is already checked out to {1}", DocumentInfo.Get(oi.OwnerItemID).DocumentEntries[0].MyContent.Text, si.UserID) + Environment.NewLine;
else if (oi.OwnerType == 2) else if (oi.OwnerType == 2)
@@ -225,15 +211,7 @@ namespace VEPROMS.CSLA.Library
if (oi != null) if (oi != null)
{ {
if (oi.OwnerType == 0) if (oi.OwnerType == 0)
{ message = message + string.Format("The procedure {0} is already checked out to {1}", ItemInfo.Get(oi.OwnerItemID).MyProcedure.DisplayNumber, si.UserID) + Environment.NewLine;
//B2024-074 If no Number for Procedure, Display Title
ProcedureInfo tmpproc = ItemInfo.Get(oi.OwnerItemID).MyProcedure;
string name = tmpproc.DisplayNumber;
if (string.IsNullOrEmpty(name))
{ name = tmpproc.DisplayText; }
message = message + string.Format("The procedure {0} is already checked out to {1}", name, si.UserID) + Environment.NewLine;
}
else if (oi.OwnerType == 1) else if (oi.OwnerType == 1)
message = message + string.Format("The document {0} is already checked out to {1}", DocumentInfo.Get(oi.OwnerItemID).DocumentEntries[0].MyContent.Text, si.UserID) + Environment.NewLine; message = message + string.Format("The document {0} is already checked out to {1}", DocumentInfo.Get(oi.OwnerItemID).DocumentEntries[0].MyContent.Text, si.UserID) + Environment.NewLine;
else if (oi.OwnerType == 2) else if (oi.OwnerType == 2)

View File

@@ -277,27 +277,17 @@ namespace Volian.Controls.Library
private void btnRemoveAnnotation_Click(object sender, EventArgs e) private void btnRemoveAnnotation_Click(object sender, EventArgs e)
{ {
// CSM B2024-068 / B2024-069 - check if current annotation is not selected before removal of annotation //using (Annotation annotation = CurrentAnnotation.Get())
if (CurrentAnnotation != null) //{
{ // annotation.Delete();
//using (Annotation annotation = CurrentAnnotation.Get()) _AnnotationSearch.LoadingList = true;
//{ Annotation.DeleteAnnotation(CurrentAnnotation);
// annotation.Delete(); // annotation.Save();
_AnnotationSearch.LoadingList = true; _AnnotationSearch.LoadingList = false;
Annotation.DeleteAnnotation(CurrentAnnotation); CurrentAnnotation = null;
// annotation.Save(); UpdateAnnotationGrid();
_AnnotationSearch.LoadingList = false; _AnnotationSearch.UpdateAnnotationSearchResults(); // B2019-004: update search results list when an annotation is removed.
CurrentAnnotation = null; //}
UpdateAnnotationGrid();
_AnnotationSearch.UpdateAnnotationSearchResults(); // B2019-004: update search results list when an annotation is removed.
//}
}
else
{
FlexibleMessageBox.Show("You Must Select an Annotation To Remove", "Annotation Not Selected", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
}
} }
private void btnSaveAnnotation_Click(object sender, EventArgs e) private void btnSaveAnnotation_Click(object sender, EventArgs e)

View File

@@ -503,7 +503,7 @@ namespace Volian.Controls.Library
this.cbxSortBySetpointID.Size = new System.Drawing.Size(121, 23); this.cbxSortBySetpointID.Size = new System.Drawing.Size(121, 23);
this.cbxSortBySetpointID.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.cbxSortBySetpointID.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbxSortBySetpointID.TabIndex = 11; this.cbxSortBySetpointID.TabIndex = 11;
this.cbxSortBySetpointID.Text = "Sort By Setpoint ID"; this.cbxSortBySetpointID.Text = "Sort By Sepoint ID";
this.cbxSortBySetpointID.Visible = false; this.cbxSortBySetpointID.Visible = false;
// //
// DisplayReports // DisplayReports

View File

@@ -270,7 +270,7 @@ namespace Volian.Controls.Library
this.cbxTranCategory.Name = "cbxTranCategory"; this.cbxTranCategory.Name = "cbxTranCategory";
this.cbxTranCategory.Size = new System.Drawing.Size(215, 21); this.cbxTranCategory.Size = new System.Drawing.Size(215, 21);
this.cbxTranCategory.TabIndex = 1; this.cbxTranCategory.TabIndex = 1;
this.cbxTranCategory.WatermarkText = "Select Category of Transitions"; this.cbxTranCategory.WatermarkText = "Select Cateogry of Transitions";
// //
// lblTranCategory // lblTranCategory
// //
@@ -402,7 +402,7 @@ namespace Volian.Controls.Library
this.cbxTranCategory.Name = "cbxTranCategory"; this.cbxTranCategory.Name = "cbxTranCategory";
this.cbxTranCategory.Size = new System.Drawing.Size(215, 21); this.cbxTranCategory.Size = new System.Drawing.Size(215, 21);
this.cbxTranCategory.TabIndex = 1; this.cbxTranCategory.TabIndex = 1;
this.cbxTranCategory.WatermarkText = "Select Category of Transitions"; this.cbxTranCategory.WatermarkText = "Select Cateogry of Transitions";
// //
// lblTranCategory // lblTranCategory
// //

View File

@@ -103,7 +103,7 @@ namespace Volian.Controls.Library
public string TbFSwd public string TbFSwd
{ {
get {return tbFSWd.Text;} get {return tbFSWd.Text;}
set { tbFSWd.Text = value; tbFSWd.Refresh(); } // trBarFS.Value = Convert.ToInt32(value); set { tbFSWd.Text = value; tbFSWd.Refresh(); trBarFS.Value = Convert.ToInt32(value); }
} }
public string TbFSht public string TbFSht
@@ -111,7 +111,7 @@ namespace Volian.Controls.Library
get { return tbFSHt.Text; } get { return tbFSHt.Text; }
set { tbFSHt.Text = value; tbFSHt.Refresh(); _origFigureSizeRatio = float.Parse(value) / float.Parse(tbFSWd.Text); } set { tbFSHt.Text = value; tbFSHt.Refresh(); _origFigureSizeRatio = float.Parse(value) / float.Parse(tbFSWd.Text); }
} }
#endregion #endregion
#region Constructor #region Constructor
public DisplayTags() public DisplayTags()

View File

@@ -285,7 +285,7 @@ namespace Volian.Controls.Library
} }
public EditItem ActiveParent public EditItem ActiveParent
{ {
get { return _MyParentEditItem != null ? _MyParentEditItem : _MyPreviousEditItem?.ActiveParent; } get { return _MyParentEditItem != null ? _MyParentEditItem : _MyPreviousEditItem.ActiveParent; }
} }
/// <summary> /// <summary>
/// Return the Parent EditItem /// Return the Parent EditItem

View File

@@ -256,8 +256,7 @@ namespace Volian.Controls.Library
private int _origCfgHt = 0; // keep track if original size was stored in cfg private int _origCfgHt = 0; // keep track if original size was stored in cfg
private int _origCfgWd = 0; private int _origCfgWd = 0;
private bool _pastedNew = false; // need this for flagging newly pasted image (may need to clear cfg) private bool _pastedNew = false; // need this for flagging newly pasted image (may need to clear cfg)
private DisplayTags _displayTags = new DisplayTags(); private DisplayTags _displayTags;
//House myhouse = new House();
#endregion #endregion
#region Constructors #region Constructors
@@ -317,11 +316,8 @@ namespace Volian.Controls.Library
} }
private void SetWidthsAndHeights(System.Drawing.Image img) private void SetWidthsAndHeights(System.Drawing.Image img)
{ {
int wd = img.Width * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) int wd = img.Width * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch)
int ht = img.Height * MyStepPanel.DPI / 72; int ht = img.Height * MyStepPanel.DPI / 72;
if (MyItemInfo.MyContent.MyImage != null) // image is null if creating new. if (MyItemInfo.MyContent.MyImage != null) // image is null if creating new.
{ {
ImageConfig ic = new ImageConfig(MyItemInfo.MyContent.MyImage); ImageConfig ic = new ImageConfig(MyItemInfo.MyContent.MyImage);
@@ -344,9 +340,9 @@ namespace Volian.Controls.Library
_displayTags.TbFSwd = wd.ToString(); _displayTags.TbFSwd = wd.ToString();
_displayTags.TbFSht = ht.ToString(); _displayTags.TbFSht = ht.ToString();
} }
} }
// the following gets called for 'NEW' images // the following gets called for 'NEW' images
private E_ImageSource InsType = E_ImageSource.None; private E_ImageSource InsType = E_ImageSource.None;
public ImageItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, EditItem nextEditItem, ImageItem.E_ImageSource insType, DisplayTags displayTags) public ImageItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, EditItem nextEditItem, ImageItem.E_ImageSource insType, DisplayTags displayTags)