Skip to content

TODOPopupControl diary-task confirmation

This operation prompts the user to confirm creation of a Diary/Claim task, optionally requiring and validating an entered Mail ID against employee data before confirming.

Field Value
Operation ID OP-6
Trigger Hosting page constructs a clsPopupTask (task id/message/claim id/type/mailid-required flag), assigns it to Task, and sets Active = True.
Inputs Task (clsPopupTask), entered Mail ID
Outputs ConfirmAction(Confirm, TODOTaskEventArgs)
Primary components TODOPopupControl.CreateChildControls, TODOPopupControl.Render, TODOPopupControl.YesButtonClick, TODOPopupControl.ValidateMailid, TODOPopupControl.NoButtonClick
Entry point SAIF.Presentation.Web.Controls.PopUps.Infragistics111\TODOPopupControl.vb

Steps

  1. CreateChildControls() parses TODOPopup.ascx, resolves txtTodoMailId, cmdTodoYes, cmdTodoNo; wires an Enter-key JS handler (TodoEnterKeyPress) that triggers the Yes button's postback, and Click handlers for Yes/No.
  2. Render() (BR-POPUP-005):
  3. Sets the task message text.
  4. Chooses one of two Mail ID prompt labels depending on Task.MailidRequired, adjusting the Mail ID textbox position accordingly.
  5. Clears any prior read-only/error styling.
  6. Shows/hides the "Do you wish to create a Claim Task?" prompt and the No button based on Task.TaskType: RequiredTask hides the No button and relabels Yes as "OK".
  7. Focuses the Mail ID textbox.
  8. On Yes (YesButtonClick) (BR-POPUP-004):
  9. Reads the posted Mail ID directly from Request.Item(...) (uppercased/trimmed).
  10. If MailidRequired and empty: marks invalid.
  11. If non-empty: calls ValidateMailid() → clsEmployeeData.GetDataByMailID(DataPortalInfo, mailid) (referenced package call, not traced further)** and requires IsValid.
  12. On success: resets the textbox and raises ConfirmAction(True, New TODOTaskEventArgs(mailid, Task)).
  13. On failure: keeps the popup active and applies an "errorbackcolor" CSS class to flag the invalid Mail ID field.
  14. On No (NoButtonClick): resets the textbox and raises ConfirmAction(False, New TODOTaskEventArgs("", Task)).

Process flow

The following diagram visualizes the diary-task confirmation flow.

flowchart TD
    Start([Hosting page constructs clsPopupTask, sets Active = True]) --> Create[CreateChildControls parses ASCX]
    Create --> Render[Render prompt based on TaskType/MailidRequired]
    Render --> Action{Yes or No clicked}
    Action -->|Yes| MailCheck{Mail ID required and empty?}
    MailCheck -->|Yes| Invalid([Mark invalid, popup stays active])
    MailCheck -->|No| Validate[ValidateMailid via clsEmployeeData.GetDataByMailID]
    Validate --> Valid{IsValid?}
    Valid -->|Yes| Confirm([ConfirmAction True with TODOTaskEventArgs])
    Valid -->|No| Invalid
    Action -->|No| Cancel([ConfirmAction False])

Failure and edge-case behavior

  • An unresolvable or required-but-missing Mail ID keeps the popup active and flags the Mail ID field with "errorbackcolor" rather than raising ConfirmAction (BR-POPUP-004).
  • RequiredTask tasks hide the No button entirely — the user can only acknowledge, not decline (BR-POPUP-005).

Sources

  • SAIF.Presentation.Web.Controls.PopUps.Infragistics111\TODOPopupControl.vb
  • SAIF.Presentation.Web.Controls.PopUps.Infragistics111\TODOPopup.ascx