public override void Execute() { var options = new WindowPrepareOptions { StatusText = _loadingMsg, ExistingFormReloadBusinessData = false, NewFormLoadBusinessData = false, UseExistingFormIfPresent = true, NewFormState = FormWindowState.Maximized, ShowWaitForm = false, FormIdValueToSearchFor = _formIdValueToSearchFor, FormDataIdValueToSearchFor = _formDataIdValueToSearchFor }; bool newForm; var form = WindowManager.PrepareShowWindow <T>(options, out newForm); using (new StatusBusy(_loadingMsg, true)) { PrepareLoadData(form, newForm); if (newForm) { form.LoadBusiness(); } else { form.ReloadBusiness(); } } form.Show(); }
public override void Execute() { var initParams = new FormInstructionInitParameter { EntityKey = _businessObjectId, Instruction = _instruction }; var options = new WindowPrepareOptions { StatusText = _loadingMsg, ExistingFormReloadBusinessData = false, NewFormLoadBusinessData = true, FormDataIdValueToSearchFor = _businessObjectId, UseExistingFormIfPresent = (_instruction is EditInstruction), // In case of an edit instruction, look for a open window with the same entity NewFormState = FormWindowState.Maximized, ShowWaitForm = true, InitalizationParameters = initParams }; bool newWindow; var editForm = WindowManager.PrepareShowWindow <T>(options, out newWindow); if (newWindow) { OnEditFormStarted(editForm.BusinessObject); editForm.Show(); } }
public override void Execute() { var options = new WindowPrepareOptions { ExistingFormReloadBusinessData = true, NewFormLoadBusinessData = true, NewFormState = FormWindowState.Maximized, ShowWaitForm = true, StatusText = _loadingMsg, UseExistingFormIfPresent = true, FormDataIdValueToSearchFor = _formDataId, InitalizationParameters = _initParams }; WindowManager.ShowWindow <T>(options); }