Example #1
0
        }//afterPopulateProps()

        protected override bool onButtonClick(NbtButtonData ButtonData)
        {
            if (null != ButtonData.NodeTypeProp)
            {
                //Remember: Save is an OCP too
                if (PropertyName.RunNow == ButtonData.NodeTypeProp.getObjectClassPropName())
                {
                    if (DueDateInterval.getStartDate() < DateTime.Now)  //if the button was clicked after the first due date
                    {
                        NextDueDate.DateTimeValue = DateTime.Now;
                        Node.postChanges(false);
                        ButtonData.Action = CswEnumNbtButtonAction.refresh;
                    }
                    else
                    {
                        _CswNbtResources.Messages.Add(new CswWebSvcReturnBase.ErrorMessage()
                        {
                            ShowError = true,
                            Type      = CswEnumErrorType.Warning,
                            Message   = "A mail report cannot be run before its first scheduled due date.",
                            Detail    = "Run now is invalid before initial due date."
                        });
                    }
                }
            }
            return(true);
        }
Example #2
0
 protected override void afterPopulateProps()
 {
     Type.SetOnPropChange(OnTypePropChange);
     DueDateInterval.SetOnPropChange(OnDueDateIntervalChange);
     ReportView.SetOnPropChange(OnReportViewChange);
     // Case 29369: Event is a conditional property and therefore only conditionally required.
     // Setting TemporarilyRequired should be good enough to meet the need.
     Event.TemporarilyRequired = true;
     Event.SetOnPropChange(onEventPropChange);
 }//afterPopulateProps()