批量不可用事件新增时间日期不在计划周期内的需要提示“该日期不在计划周期内!”
已修改2个文件
已添加1个文件
34 ■■■■■ 文件已修改
_Main/BL/InfoMessages.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_Event/StaticMethod_ValidDate.qbl 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Response_PanelHeader_144_ButtonCreate_OnClick.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/InfoMessages.qbl
@@ -206,6 +206,10 @@
  {
    DefaultText: 'This date is not within the planned cycle!'
  }
  InfoMessage MP_LibCal_Event_ValidDatePeriod
  {
    DefaultText: 'The start date must be less than the end date!'
  }
  InfoMessage MP_Routing_IllegalDateRange
  {
    DefaultText: 'The start date cannot be longer than the end date.'
_Main/BL/Type_LibCal_Event/StaticMethod_ValidDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
Quintiq file version 2.0
#parent: #root
StaticMethod ValidDate (
  output String feedback_o,
  MacroPlan owner,
  DateTime startdate,
  DateTime endtime
) declarative remote as Boolean
{
  TextBody:
  [*
    // ç”„兰鸽 Jul-26-2024 (created)
    feedback_o := '';
    if( startdate > endtime ){
      feedback_o := Translations::MP_LibCal_Event_ValidDatePeriod();
    }
    if( not exists( owner, Period_MP, period, not period.IsHistorical()
                and period.TimeUnit() = Translations::MP_GlobalParameters_Day()
                and period.StartDate() = startdate.Date()
                and ( period.EndDate() = endtime.Date() or period.StartDate() = endtime.Date() ) ) ){
      feedback_o := Translations::MP_LibCal_Event_ValidDate();
    }
    return feedback_o = '';
  *]
}
_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Response_PanelHeader_144_ButtonCreate_OnClick.def
@@ -6,6 +6,10 @@
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  Precondition:
  [*
    return LibCal_Event::ValidDate( feedback, MacroPlan, dhStartDate.Data() + durStartTimeOfDay.Duration(), dhEndDate.Data() + durEndTimeOfDay.Duration() );
  *]
  QuillAction
  {
    Body: