}//END addPageCommands method // ============================================================================== /// <summary> /// This method creates the introductory email grop /// </summary> /// <param name="PageObject">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void create_Display_Group ( Evado.UniForm.Model.Group PageGroup, String Title, String Body ) { this.LogMethod ( "create_Display_Group" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Field pageField = new Evado.UniForm.Model.Field ( ); Title = Title.Replace ( "\r\n\r\n", "\r\n \r\n" ); Title = Title.Replace ( EvcStatics.TEXT_SUBSITUTION_FIRST_NAME, "First" ); Title = Title.Replace ( EvcStatics.TEXT_SUBSITUTION_FAMILY_NAME, "Family" ); Title = Title.Replace ( EvcStatics.TEXT_SUBSITUTION_ADAPTER_TITLE, "Customer name" ); Body = Body.Replace ( "\r\n\r\n", "\r\n \r\n" ); Body = Body.Replace ( EvcStatics.TEXT_SUBSITUTION_FIRST_NAME, "First" ); Body = Body.Replace ( EvcStatics.TEXT_SUBSITUTION_FAMILY_NAME, "Family" ); Body = Body.Replace ( EvcStatics.TEXT_SUBSITUTION_EMAIL_ADDRESS, "*****@*****.**" ); Body = Body.Replace ( EvcStatics.TEXT_SUBSITUTION_USER_ID, "userId" ); Body = Body.Replace ( EvcStatics.TEXT_SUBSITUTION_PASSWORD, "password" ); Body = Body.Replace ( EvcStatics.TEXT_SUBSITUTION_ORG_ID, "org ID" ); Body = Body.Replace ( EvcStatics.TEXT_SUBSITUTION_ORG_NAME, "Org Name" ); Body = Body.Replace ( EvcStatics.TEXT_SUBSITUTION_ADAPTER_TITLE, "Customer name" ); Body = Body.Replace ( EvcStatics.TEXT_SUBSITUTION_PASSWORD_RESET_URL, "https://www1evado.com/reset" ); Body = Body.Replace ( EvcStatics.TEXT_SUBSITUTION_DATE_STAMP, DateTime.Now.ToLongDateString ( ) + " at " + DateTime.Now.ToShortTimeString ( ) ); // // Create the home page title // pageField = PageGroup.createReadOnlyTextField ( String.Empty, EdLabels.UserAdmin_Email_Title_Field_Label, Title ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Create the home page title // pageField = PageGroup.createReadOnlyTextField ( String.Empty, EdLabels.UserAdmin_Email_Body_Field_Label, Body ); pageField.Layout = EuAdapter.DefaultFieldLayout; }//END create_Display_Group method
}//END getObject method // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="ClientDataObject">Evado.UniForm.Model.AppData object.</param> /// <returns>ClientApplicationData object</returns> // ------------------------------------------------------------------------------ private void getDataObject ( Evado.UniForm.Model.AppData ClientDataObject ) { this.LogMethod ( "getDataObject" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Command pageCommand = new Evado.UniForm.Model.Command ( ); Evado.UniForm.Model.Field pageField = new Evado.UniForm.Model.Field ( ); ClientDataObject.Id = this._ApplicationEvent.Guid; ClientDataObject.Title = EdLabels.ApplicationEvent_Page_Title; ClientDataObject.Page.Id = ClientDataObject.Id; ClientDataObject.Page.Title = ClientDataObject.Title; ClientDataObject.Page.EditAccess = Evado.UniForm.Model.EditAccess.Enabled; // // Add the help button if the help url is defined. // if ( this.AdapterObjects.HelpUrl != String.Empty ) { Evado.UniForm.Model.Command helpCommand = ClientDataObject.Page.addCommand ( EdLabels.Label_Help_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Events.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Get_Object ); helpCommand.Type = Evado.UniForm.Model.CommandTypes.Http_Link; helpCommand.AddParameter ( Evado.UniForm.Model.CommandParameters.Link_Url, EvcStatics.createHelpUrl ( this.AdapterObjects.HelpUrl, Evado.Digital.Model.EdStaticPageIds.Application_Event ) ); } // // create the page pageMenuGroup // Evado.UniForm.Model.Group pageGroup = ClientDataObject.Page.AddGroup ( String.Empty, String.Empty, Evado.UniForm.Model.EditAccess.Inherited ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.EditAccess = Evado.UniForm.Model.EditAccess.Enabled; // // Create the customer id object // pageField = pageGroup.createReadOnlyTextField ( String.Empty, EdLabels.ApplicationEvent_Date_Time_Field_Label, this._ApplicationEvent.DateTime.ToString ( "dd MMM yyyy HH:mm:ss" ) ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Create the event id object // { if ( this._ApplicationEvent.EventId == 0 || this._ApplicationEvent.EventId == 1 ) { this._ApplicationEvent.EventId = (int) EvEventCodes.Ok; } EvEventCodes code = (EvEventCodes) this._ApplicationEvent.EventId; String content = this._ApplicationEvent.EventId.ToString ( "000000" ) + " > " + Evado.Model.EvStatics.enumValueToString ( code ); pageField = pageGroup.createReadOnlyTextField ( String.Empty, EdLabels.ApplicationEvent_Event_Id_Field_Label, content ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Create the type id object // pageField = pageGroup.createReadOnlyTextField ( String.Empty, EdLabels.ApplicationEvent_Type_Field_Label, Evado.Model.EvStatics.enumValueToString ( this._ApplicationEvent.Type ) ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Create the Category id object // pageField = pageGroup.createReadOnlyTextField ( String.Empty, EdLabels.ApplicationEvent_Category_Field_Label, this._ApplicationEvent.Category ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Create the description object // pageField = pageGroup.createFreeTextField ( String.Empty, EdLabels.ApplicationEvent_Description_Field_Label, this._ApplicationEvent.Description, 80, 40 ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Create the user object // pageField = pageGroup.createReadOnlyTextField ( String.Empty, EdLabels.ApplicationEvent_UserName_Field_Label, this._ApplicationEvent.UserId ); pageField.Layout = EuAdapter.DefaultFieldLayout; }//END Method
}//END getEntity_Summary_ListGroup method // ============================================================================== /// <summary> /// This method appends the milestone groupCommand to the page milestone list pageMenuGroup /// </summary> /// <param name="Entity">EvForm object</param> /// <param name="PageGroup"> Evado.UniForm.Model.Group</param> // ----------------------------------------------------------------------------- private void getGroupSummaryListGroup ( EdRecord Entity, Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "getGroupSummaryListGroup" ); this.LogDebug ( "Entity.EntityId: " + Entity.EntityId ); this.LogDebug ( "LinkContentSetting: " + Entity.Design.LinkContentSetting ); this.LogDebug ( "DefaultPageLayout: " + Entity.Design.DefaultPageLayout ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( ); Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( ); Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( ); // // Create the record display pageMenuGroup. // pageGroup = PageObject.AddGroup ( String.Empty ); pageGroup.CmdLayout = Evado.UniForm.Model.GroupCommandListLayouts.Horizontal_Orientation; pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Dynamic; pageGroup.AddParameter ( Evado.UniForm.Model.GroupParameterList.Percent_Width, 25 ); foreach ( EdRecordField field in Entity.Fields ) { this.LogDebug ( "fid {0} - {1} V: {2}. ", field.FieldId, field.TypeId, field.ItemValue ); if ( field.Design.IsSummaryField == false && field.TypeId != EvDataTypes.Image && field.TypeId != EvDataTypes.Text && field.TypeId != EvDataTypes.Numeric && field.TypeId != EvDataTypes.Telephone_Number && field.TypeId != EvDataTypes.Selection_List && field.TypeId != EvDataTypes.Radio_Button_List && field.TypeId != EvDataTypes.Check_Box_List && field.TypeId != EvDataTypes.External_Selection_List && field.TypeId != EvDataTypes.External_RadioButton_List && field.TypeId != EvDataTypes.External_CheckBox_List ) { continue; } // // skip all empty items. // if ( field.ItemValue == String.Empty || field.ItemValue.Contains ( "E+37" ) == true || field.ItemValue.Contains ( "E-35" ) == true ) { continue; } this.LogDebug ( "FieldId {0}, value {1} ", field.FieldId, field.ItemValue ); // // Define the layout. // Evado.UniForm.Model.FieldLayoutCodes layout = Evado.UniForm.Model.FieldLayoutCodes.Left_Justified; switch ( field.TypeId ) { case EvDataTypes.Image: { groupField = pageGroup.createImageField ( String.Empty, field.Title, field.ItemValue, 125, 0 ); groupField.EditAccess = Evado.UniForm.Model.EditAccess.Disabled; groupField.Layout = layout; continue; } case EvDataTypes.Selection_List: case EvDataTypes.Check_Box_List: case EvDataTypes.Radio_Button_List: case EvDataTypes.Horizontal_Radio_Buttons: case EvDataTypes.External_Selection_List: case EvDataTypes.External_RadioButton_List: case EvDataTypes.External_CheckBox_List: { var value = this.getSelectionDescription ( field, field.ItemValue ); groupField = pageGroup.createReadOnlyTextField ( String.Empty, field.Title, value ); groupField.EditAccess = Evado.UniForm.Model.EditAccess.Disabled; groupField.Layout = layout; continue; } default: { groupField = pageGroup.createReadOnlyTextField ( String.Empty, field.Title, field.ItemValue ); groupField.EditAccess = Evado.UniForm.Model.EditAccess.Disabled; groupField.Layout = layout; continue; } }//END type switch statement. }//END field iteration loop // // Define the pageMenuGroup groupCommand. // groupCommand = pageGroup.addCommand ( Entity.Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Entities, Evado.UniForm.Model.ApplicationMethods.Get_Object ); groupCommand.Id = Entity.Guid; groupCommand.SetGuid ( Entity.Guid ); // // Define the link groupCommand. // EdRecordField commandField = Entity.getFirstHttpLinkField ( ); if ( commandField != null ) { this.LogDebug ( "FieldId {0}, value {1} ", commandField.FieldId, commandField.ItemValue ); if ( commandField.ItemValue != String.Empty ) { string title = commandField.Title; string url = commandField.ItemValue; if ( url.Contains ( "^" ) == true ) { string [ ] arValue = commandField.ItemValue.Split ( '^' ); url = arValue [ 0 ]; title = arValue [ 1 ]; } groupCommand = pageGroup.addCommand ( title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Entities, Evado.UniForm.Model.ApplicationMethods.Get_Object ); groupCommand.Type = Evado.UniForm.Model.CommandTypes.Http_Link; groupCommand.AddParameter ( Evado.UniForm.Model.CommandParameters.Link_Url, url ); } } this.LogMethodEnd ( "getGroupSummaryListGroup" ); }//END getGroupListCommand method