public IComponentModelDTO Create(CreateDTO value) { switch (value) { case CreateDTO.ComponentModel: return new ComponentModelDTO (); case CreateDTO.ResponseMethod: ResponseMethodDTO responseMethodDTO = new ResponseMethodDTO (); responseMethodDTO.SetExecutionSuccess (false); //Por defecto inicializará a false. return responseMethodDTO; default: return null; } }
public void ResponseReturnValue(ResponseMethodDTO responseMethodDTO) { if (responseMethodDTO.ExecutionSuccess) { MessageBox.Show ("Yeah !!, el valor de retorno es: " + responseMethodDTO.MethodResult); } }
private void CallBackExecuteRedirectView() { lock (responseMethodDTO) { responseMethodDTO = (ResponseMethodDTO)FactoryDTO.Instance.Create (CreateDTO.ResponseMethod); object ret = methodToExecute.Invoke (componentModel, parameters); responseMethodDTO.MethodResult = ret; responseMethodDTO.SetExecutionSuccess (true); if (componentModel.VirtualMethod != null) { componentModel.VirtualMethod (responseMethodDTO); componentModel.VirtualMethod = null; } methodToResponse.Invoke (viewHandler, new object[] {responseMethodDTO}); } }
public void ResponseInitApp(ResponseMethodDTO response) { if (response.ExecutionSuccess) { response = DefaultContainer.Instance.Execute ("ComponentBuilder", "ShowForm", null); } }