/// <summary> /// Initializes the 'SIU_edit_instanceIT' instance form. /// </summary> /// <param name="exchangeInfo">Exchange information</param> /// <returns>IUServiceController</returns> public IUServiceController Initialize(ExchangeInfo exchangeInfo) { Controller = ControllerFactory.Pasajero.Service_edit_instanceInbound(exchangeInfo, null); // Scenario. Controller.Scenario = new ScenarioPresentation(this, ScenarioType.Service); ArgumentOVController lArgumentObjectValued = null; // p_thisPasajero lArgumentObjectValued = Controller.InputFields["p_thisPasajero"] as ArgumentOVController; lArgumentObjectValued.Label = new LabelPresentation(this.lp_thisPasajero); lArgumentObjectValued.Editors[0] = new MaskedTextBoxPresentation(this.maskedTextBoxp_thisPasajeroid_Pasajero1); lArgumentObjectValued.Trigger = new ButtonPresentation(this.bp_thisPasajero); if (lArgumentObjectValued.SupplementaryInfo != null) { lArgumentObjectValued.SupplementaryInfo.Viewer = new LabelDisplaySetPresentation(this.lp_thisPasajeroSupInfo); } // Next-Previous triggers. Controller.NextTrigger = new ButtonPresentation(this.bNext); Controller.PreviousTrigger = new ButtonPresentation(this.bPrevious); Controller.ApplyTrigger = new ButtonPresentation(this.bApply); // Ok. Controller.OkTrigger = new ButtonPresentation(this.bOk); // Cancel. Controller.CancelTrigger = new ButtonPresentation(this.bCancel); Controller.Initialize(); return(Controller); }
/// <summary> /// Creates the specific IUServiceController of the 'create_instance' IU pattern. /// </summary> /// <param name="exchangeInfo">IUServiceController reference.</param> /// <returns>Specific IUServiceController of the 'create_instance' IU pattern.</returns> public static IUServiceController Service_create_instanceInbound(ExchangeInfo exchangeInfo, IUController parentController) { string[] lAgentsService = { Agents.Administrador }; IUServiceContext lContext = new IUServiceContext(exchangeInfo, "PasajeroAeronave", "create_instance", "SIU_create_instance"); IUServiceController lController = new IUServiceController("create_instance", "New", "Clas_1348178542592177Ser_1_Alias", lAgentsService, "PasajeroAeronave", "create_instance", lContext, null); // This controller is an InboundArgument controller. lController.IsOutboundArgumentController = false; #region Inbound arguments IArguments InboundArguments = lController.InputFields; // Argument p_atrid_PasajeroAeronave. InboundArguments.Add(new ArgumentDVController("p_atrid_PasajeroAeronave", "id_PasajeroAeronave", "Clas_1348178542592177Ser_1UIServ_1ElemAgrup_1_Alias", ModelType.Autonumeric, 0, false, null, lController)); // Argument p_agrAeronave. InboundArguments.Add(new ArgumentOVController("p_agrAeronave", "Aeronave", "Clas_1348178542592177Ser_1UIServ_1ElemAgrup_5_Alias", "Aeronave", true, false, false, typeof(InteractionToolkit.Aeronave.IUPopulations.PIU_AeronaveIT).FullName, null, "", lController)); // Argument p_agrPasajero. InboundArguments.Add(new ArgumentOVController("p_agrPasajero", "Pasajero", "Clas_1348178542592177Ser_1UIServ_1ElemAgrup_6_Alias", "Pasajero", true, false, false, typeof(InteractionToolkit.Pasajero.IUPopulations.PIU_PasajeroIT).FullName, null, "", lController)); // Argument p_atrNombreAeronave. InboundArguments.Add(new ArgumentDVController("p_atrNombreAeronave", "NombreAeronave", "Clas_1348178542592177Ser_1UIServ_1ElemAgrup_8_Alias", ModelType.String, 100, false, null, lController)); // Argument p_atrNombrePasajero. InboundArguments.Add(new ArgumentDVController("p_atrNombrePasajero", "NombrePasajero", "Clas_1348178542592177Ser_1UIServ_1ElemAgrup_9_Alias", ModelType.String, 100, false, null, lController)); #endregion Inbound arguments #region Outbound arguments // If the service has outbound arguments, the outbound arguments scenario is set here; otherwise, null. lController.OutboundArgumentsScenario = null; #endregion Outbound arguments return(lController); }
/// <summary> /// Creates the specific IUServiceController of the 'edit_instance' IU pattern. /// </summary> /// <param name="exchangeInfo">IUServiceController reference.</param> /// <returns>Specific IUServiceController of the 'edit_instance' IU pattern.</returns> public static IUServiceController Service_edit_instanceInbound(ExchangeInfo exchangeInfo, IUController parentController) { string[] lAgentsService = { Agents.Administrador }; IUServiceContext lContext = new IUServiceContext(exchangeInfo, "PasajeroAeronave", "edit_instance", "SIU_edit_instance"); IUServiceController lController = new IUServiceController("edit_instance", "Edit", "Clas_1348178542592177Ser_3_Alias", lAgentsService, "PasajeroAeronave", "edit_instance", lContext, null, false); // This controller is an InboundArgument controller. lController.IsOutboundArgumentController = false; #region Inbound arguments IArguments InboundArguments = lController.InputFields; ArgumentOVController lArgument = null; // Argument p_thisPasajeroAeronave. lArgument = new ArgumentOVController("p_thisPasajeroAeronave", "PasajeroAeronave", "Clas_1348178542592177Ser_3UIServ_1ElemAgrup_1_Alias", "PasajeroAeronave", false, true, false, typeof(InteractionToolkit.PasajeroAeronave.IUPopulations.PIU_PasajeroAeronaveIT).FullName, null, "", lController); lController.ArgumentThis = lArgument; InboundArguments.Add(lArgument); #endregion Inbound arguments #region Outbound arguments // If the service has outbound arguments, the outbound arguments scenario is set here; otherwise, null. lController.OutboundArgumentsScenario = null; #endregion Outbound arguments return(lController); }
/// <summary> /// Creates the specific IUServiceController of the 'create_instance' IU pattern. /// </summary> /// <param name="exchangeInfo">IUServiceController reference.</param> /// <returns>Specific IUServiceController of the 'create_instance' IU pattern.</returns> public static IUServiceController Service_create_instanceInbound(ExchangeInfo exchangeInfo, IUController parentController) { string[] lAgentsService = { Agents.Administrador }; IUServiceContext lContext = new IUServiceContext(exchangeInfo, "Revision", "create_instance", "SIU_create_instance"); IUServiceController lController = new IUServiceController("create_instance", "New", "Clas_1348178542592347Ser_1_Alias", lAgentsService, "Revision", "create_instance", lContext, null); // This controller is an InboundArgument controller. lController.IsOutboundArgumentController = false; #region Inbound arguments IArguments InboundArguments = lController.InputFields; // Argument p_atrid_RevisarAeronave. InboundArguments.Add(new ArgumentDVController("p_atrid_RevisarAeronave", "id_RevisarAeronave", "Clas_1348178542592347Ser_1UIServ_1ElemAgrup_1_Alias", ModelType.Autonumeric, 0, false, null, lController)); // Argument p_atrFechaRevision. InboundArguments.Add(new ArgumentDVController("p_atrFechaRevision", "FechaRevision", "Clas_1348178542592347Ser_1UIServ_1ElemAgrup_3_Alias", ModelType.Date, 0, false, null, lController)); // Argument p_atrNombreRevisor. InboundArguments.Add(new ArgumentDVController("p_atrNombreRevisor", "NombreRevisor", "Clas_1348178542592347Ser_1UIServ_1ElemAgrup_4_Alias", ModelType.String, 100, false, null, lController)); // Argument p_atrId_Aeronave. InboundArguments.Add(new ArgumentDVController("p_atrId_Aeronave", "Id_Aeronave", "Clas_1348178542592347Ser_1UIServ_1ElemAgrup_5_Alias", ModelType.String, 100, false, null, lController)); #endregion Inbound arguments #region Outbound arguments // If the service has outbound arguments, the outbound arguments scenario is set here; otherwise, null. lController.OutboundArgumentsScenario = null; #endregion Outbound arguments return(lController); }
/// <summary> /// Constructor from controller factory /// </summary> /// <param name="serviceController">Associated Service controller</param> /// <param name="argumentDisplaySetPairs">Pairs Argument name - Attribute in DIsplaySet name</param> public DisplaySetServiceInfo(IUServiceController serviceController, Dictionary <string, string> argumentDisplaySetPairs) { mServiceName = serviceController.Context.ServiceName; mClassServiceName = serviceController.Context.ClassName; mAgents = serviceController.Agents; mServiceAlias = CultureManager.TranslateString(serviceController.IdXML, serviceController.Alias); foreach (ArgumentController argument in serviceController.InputFields) { ArgumentDVController argumentDV = argument as ArgumentDVController; if (argumentDV != null) { // Multilanguage for the Alias argument string alias = CultureManager.TranslateString(argument.IdXML, argument.Alias); string dsElementName = argumentDisplaySetPairs[argumentDV.Name]; // Add the new pair to the list DisplaySetServiceArgumentInfo argumentInfo = new DisplaySetServiceArgumentInfo(argumentDV.Name, dsElementName, argumentDV.ModelType, alias, argumentDV.NullAllowed); this.ArgumentDisplaySetPairs.Add(argumentDV.Name, argumentInfo); } else { ArgumentOVController lOVArgument = argument as ArgumentOVController; if (lOVArgument != null && lOVArgument.AlternateKeyName != string.Empty) { SelectedInstanceArgumentAlternateKeyName = lOVArgument.AlternateKeyName; } SelectedInstanceArgumentName = argument.Name; // Multilanguage for the Alias argument SelectedInstanceArgumentAlias = CultureManager.TranslateString(argument.IdXML, argument.Alias); } } }
/// <summary> /// Initializes the 'Crear_NaveNodrizaIT' instance form. /// </summary> /// <param name="exchangeInfo">Exchange information</param> /// <returns>IUServiceController</returns> public IUServiceController Initialize(ExchangeInfo exchangeInfo) { Controller = ControllerFactory.NaveNodriza.Service_create_instanceInbound(exchangeInfo, null); // Scenario. Controller.Scenario = new ScenarioPresentation(this, ScenarioType.Service); ArgumentDVController lArgumentDataValued = null; // p_atrid_NaveNodriza lArgumentDataValued = Controller.InputFields["p_atrid_NaveNodriza"] as ArgumentDVController; lArgumentDataValued.Label = new LabelPresentation(this.lp_atrid_NaveNodriza); lArgumentDataValued.Editor = new AutonumericPresentation(this.maskedTextBoxp_atrid_NaveNodriza, this.lp_atrid_NaveNodrizaAuto, this.checkBoxp_atrid_NaveNodrizaAuto); // p_atrNombre_NaveNodriza lArgumentDataValued = Controller.InputFields["p_atrNombre_NaveNodriza"] as ArgumentDVController; lArgumentDataValued.Label = new LabelPresentation(this.lp_atrNombre_NaveNodriza); lArgumentDataValued.Editor = new TextBoxPresentation(this.textBoxp_atrNombre_NaveNodriza); // Ok. Controller.OkTrigger = new ButtonPresentation(this.bOk); // Cancel. Controller.CancelTrigger = new ButtonPresentation(this.bCancel); Controller.Initialize(); return(Controller); }
/// <summary> /// Creates the specific IUServiceController of the 'delete_instance' IU pattern. /// </summary> /// <param name="exchangeInfo">IUServiceController reference.</param> /// <returns>Specific IUServiceController of the 'delete_instance' IU pattern.</returns> public static IUServiceController Service_delete_instanceInbound(ExchangeInfo exchangeInfo, IUController parentController) { string[] lAgentsService = { Agents.Administrador }; IUServiceContext lContext = new IUServiceContext(exchangeInfo, "NaveNodriza", "delete_instance", "SIU_delete_instance"); IUServiceController lController = new IUServiceController("delete_instance", "Destroy", "Clas_1347649273856884Ser_2_Alias", lAgentsService, "NaveNodriza", "delete_instance", lContext, null, false); // This controller is an InboundArgument controller. lController.IsOutboundArgumentController = false; #region Inbound arguments IArguments InboundArguments = lController.InputFields; ArgumentOVController lArgument = null; // Argument p_thisNaveNodriza. lArgument = new ArgumentOVController("p_thisNaveNodriza", "NaveNodriza", "Clas_1347649273856884Ser_2UIServ_1ElemAgrup_1_Alias", "NaveNodriza", false, true, false, typeof(InteractionToolkit.NaveNodriza.IUPopulations.PIU_NaveNodrizaIT).FullName, null, "", lController); lController.ArgumentThis = lArgument; InboundArguments.Add(lArgument); #endregion Inbound arguments #region Outbound arguments // If the service has outbound arguments, the outbound arguments scenario is set here; otherwise, null. lController.OutboundArgumentsScenario = null; #endregion Outbound arguments return(lController); }
/// <summary> /// Creates the specific IUServiceController of the 'create_instance' IU pattern. /// </summary> /// <param name="exchangeInfo">IUServiceController reference.</param> /// <returns>Specific IUServiceController of the 'create_instance' IU pattern.</returns> public static IUServiceController Service_create_instanceInbound(ExchangeInfo exchangeInfo, IUController parentController) { string[] lAgentsService = { Agents.Administrador }; IUServiceContext lContext = new IUServiceContext(exchangeInfo, "NaveNodriza", "create_instance", "Crear_NaveNodriza"); IUServiceController lController = new IUServiceController("create_instance", "New", "Clas_1347649273856884Ser_1_Alias", lAgentsService, "NaveNodriza", "create_instance", lContext, null); // This controller is an InboundArgument controller. lController.IsOutboundArgumentController = false; #region Inbound arguments IArguments InboundArguments = lController.InputFields; // Argument p_atrid_NaveNodriza. InboundArguments.Add(new ArgumentDVController("p_atrid_NaveNodriza", "id_NaveNodriza", "Clas_1347649273856884Ser_1UIServ_1ElemAgrup_1_Alias", ModelType.Autonumeric, 0, false, null, lController)); // Argument p_atrNombre_NaveNodriza. InboundArguments.Add(new ArgumentDVController("p_atrNombre_NaveNodriza", "Nombre_NaveNodriza", "Clas_1347649273856884Ser_1UIServ_1ElemAgrup_2_Alias", ModelType.String, 100, false, null, lController)); #endregion Inbound arguments #region Outbound arguments // If the service has outbound arguments, the outbound arguments scenario is set here; otherwise, null. lController.OutboundArgumentsScenario = null; #endregion Outbound arguments return(lController); }
/// <summary> /// Initializes the 'Crear_AeronaveIT' instance form. /// </summary> /// <param name="exchangeInfo">Exchange information</param> /// <returns>IUServiceController</returns> public IUServiceController Initialize(ExchangeInfo exchangeInfo) { Controller = ControllerFactory.Aeronave.Service_create_instanceInbound(exchangeInfo, null); // Scenario. Controller.Scenario = new ScenarioPresentation(this, ScenarioType.Service); ArgumentDVController lArgumentDataValued = null; ArgumentOVController lArgumentObjectValued = null; // p_atrid_Aeronave lArgumentDataValued = Controller.InputFields["p_atrid_Aeronave"] as ArgumentDVController; lArgumentDataValued.Label = new LabelPresentation(this.lp_atrid_Aeronave); lArgumentDataValued.Editor = new AutonumericPresentation(this.maskedTextBoxp_atrid_Aeronave, this.lp_atrid_AeronaveAuto, this.checkBoxp_atrid_AeronaveAuto); // p_atrNombre lArgumentDataValued = Controller.InputFields["p_atrNombre"] as ArgumentDVController; lArgumentDataValued.Label = new LabelPresentation(this.lp_atrNombre); lArgumentDataValued.Editor = new TextBoxPresentation(this.textBoxp_atrNombre, this.bp_atrNombreEnlarge); // p_atrMaximoPasajeros lArgumentDataValued = Controller.InputFields["p_atrMaximoPasajeros"] as ArgumentDVController; lArgumentDataValued.Label = new LabelPresentation(this.lp_atrMaximoPasajeros); lArgumentDataValued.Editor = new MaskedTextBoxPresentation(this.maskedTextBoxp_atrMaximoPasajeros); // p_atrOrigen lArgumentDataValued = Controller.InputFields["p_atrOrigen"] as ArgumentDVController; lArgumentDataValued.Label = new LabelPresentation(this.lp_atrOrigen); lArgumentDataValued.Editor = new TextBoxPresentation(this.textBoxp_atrOrigen, this.bp_atrOrigenEnlarge); // p_atrDestino lArgumentDataValued = Controller.InputFields["p_atrDestino"] as ArgumentDVController; lArgumentDataValued.Label = new LabelPresentation(this.lp_atrDestino); lArgumentDataValued.Editor = new TextBoxPresentation(this.textBoxp_atrDestino, this.bp_atrDestinoEnlarge); // p_agrPasajeroAeronave lArgumentObjectValued = Controller.InputFields["p_agrPasajeroAeronave"] as ArgumentOVController; lArgumentObjectValued.Label = new LabelPresentation(this.lp_agrPasajeroAeronave); lArgumentObjectValued.Editors[0] = new MaskedTextBoxPresentation(this.maskedTextBoxp_agrPasajeroAeronaveid_PasajeroAeronave1); lArgumentObjectValued.Trigger = new ButtonPresentation(this.bp_agrPasajeroAeronave); if (lArgumentObjectValued.SupplementaryInfo != null) { lArgumentObjectValued.SupplementaryInfo.Viewer = new LabelDisplaySetPresentation(this.lp_agrPasajeroAeronaveSupInfo); } // Ok. Controller.OkTrigger = new ButtonPresentation(this.bOk); // Cancel. Controller.CancelTrigger = new ButtonPresentation(this.bCancel); Controller.Initialize(); return(Controller); }
/// <summary> /// Occurs when trigger presentation (magnifying glass) of the object-valued Argument is triggered. /// </summary> /// <param name="sender">Sender object.</param> /// <param name="e">TriggerEventArgs.</param> protected void HandleTriggerExecute(object sender, TriggerEventArgs e) { // Actualize the context. IUContext lContext = null; if (Parent != null) { Parent.UpdateContext(); lContext = Parent.Context; } // Initialize class and service name. string lClassName = string.Empty; string lContainerName = string.Empty; if (IsServiceField) { IUServiceController lServiceController = Parent as IUServiceController; if (lServiceController != null) { lClassName = lServiceController.ClassName; lContainerName = lServiceController.Name; } } else if (IsFilterField) { IUFilterController lFilterController = Parent as IUFilterController; if (lFilterController != null) { IUPopulationContext lPopContext = lFilterController.Parent.Context as IUPopulationContext; lClassName = lPopContext.ClassName; lContainerName = lFilterController.Context.FilterName; lContext = lPopContext; } } // Create exchange information. ExchangeInfoSelectionForward lInfo = new ExchangeInfoSelectionForward( Domain, mSelectionScenario, lClassName, lContainerName, Name, MultiSelectionAllowed, IsNavigationalFilter, lContext); // Launch scenario. ScenarioManager.LaunchSelectionScenario(lInfo, this); }
/// <summary> /// Initializes the Argument. /// </summary> public override void Initialize() { IUServiceController lServiceController = Parent as IUServiceController; // It is an Outbound Argument. if ((lServiceController != null) && (lServiceController.IsOutboundArgumentController)) { } else { Mandatory = !NullAllowed; } base.Initialize(); }
/// <summary> /// Event handler for ValueChanged event in the object-valued Argument. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void HandleOIDValueChanged(object sender, ValueChangedEventArgs e) { // If flag is set, do nothing. if (IgnoreEditorsValueChangeEvent) { return; } // If the parent controller is an OutboundArgument controller, do nothing. IUServiceController lParentController = this.Parent as IUServiceController; if ((lParentController != null) && (lParentController.IsOutboundArgumentController)) { return; } // Check if the value have changed. List <Oid> lLastValue = LastValueListOids; List <Oid> lValue = BuildOidsFromEditorsValue(false); bool lEquals = UtilFunctions.OidListEquals(lLastValue, lValue); // If there is no change, do nothing. if (lEquals) { return; } // Verify instance and show supplementary information if (lValue != null) { CheckInstance(lValue); } else { ShowSupplementaryInfo(null); } // Assign the current value as last value LastValueListOids = lValue; // Finally, if the last and current values are different, raise the event. OnValueChanged(new ValueChangedEventArgs(this, lLastValue, lValue, DependencyRulesAgentLogic.User)); }
/// <summary> /// Initializes the 'SIU_create_instanceIT' instance form. /// </summary> /// <param name="exchangeInfo">Exchange information</param> /// <returns>IUServiceController</returns> public IUServiceController Initialize(ExchangeInfo exchangeInfo) { Controller = ControllerFactory.Revision.Service_create_instanceInbound(exchangeInfo, null); // Scenario. Controller.Scenario = new ScenarioPresentation(this, ScenarioType.Service); ArgumentDVController lArgumentDataValued = null; // p_atrid_RevisarAeronave lArgumentDataValued = Controller.InputFields["p_atrid_RevisarAeronave"] as ArgumentDVController; lArgumentDataValued.Label = new LabelPresentation(this.lp_atrid_RevisarAeronave); lArgumentDataValued.Editor = new AutonumericPresentation(this.maskedTextBoxp_atrid_RevisarAeronave, this.lp_atrid_RevisarAeronaveAuto, this.checkBoxp_atrid_RevisarAeronaveAuto); // p_atrFechaRevision lArgumentDataValued = Controller.InputFields["p_atrFechaRevision"] as ArgumentDVController; lArgumentDataValued.Label = new LabelPresentation(this.lp_atrFechaRevision); lArgumentDataValued.Editor = new DateTimePickerPresentation(this.maskedTextBoxp_atrFechaRevision, this.dtpp_atrFechaRevision); // p_atrNombreRevisor lArgumentDataValued = Controller.InputFields["p_atrNombreRevisor"] as ArgumentDVController; lArgumentDataValued.Label = new LabelPresentation(this.lp_atrNombreRevisor); lArgumentDataValued.Editor = new TextBoxPresentation(this.textBoxp_atrNombreRevisor); // p_atrId_Aeronave lArgumentDataValued = Controller.InputFields["p_atrId_Aeronave"] as ArgumentDVController; lArgumentDataValued.Label = new LabelPresentation(this.lp_atrId_Aeronave); lArgumentDataValued.Editor = new TextBoxPresentation(this.textBoxp_atrId_Aeronave); // Ok. Controller.OkTrigger = new ButtonPresentation(this.bOk); // Cancel. Controller.CancelTrigger = new ButtonPresentation(this.bCancel); Controller.Initialize(); return(Controller); }
/// <summary> /// Launchs an action in an scenario. /// </summary> /// <param name="actionInfo">Action information.</param> /// <param name="actionItem">Item involved in the action.</param> public static void LaunchActionScenario(ExchangeInfoAction actionInfo, IActionItemSuscriber actionItem) { // Print Scenario if (actionInfo.IUName == typeof(PrintForm).FullName) { LaunchPrintScenario(actionInfo.SelectedOids); return; } // Instance Scenario, initialize and return the controller instance inside the Scenario. Form lScenario = CreateScenarioInstance(actionInfo); IUController lController = Initialize(lScenario, actionInfo); if (lController != null) { if (actionItem != null) { actionItem.SuscribeActionEvents(lController as IActionItemEvents); } } if (lScenario != null) { IUServiceController lIUServiceController = lController as IUServiceController; if (lIUServiceController != null && !lIUServiceController.ShowScenario) { lIUServiceController.Execute(); } else { lScenario.MdiParent = MainForm; LaunchShowState = ShowState.Showing; lScenario.Show(); LaunchShowState = ShowState.Showed; } } }