Final version: Actions for Button Freigabe PA beantragen => Same for all the checks Cleint side click -> No check -> Show a pop up similar to PA bearbeiten (loading panel) with generic text "Freigabe wird vorbereitet. Dieser Prozess kann bis zu einer Minute dauern. Bitte warten Sie..." Backend Click -> Do PFK check (Remove IsPfkChecked) --->Do PFK -> Rebind data -> Do PA Actual check (IsPaActual) ---> Do PA -> Do PA check (CheckProjektauftrag) -> Show approvals dialog We need two parts: - Server side Part 2 is called when the condition is not met and also when the check passes Part 1: PFK check =>Hide the loading panel => Check condition (!this.IsLocked) Initialise the dialog and from the current server side code (cBtnApprovalPFK_Click) 1. Tools.RegisterClientScriptBlock (PFK dialog) 2. Do the server side initialisation (cBtnApprovalPFK_Click) =>When condition is not met, call part 2 ( All other checks) --------------------------------- PFK dialog User clicks on the Weiter button ->The actual PFK check is done (cBtnPKFCheckStart_Click) --> When the check passes, hide the PFK dialog and then continue Part 2 --> When the check fails, the process stops ------------------------------------------------------------ Part 2: All other checks 2.0. Rebind data 2.1. IsPaActual -> Check the condition (this.WebpartDisplayMode == DisplayMode.BusinessCase && !this.IsLocked) ---> If true, check IsPaActual -------> If true, then go to 2.2 -------> If false, then show Dialog, disable button ---> If false, then go to 2.2 2.2 CheckProjektauftrag -> Check the condition (this.WebpartDisplayMode == DisplayMode.BusinessCase && !this.IsLocked && !this.ProjectInfo.IsAuftragstopf) ---> If true, check CheckProjektauftrag -------> If true, -------> If false, then show PA check Dialog ---> If false, then go to 2.3 2.3 Approval Dialog (BindApprovals) -> Show approval dialog -> BindApprovals Testing: 1. Check current checks 2. webpart for PA, CR,AB 3. the whole approval workflow process (creating, updating, cancelling) Generic Process for any checks - Backend -> Check conditions if the check is necessary (If the conditions fail then next step) --->Initialise the data necessary for the check(do the check, Eg. PFK -> show the dialog and checks happen later) --->Hide the current loading panel ---> Show the necessary dialog (Tools.RegisterClientScriptBlock) ==> If the check passes, then next step, if the check fails then the process cancels/ stops