B2023-015 Added Print_ViewableStartingChangeBarDate will get date only if user overrode from context menu of the procedure – used in HasChanges in itemExt.cs
B2023-015 added check for user override of the date to start showing change bars. Logic needed to handle when printing Child procedures.
This commit is contained in:
parent
6cb7a0cf5c
commit
07212ffe77
@ -411,7 +411,27 @@ namespace VEPROMS.CSLA.Library
|
|||||||
OnPropertyChanged("Print_RevDate");
|
OnPropertyChanged("Print_RevDate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//new changebar_date
|
[Category("Print Settings")]
|
||||||
|
[Browsable(false)]
|
||||||
|
[DisplayName("User Selected ChangeBarDate View")]
|
||||||
|
[RefreshProperties(RefreshProperties.All)]
|
||||||
|
[Description("The view change bars starting date stored in ChangeBarDate")]
|
||||||
|
// B2023-015 this allows us to better determine if a change bar should be view/printed for child (slave) procedures
|
||||||
|
// when the user selects view change bars starting date, it's stored in the procedure config under "ChangeBarDate"
|
||||||
|
// (see the Set for Print_ChangeBarDate)
|
||||||
|
public DateTime? Print_ViewableStartingChangeBarDate
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
DateTime? dt = null;
|
||||||
|
string s = _Xp["Procedure", "ChangeBarDate"];
|
||||||
|
if (s!= null && s!="")
|
||||||
|
dt = DateTime.Parse(s);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//new changebar_date
|
||||||
[Category("Print Settings")] //Note that this print setting is stored under 'Procedure' element
|
[Category("Print Settings")] //Note that this print setting is stored under 'Procedure' element
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
[DisplayName("Revision ChangeBarDate")]
|
[DisplayName("Revision ChangeBarDate")]
|
||||||
|
@ -3634,7 +3634,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (ii == null) return false; // when deleting a source step, this was causing a crash (null ii)
|
if (ii == null) return false; // when deleting a source step, this was causing a crash (null ii)
|
||||||
return (ii.MyContent.DTS > MyProcedure.ChangeBarDate);
|
return (ii.MyContent.DTS > MyProcedure.ChangeBarDate);
|
||||||
}
|
}
|
||||||
// if there is no override & return whether there was a change to the text.
|
// B2023-015 When user sets PROMS to show changebars after a specific date, we store that in the procedure config to Print_ChangeBarDate
|
||||||
|
// (ProcConfig.cs), but it actually get saved to "ChangeBarDate". Also when we get the value of Print_ChangeBarDate when processing a
|
||||||
|
// Child (slave), it returns the ChangeBarDate of the child instead of the date set by the user (to show change bars after a specific
|
||||||
|
// date). Print_ViewableAfterChangeBarDate was created to get only that user specified date, if it exists. If it does exist, we compare
|
||||||
|
// that with the Content datetime, otherwise we proceed as before.
|
||||||
|
DateTime? viewableStartingDateTime = (MyProcedure.MyConfig as ProcedureConfig).Print_ViewableStartingChangeBarDate;
|
||||||
|
if (viewableStartingDateTime != null && viewableStartingDateTime > MyProcedure.ChangeBarDate)
|
||||||
|
return (MyContent.DTS > viewableStartingDateTime);
|
||||||
return (MyContent.DTS > MyProcedure.ChangeBarDate);
|
return (MyContent.DTS > MyProcedure.ChangeBarDate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user