}//END create_PasswordChangeEmail_Group Method // ============================================================================== /// <summary> /// This method add the group commands to the passed group. /// </summary> /// <param name="PageObject">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void addGroupCommands ( Evado.UniForm.Model.Group PageGroup ) { // // Initialise the methods variables and objects. // Evado.UniForm.Model.Command pageCommand = new Evado.UniForm.Model.Command ( ); if ( this._displayPage == true ) { // // Add the display groupCommand // pageCommand = PageGroup.addCommand ( EdLabels.UserAdmin_Edit_Page_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Email_Templates.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Custom_Method ); pageCommand.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.Get_Object ); pageCommand.AddParameter ( EuStaticContentTemplates.CONST_DISPLAY_PAGE, "false" ); pageCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Email_Templates_Page ); return; } else { // // Add the display groupCommand // pageCommand = PageGroup.addCommand ( EdLabels.UserAdmin_Display_Page_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Email_Templates.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Custom_Method ); pageCommand.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.Get_Object ); pageCommand.AddParameter ( EuStaticContentTemplates.CONST_DISPLAY_PAGE, "true" ); pageCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Email_Templates_Page ); } // // Add the save groupCommand // if ( this._displayPage == false ) { pageCommand = PageGroup.addCommand ( EdLabels.UserAdmin_Save_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Email_Templates.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Save_Object ); } }
}//END getOrganisationSelection method // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="PageObject">Evado.UniForm.Model.Page object.</param> /// <returns>ClientApplicationData object</returns> // ------------------------------------------------------------------------------ public void getListGroup ( Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "getListGroup" ); // // Create the new pageMenuGroup. // Evado.UniForm.Model.Group pageGroup = PageObject.AddGroup ( EdLabels.Organisation_List_Group_Title ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.CmdLayout = Evado.UniForm.Model.GroupCommandListLayouts.Vertical_Orientation; // // Add the save groupCommand // Evado.UniForm.Model.Command groupCommand = pageGroup.addCommand ( EdLabels.Organisation_New_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Organisations.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Create_Object ); // // Define the save and delete groupCommand parameters // groupCommand.AddParameter ( EuOrganisations.CONST_NEW_FIELD_ID, "true" ); groupCommand.SetBackgroundColour ( Evado.UniForm.Model.CommandParameters.BG_Default, Evado.UniForm.Model.Background_Colours.Purple ); // // generate the page links. // foreach ( EdOrganisation organisation in this.Session.AdminOrganisationList ) { // // Add the trial organisation to the list of organisations as a groupCommand. // Evado.UniForm.Model.Command command = pageGroup.addCommand ( organisation.LinkText, EuAdapter.ADAPTER_ID, EuAdapterClasses.Organisations.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Get_Object ); command.Id = organisation.Guid; command.SetGuid ( organisation.Guid ); }//END organisation list iteration loop this.LogValue ( "pageGroup.CommandList.Count {0}. ", pageGroup.CommandList.Count ); this.LogMethodEnd ( "getListGroup" ); }//END getListGroup method.
}//END getDataObject_DetailsGroup Method //================================================================================ /// <summary> /// This method add the group commands to the grop. /// </summary> /// <param name="PageGroup">Evado.UniForm.Model.Group object.</param> // ------------------------------------------------------------------------------ private void getDataObject_GroupCommands ( Evado.UniForm.Model.Group PageGroup ) { this.LogMethod ( "getDataObject_GroupCommands" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Command pageCommand = new Evado.UniForm.Model.Command ( ); // // Add the save groupCommand // if ( PageGroup.EditAccess == Evado.UniForm.Model.EditAccess.Enabled ) { pageCommand = PageGroup.addCommand ( EdLabels.Organisation_Save_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Organisations.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Save_Object ); // // Define the save and delete groupCommand parameters // pageCommand.SetGuid ( this.Session.AdminOrganisation.Guid ); pageCommand.AddParameter ( Evado.Digital.Model.EvcStatics.CONST_SAVE_ACTION, EdOrganisation.ActionCodes.Save.ToString ( ) ); this.LogDebug ( "Org GUid {0}.", this.Session.AdminOrganisation.Guid ); this.LogDebug ( "OrgType {0}.", this.Session.AdminOrganisation.OrgType ); // // Delete command // if ( this.Session.AdminOrganisation.Guid != EvStatics.CONST_NEW_OBJECT_ID && this.Session.AdminOrganisation.OrgType != EdAdapterSettings.EVADO_ORGANISATION ) { pageCommand = PageGroup.addCommand ( EdLabels.Organisation_Delete_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Organisations.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Save_Object ); // // Define the save and delete groupCommand parameters // pageCommand.SetGuid ( this.Session.AdminOrganisation.Guid ); pageCommand.AddParameter ( Evado.Digital.Model.EvcStatics.CONST_SAVE_ACTION, EdOrganisation.ActionCodes.Delete_Object.ToString ( ) ); } } this.LogMethodEnd ( "getDataObject_GroupCommands" ); }//END getDataObject_GroupCommands Method
}//END getProperties_GeneralPageGroup Method // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="Page">Evado.UniForm.Model.AppData object.</param> // ------------------------------------------------------------------------------ private void getPropertiesPage_SectionsGroup ( Evado.UniForm.Model.Page Page ) { this.LogMethod ( "getProperties_SectionsPageGroup" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( ); Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( ); Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( ); Evado.UniForm.Model.Parameter parameter = new Evado.UniForm.Model.Parameter ( ); String stFieldList = String.Empty; // // Define the section properties pageMenuGroup.. // pageGroup = Page.AddGroup ( EdLabels.Form_Properties_Sections_Group_Title ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.CmdLayout = Evado.UniForm.Model.GroupCommandListLayouts.Vertical_Orientation; // // Add the new form section object. groupCommand = pageGroup.addCommand ( EdLabels.Form_Section_New_Section_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Entity_Layouts.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Get_Object ); groupCommand.AddParameter ( EdRecordSection.FormSectionClassFieldNames.Sectn_No.ToString ( ), "-1" ); groupCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Form_Properties_Section_Page ); groupCommand.SetBackgroundDefaultColour ( Evado.UniForm.Model.Background_Colours.Purple ); this.LogValue ( "No of form sections: " + this.Session.EntityLayout.Design.FormSections.Count ); // // Iterate through the sections. // foreach ( EdRecordSection formSection in this.Session.EntityLayout.Design.FormSections ) { groupCommand = pageGroup.addCommand ( formSection.LinkText, EuAdapter.ADAPTER_ID, EuAdapterClasses.Entity_Layouts.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Get_Object ); groupCommand.AddParameter ( EdRecordSection.FormSectionClassFieldNames.Sectn_No.ToString ( ), formSection.No ); groupCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Form_Properties_Section_Page ); } this.LogValue ( "After No of form sections: " + this.Session.EntityLayout.Design.FormSections.Count ); this.LogMethodEnd ( "getProperties_SectionsPageGroup" ); }//END getProperties_SectionsPageGroup Method
// ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="Page">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void getDataObject_UserGroupCommands ( Evado.UniForm.Model.Group PageGroup ) { this.LogMethod ( "getDataObject_UserGroupCommands" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( ); // // Add the save groupCommand // groupCommand = PageGroup.addCommand ( EdLabels.User_Profile_Save_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Users.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Save_Object ); groupCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.My_User_Profile_Update_Page ); // // Define the save and delete groupCommand parameters // groupCommand.SetGuid ( this.Session.UserProfile.Guid ); this.LogMethodEnd ( "getDataObject_UserGroupCommands" ); }//END getDataObject_GroupCommands method.
}//END getSelectionGroup method // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="PageObject">Evado.UniForm.Model.Page object.</param> /// <returns>ClientApplicationData object</returns> // ------------------------------------------------------------------------------ public void getListGroup ( Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "getListGroup" ); try { // // Create the new pageMenuGroup. // Evado.UniForm.Model.Group listGroup = PageObject.AddGroup ( EdLabels.ApplicationEvent_List_Group_Title, Evado.UniForm.Model.EditAccess.Inherited ); listGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; listGroup.CmdLayout = Evado.UniForm.Model.GroupCommandListLayouts.Vertical_Orientation; // // generate the page links. // foreach ( EvApplicationEvent applicationEvent in this.Session.ApplicationEventList ) { if ( applicationEvent.UserId != this.Session.EventUserName && this.Session.EventUserName != String.Empty) { continue; } // // Add the trial applicationEvent to the list of applicationEvents as a groupCommand. // Evado.UniForm.Model.Command command = listGroup.addCommand ( applicationEvent.LinkText, EuAdapter.ADAPTER_ID, EuAdapterClasses.Events.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Get_Object ); command.SetGuid ( applicationEvent.Guid ); }//END trial applicationEvent list iteration loop this.LogValue ( "command count: " + listGroup.CommandList.Count ); } catch ( Exception Ex ) { // // Create the error message to be displayed to the user. // this.ErrorMessage = EdLabels.ApplicationEvent_List_Error_Message; // // Generate the log the error event. // this.LogException ( Ex ); } }//END getListObject method.
}//END createViewCommandList method // ============================================================================== /// <summary> /// This method appends the milestone groupCommand to the page milestone list pageMenuGroup /// </summary> /// <param name="CommandEntity">EvForm object</param> /// <param name="PageGroup"> Evado.UniForm.Model.Group</param> // ----------------------------------------------------------------------------- private Evado.UniForm.Model.Command getGroupListCommand ( EdRecord CommandEntity, Evado.UniForm.Model.Group PageGroup, EdRecord.LinkContentSetting ParentLinkSetting ) { this.LogMethod ( "getGroupListCommand" ); this.LogDebug ( "CommandEntity.EntityId: " + CommandEntity.EntityId ); this.LogDebug ( "LinkContentSetting: " + CommandEntity.Design.LinkContentSetting ); this.LogDebug ( "TypeId: " + CommandEntity.TypeId ); this.LogDebug ( "ParentLinkSetting: " + ParentLinkSetting ); // // Set the link setting. // if ( CommandEntity.Design.LinkContentSetting == EdRecord.LinkContentSetting.Null && ParentLinkSetting != EdRecord.LinkContentSetting.Null ) { CommandEntity.Design.LinkContentSetting = ParentLinkSetting; } this.LogDebug ( "FINAL: LinkContentSetting: " + CommandEntity.Design.LinkContentSetting ); this.LogDebug ( "CommandTitle: " + CommandEntity.CommandTitle ); this.LogDebug ( "getFirstTextField: " + CommandEntity.getFirstTextField ( ) ); // // Define the pageMenuGroup groupCommand. // Evado.UniForm.Model.Command groupCommand = PageGroup.addCommand ( CommandEntity.CommandTitle, EuAdapter.ADAPTER_ID, EuAdapterClasses.Entities, Evado.UniForm.Model.ApplicationMethods.Get_Object ); groupCommand.Id = CommandEntity.Guid; groupCommand.SetGuid ( CommandEntity.Guid ); groupCommand.AddParameter ( Evado.UniForm.Model.CommandParameters.Short_Title, EdLabels.Label_Record_Id + CommandEntity.RecordId ); if ( CommandEntity.ImageFileName != String.Empty ) { string relativeURL = EuAdapter.CONST_IMAGE_FILE_DIRECTORY + CommandEntity.ImageFileName; groupCommand.AddParameter ( Evado.UniForm.Model.CommandParameters.Image_Url, relativeURL ); } if ( this.Session.UserProfile.hasAdministrationAccess == true ) { groupCommand.Title = CommandEntity.EntityId + " >> " + groupCommand.Title; } return groupCommand; }//END getGroupListCommand method
}//END getOrganisationList method. // ================================================================================== /// <summary> /// This methods returns a pageMenuGroup object contains a selection of organisations. /// </summary> /// <param name="PageObject">Application</param> /// <returns>Evado.UniForm.Model.Group object</returns> // --------------------------------------------------------------------------------- public void getOrganisationSelection ( Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "getOrganisationSelection" ); // // initialise the methods variables and objects. // List<Evado.Model.EvOption> optionList = new List<Evado.Model.EvOption> ( ); Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( ); Evado.UniForm.Model.Group pageGroup = PageObject.AddGroup ( EdLabels.Organisation_List_Selection_Group, Evado.UniForm.Model.EditAccess.Enabled ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; // // get the list of organisations. // optionList = this.AdapterObjects.Settings.GetOrgTypeList ( true ); // // Set the selection to the current site org id. // groupField = pageGroup.createSelectionListField ( EdOrganisation.FieldNames.Org_Type, EdLabels.Config_OrgType_List_Field_Label, this.Session.SelectedOrganisationType.ToString ( ), optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 ); // // Create a custom groupCommand to process the selection. // Evado.UniForm.Model.Command customCommand = pageGroup.addCommand ( EdLabels.Organisation_Selection_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Organisations.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Custom_Method ); // // Set the custom groupCommand parameter. // customCommand.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.List_of_Objects ); this.LogMethodEnd ( "getOrganisationSelection" ); }//END getOrganisationSelection method
}//END getDataObject_FieldGroup Method // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="Page">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void getDataObject_GroupCommands ( Evado.UniForm.Model.Group PageGroup ) { this.LogMethod ( "getDataObject_GroupCommands" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( ); // // Add the save groupCommand // groupCommand = PageGroup.addCommand ( EdLabels.Demo_Registration_Save_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.User_Registration.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Custom_Method ); groupCommand.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.Get_Object ); groupCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Demo_User_Exit_Page ); this.LogMethodEnd ( "getDataObject_GroupCommands" ); }//END getDataObject_GroupCommands method.
// ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="PageObject">Evado.UniForm.Model.Page object.</param> /// <returns>ClientApplicationData object</returns> // ------------------------------------------------------------------------------ private void getSelectionListGroup ( Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "getSelectionListGroup" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Field pageField = new Evado.UniForm.Model.Field ( ); List<EvOption> optionList = new List<EvOption> ( ); EvOption option = new EvOption ( ); // // Define the selection group object. // Evado.UniForm.Model.Group pageGroup = PageObject.AddGroup ( EdLabels.Menu_Selection, Evado.UniForm.Model.EditAccess.Enabled ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; // // Add the platform selection list // optionList.Add ( new EvOption ( EuMenus.CONST_ADMIN_APPLICATION_IDENTIFIER, EdLabels.Menu_Admin_Platform_Option_Description ) ); optionList.Add ( new EvOption ( EuMenus.CONST_PRODUCTION_APPLICATION_IDENTIFIER, EdLabels.Menu_Production_Platform_Option_Description ) ); pageField = pageGroup.createSelectionListField ( EvMenuItem.MenuFieldNames.Platform.ToString ( ), EdLabels.Menu_Platform_Field_Label, this.Session.MenuPlatformId, optionList ); pageField.Layout = EuAdapter.DefaultFieldLayout; pageField.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 ); // // Create the pageMenuGroup selection list. // List<Evado.Model.EvOption> groupList = this.GetGroupList ( ); if ( groupList.Count > 1 ) { pageField = pageGroup.createSelectionListField ( EuSession.CONST_MENU_GROUP_ID, EdLabels.Menu_Group_ID, this.Session.MenuGroupIdentifier, groupList ); pageField.Layout = EuAdapter.DefaultFieldLayout; pageField.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 ); } // // Add the selection command // Evado.UniForm.Model.Command selectionCommand = pageGroup.addCommand ( EdLabels.Menu_Selection_Menu, EuAdapter.ADAPTER_ID, EuAdapterClasses.Menu.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Custom_Method ); // // Set the custom groupCommand parametet. // selectionCommand.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.List_of_Objects ); }
}//END getFormPropertiesObject method // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="ClientDataObject">Evado.UniForm.Model.AppData object.</param> // ------------------------------------------------------------------------------ private void getPropertiesSectionDataObject ( Evado.UniForm.Model.AppData ClientDataObject ) { this.LogMethod ( "getPropertiesSectionDataObject" ); this.LogDebug ( "FormSection.No: " + this.Session.FormSection.No ); this.LogDebug ( "FormSection.Title: " + this.Session.FormSection.Title ); this.LogDebug ( "FormSection.DisplayRoles: " + this.Session.FormSection.ReadAccessRoles ); this.LogDebug ( "FormSection.EditRoles: " + this.Session.FormSection.EditAccessRoles ); this.LogDebug ( "HasConfigrationEditAccess: " + this.Session.UserProfile.hasManagementAccess ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( ); Evado.UniForm.Model.Command pageCommand = new Evado.UniForm.Model.Command ( ); Evado.UniForm.Model.Field pageField = new Evado.UniForm.Model.Field ( ); Evado.UniForm.Model.Parameter parameter = new Evado.UniForm.Model.Parameter ( ); List<EvOption> optionList = new List<EvOption> ( ); optionList.Add ( new EvOption ( ) ); foreach ( EdRecordField field in this.Session.EntityLayout.Fields ) { optionList.Add ( new EvOption ( field.FieldId, field.FieldId + EdLabels.Space_Hypen + field.Title ) ); } // // Initialise the client ResultData object. // if ( this.Session.EntityLayout.Guid != Guid.Empty ) { ClientDataObject.Id = Guid.NewGuid ( ); ClientDataObject.Title = String.Format ( EdLabels.FormProperties_Section_Page_Title, this.Session.EntityLayout.LayoutId, this.Session.EntityLayout.Title, this.Session.FormSection.LinkText ); ClientDataObject.Page.Id = ClientDataObject.Id; ClientDataObject.Page.PageDataGuid = ClientDataObject.Id; ClientDataObject.Page.PageId = this.Session.EntityLayout.LayoutId; } else { ClientDataObject.Id = Guid.NewGuid ( ); ClientDataObject.Title = EdLabels.Form_Page_New_Form_Title; ClientDataObject.Page.Id = ClientDataObject.Id; ClientDataObject.Page.PageDataGuid = ClientDataObject.Id; } ClientDataObject.Page.EditAccess = Evado.UniForm.Model.EditAccess.Enabled; if ( this.Session.UserProfile.hasManagementAccess == true ) { ClientDataObject.Page.EditAccess = Evado.UniForm.Model.EditAccess.Enabled; } if ( this.Session.EntityLayout.State != EdRecordObjectStates.Form_Issued && this.Session.EntityLayout.State != EdRecordObjectStates.Withdrawn ) { ClientDataObject.Page.EditAccess = Evado.UniForm.Model.EditAccess.Disabled; } // // Set the user's edit access if they have configuration edit access. // if ( this.Session.UserProfile.hasManagementAccess == true ) { ClientDataObject.Page.EditAccess = Evado.UniForm.Model.EditAccess.Enabled; } pageGroup = ClientDataObject.Page.AddGroup ( EdLabels.FormProperties_Section_Group_Text, Evado.UniForm.Model.EditAccess.Inherited ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; // // Form No // pageField = pageGroup.createTextField ( EdRecordSection.FormSectionClassFieldNames.Sectn_No.ToString ( ), EdLabels.Form_Section_No_Field_Label, this.Session.FormSection.No.ToString ( ), 50 ); pageField.Layout = EuAdapter.DefaultFieldLayout; pageField.EditAccess = Evado.UniForm.Model.EditAccess.Enabled; // // Form title // pageField = pageGroup.createTextField ( EdRecordSection.FormSectionClassFieldNames.Sectn_Title.ToString ( ), EdLabels.Form_Section_Title_Field_Label, this.Session.FormSection.Title, 50 ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Form Instructions // pageField = pageGroup.createFreeTextField ( EdRecordSection.FormSectionClassFieldNames.Sectn_Instructions.ToString ( ), EdLabels.Form_Section_Instructions_Field_Label, EdLabels.Form_Section_Instructions_Field_Description, this.Session.FormSection.Instructions, 90, 5 ); pageField.Layout = EuAdapter.DefaultFieldLayout; optionList = new List<EvOption> ( ); this.LogDebug ( "FormSection.Order: " + this.Session.FormSection.Order ); foreach ( EdRecordSection section in this.Session.EntityLayout.Design.FormSections ) { if ( section.Order < this.Session.FormSection.Order ) { this.LogDebug ( "secttion.Order: " + section.Order + " BEFORE SECTION" ); var value = String.Format ( EdLabels.Form_Section_Order_Before_Text, section.Title ); optionList.Add ( new EvOption ( ( section.Order - 1 ).ToString ( ), value ) ); } if ( section.Order == this.Session.FormSection.Order ) { this.LogDebug ( "secttion.Order: " + section.Order + " CURRENT" ); optionList.Add ( new EvOption ( this.Session.FormSection.Order.ToString ( ), this.Session.FormSection.Title ) ); } if ( section.Order > this.Session.FormSection.Order ) { this.LogDebug ( "secttion.Order: " + section.Order + " AFTER SECTION" ); var value = String.Format ( EdLabels.Form_Section_Order_After_Text, section.Title ); optionList.Add ( new EvOption ( ( section.Order + 1 ).ToString ( ), value ) ); } } // // The form section order // pageField = pageGroup.createSelectionListField ( EdRecordSection.FormSectionClassFieldNames.Sectn_Order.ToString ( ), EdLabels.Form_Section_Order_Field_Label, this.Session.FormSection.Order.ToString ( ), optionList ); pageField.Layout = EuAdapter.DefaultFieldLayout; /* // // The form section field id // pageField = pageGroup.createSelectionListField ( EvFormSection.FormSectionClassFieldNames.Sectn_Field_Id.ToString ( ), EdLabels.Form_Section_Field_ID_Field_Label, this.SessionObjects.FormSection.FieldId, optionList ); pageField.Layout = EuPageGenerator.ApplicationFieldLayout; // // Form Field value // pageField = pageGroup.createTextField ( EvFormSection.FormSectionClassFieldNames.Sectn_Field_Value.ToString ( ), EdLabels.Form_Section_Field_Value_Field_Label, this.SessionObjects.FormSection.FieldValue, 50 ); pageField.Layout = EuPageGenerator.ApplicationFieldLayout; pageField.EditAccess = Evado.UniForm.Model.EditAccess.Inherited; // // form secton on open display section. // pageField = pageGroup.createBooleanField ( EvFormSection.FormSectionClassFieldNames.Sectn_On_Open_Visible.ToString ( ), EdLabels.Form_Section_Visible_On_Open_Field_Label, this.SessionObjects.FormSection.OnOpenVisible ); pageField.Layout = EuPageGenerator.ApplicationFieldLayout; // // Form on field value match display field field // pageField = pageGroup.createBooleanField ( EvFormSection.FormSectionClassFieldNames.Sectn_On_Match_Visible.ToString ( ), EdLabels.Form_Section_Visible_Field_Value_Matches_Field_Label, this.SessionObjects.FormSection.OnMatchVisible ); pageField.Layout = EuPageGenerator.ApplicationFieldLayout; */ // // get the list of display roles. // optionList = new List<EvOption> ( ); optionList = this.AdapterObjects.Settings.GetRoleOptionList ( false ); // // The form section user display roles // pageField = pageGroup.createCheckBoxListField ( EdRecordSection.FormSectionClassFieldNames.Sectn_Display_Roles.ToString ( ), EdLabels.Form_Section_User_Display_Roles_Field_Label, EdLabels.Form_Section_User_Display_Roles_Field_Description, this.Session.FormSection.ReadAccessRoles, optionList ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // get the list of edit roles. // pageField = pageGroup.createCheckBoxListField ( EdRecordSection.FormSectionClassFieldNames.Sectn_Edit_Roles.ToString ( ), EdLabels.Form_Section_User_Edit_Roles_Field_Label, EdLabels.Form_Section_User_Edit_Roles_Field_Description, this.Session.FormSection.EditAccessRoles, optionList ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Add the command to save the page content. // pageCommand = pageGroup.addCommand ( EdLabels.Form_Properties_Section_Save_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Entity_Layouts.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Custom_Method ); pageCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Form_Properties_Page ); pageCommand.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.Get_Object ); pageCommand.SetGuid ( this.Session.EntityLayout.Guid ); pageCommand.AddParameter ( EuRecordLayouts.CONST_UPDATE_SECTION_COMMAND_PARAMETER, "1" ); }//END getPropertiesDataObject Method
}//END method // ================================================================================== /// <summary> /// This methods returns a pageMenuGroup object contains a selection of applicationEvents. /// </summary> /// <param name="PageObject">Evado.UniForm.Model.Page object</param> /// <returns>Evado.UniForm.Model.Group object</returns> // --------------------------------------------------------------------------------- public void getSelectionGroup ( Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "getSelectionGroup" ); this.LogValue ( "EventStartDate: " + this.Session.EventStartDate ); this.LogValue ( "EventFinishDate: " + this.Session.EventFinishDate ); // // initialise the methods variables and objects. // Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( ); DateTime rangeStartDate = EvStatics.getDateTime ( "1 jan 2020" ); DateTime rangeFinishDate = DateTime.Now.AddDays ( 1 ); // // create the selection group. // Evado.UniForm.Model.Group selectionGroup = PageObject.AddGroup ( EdLabels.ApplicationEvent_Selection_Group_Title, Evado.UniForm.Model.EditAccess.Enabled ); selectionGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; // // Set the selection to the start date // groupField = selectionGroup.createDateField ( EuApplicationEvents.CONST_START_DATE_FIELD_ID, EdLabels.ApplicationEvent_Start_Date_Selection_Field_Label, this.Session.EventStartDate, rangeStartDate, rangeFinishDate ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 ); // // Set the selection to the start date // groupField = selectionGroup.createDateField ( EuApplicationEvents.CONST_FINISH_DATE_FIELD_ID, EdLabels.ApplicationEvent_Finish_Date_Selection_Field_Label, this.Session.EventFinishDate, rangeStartDate, rangeFinishDate ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 ); // // get the list of event codes. // if ( this.AdapterObjects.EventCodeSelectionList.Count == 0 ) { this.AdapterObjects.EventCodeSelectionList = Evado.Model.EvStatics.getOptionsFromEnum ( typeof ( EvEventCodes ), true ); Evado.Digital.Model.EvcStatics.sortOptionListValues ( this.AdapterObjects.EventCodeSelectionList ); } // // Set the selection to the event id // groupField = selectionGroup.createSelectionListField ( EuApplicationEvents.CONST_EVENT_FIELD_ID, EdLabels.ApplicationEvent_Event_Id_Selection_Field_Label, this.Session.EventId.ToString ( ), this.AdapterObjects.EventCodeSelectionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 ); // // get the list of event ids. // List<EvOption> optionList = Evado.Model.EvStatics.getOptionsFromEnum ( typeof ( EvApplicationEvent.EventType ), true ); // // Set the selection to the type id // groupField = selectionGroup.createSelectionListField ( EuApplicationEvents.CONST_TYPE_FIELD_ID, EdLabels.ApplicationEvent_Type_Selection_Field_Label, this.Session.EventType, optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 ); // // Set the selection to the USER Name // Evado.Digital.Model.EvcStatics.sortOptionListValues ( this.Session.EventUserSelectionList ); groupField = selectionGroup.createSelectionListField ( EuApplicationEvents.CONST_USER_FIELD_ID, EdLabels.ApplicationEvent_UserName_Selection_Field_Label, this.Session.EventUserName, this.Session.EventUserSelectionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 ); // // Create a custom groupCommand to process the selection. // Evado.UniForm.Model.Command customCommand = selectionGroup.addCommand ( EdLabels.ApplicationEvent_Selection_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Events.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Custom_Method ); // // Set the custom groupCommand parameter. // customCommand.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.List_of_Objects ); }//END getSelectionGroup method
// ============================================================================== /// <summary> /// This method creates the record view pageMenuGroup containing a list of commands to /// open the form record. /// </summary> /// <param name="PageObject">Evado.Model.Uniform.Page object to add the pageMenuGroup to.</param> /// <param name="subjects">EvSubjects subjects to add to selection groups</param> /// <param name="subjectVisits">EvSubjectMilestones visits for each subject</param> /// <param name="QueryParameters">EvQueryParameters: conting the query parameters</param> /// <param name="ApplicationObject">Adapter.ApplicationObjects object.</param> // ------------------------------------------------------------------------------ private void getFilteredList_SelectionGroup ( Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "getFilteredList_SelectionGroup" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Group pageGroup = null; Evado.UniForm.Model.Command selectionCommand = null; List<EvOption> optionList; Evado.UniForm.Model.Field groupField; // // if hide selection group is enabled exit // if ( this._HideSelectionGroup == true ) { return; } // // Create the new pageMenuGroup for record selection. // pageGroup = PageObject.AddGroup ( EdLabels.Entities_Selection_Group_Title, Evado.UniForm.Model.EditAccess.Enabled ); pageGroup.GroupType = Evado.UniForm.Model.GroupTypes.Default; pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.AddParameter ( Evado.UniForm.Model.GroupParameterList.Offline_Hide_Group, true ); // // if the entity is not selected display an entity selection field. // if ( this.Session.Selected_EntityLayoutId == String.Empty ) { // // Add the record state selection option // optionList = new List<EvOption> ( ); optionList.Add ( new EvOption ( ) ); foreach ( EdRecord layout in this.AdapterObjects.IssuedEntityLayouts ) { optionList.Add ( layout.SelectionOption ); } groupField = pageGroup.createSelectionListField ( EdRecord.FieldNames.Layout_Id, EdLabels.Label_Form_Id, this.Session.Selected_EntityLayoutId, optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 ); // // Add the selection groupCommand // selectionCommand = pageGroup.addCommand ( EdLabels.Entities_Selection_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Entities.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Custom_Method ); selectionCommand.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.List_of_Objects ); selectionCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Entity_Filter_View ); this.LogDebug ( "Group Command Count {0}. ", pageGroup.CommandList.Count ); this.LogMethodEnd ( "getFilteredList_SelectionGroup" ); return; }//END layoutId selection // // if the entity layout id has been defined display the entity selection fields. // // // retrieve the selected entity layout object // this.queryLayout = this.AdapterObjects.GetEntityLayout ( this.Session.Selected_EntityLayoutId ); this.LogDebug ( "E: {0} S: {1}.", queryLayout.LayoutId, queryLayout.State ); this.LogDebug ( "Entity {0}. ", queryLayout.CommandTitle ); this.LogDebug ( "StaticQueryFilterOptions {0}. ", this.AdapterObjects.Settings.StaticQueryFilterOptions ); // // Insert the static filter selection for organisation city. // if ( this.AdapterObjects.Settings.StaticQueryFilterOptions.Contains ( EdOrganisation.FieldNames.Address_Country.ToString ( ) ) == true ) { this.getQueryList_StaticOrgFilter ( pageGroup, EdOrganisation.FieldNames.Address_Country ); } if ( this.AdapterObjects.Settings.StaticQueryFilterOptions.Contains ( EdOrganisation.FieldNames.Address_City.ToString ( ) ) == true ) { this.getQueryList_StaticOrgFilter ( pageGroup, EdOrganisation.FieldNames.Address_City ); } if ( this.AdapterObjects.Settings.StaticQueryFilterOptions.Contains ( EdOrganisation.FieldNames.Address_Post_Code.ToString ( ) ) == true ) { this.getQueryList_StaticOrgFilter ( pageGroup, EdOrganisation.FieldNames.Address_Post_Code ); } // // iterate through the filter field ids and display the filter field in the selection group. // for ( int filterIndex = 0; filterIndex < queryLayout.FilterFieldIds.Length; filterIndex++ ) { string fieldId = queryLayout.FilterFieldIds [ filterIndex ]; if ( fieldId == String.Empty ) { continue; } this.LogDebug ( "fieldId {0}. ", fieldId ); // // retrieve the matching field object. // EdRecordField field = queryLayout.GetFieldObject ( fieldId ); if ( field == null ) { continue; } this.LogDebug ( "field.FieldId {0} - {1}. ", field.FieldId, field.Title ); // // retrieve the current selection filter value. // string selectionFilter = this.Session.EntitySelectionFilters [ filterIndex ]; this.LogDebug ( "selectionFilter {0}. ", selectionFilter ); // // create the selection field object for the selected field. // this.getFilteredList_SelectionField ( pageGroup, filterIndex, selectionFilter, field ); }//END of the Selection filter iteration loop. // // Add the selection groupCommand // selectionCommand = pageGroup.addCommand ( EdLabels.Entities_Selection_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Entities.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Custom_Method ); selectionCommand.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.List_of_Objects ); selectionCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Entity_Filter_View ); ; this.LogDebug ( "Group Command Count {0}. ", pageGroup.CommandList.Count ); this.LogMethodEnd ( "getFilteredList_SelectionGroup" ); }//ENd getFilteredList_SelectionGroup 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 getClientData ( 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 ( ); List<EvOption> optionList = new List<EvOption> ( ); EvOption option = new EvOption ( ); ClientDataObject.Id = this.Session.MenuItem.Guid; ClientDataObject.Title = EdLabels.Menu_Item; ClientDataObject.Page.Id = ClientDataObject.Id; ClientDataObject.Page.Title = ClientDataObject.Title; ClientDataObject.Page.EditAccess = Evado.UniForm.Model.EditAccess.Enabled; // // create the page pageMenuGroup // Evado.UniForm.Model.Group pageGroup = ClientDataObject.Page.AddGroup ( EdLabels.Menu_General_Group_Title, Evado.UniForm.Model.EditAccess.Inherited ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; // // Add the platform selection list // optionList.Add ( new EvOption ( EuMenus.CONST_ADMIN_APPLICATION_IDENTIFIER, EdLabels.Menu_Admin_Platform_Option_Description ) ); optionList.Add ( new EvOption ( EuMenus.CONST_PRODUCTION_APPLICATION_IDENTIFIER, EdLabels.Menu_Production_Platform_Option_Description ) ); pageField = pageGroup.createSelectionListField ( String.Empty, EdLabels.Menu_Platform_Field_Label, this.Session.MenuPlatformId, optionList ); pageField.EditAccess = Evado.UniForm.Model.EditAccess.Disabled; // // Create the customer id object // optionList = this.AdapterObjects.PageIdentifiers; Evado.Digital.Model.EvcStatics.sortOptionListValues ( optionList ); pageField = pageGroup.createSelectionListField ( EvMenuItem.MenuFieldNames.Page_Id.ToString ( ), EdLabels.Menu_Page_Id_Field_Label, this.Session.MenuItem.PageId.ToString ( ), optionList ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Create the customer name object // pageField = pageGroup.createTextField ( EvMenuItem.MenuFieldNames.Title.ToString ( ), EdLabels.Menu_Title_Field_Label, String.Empty, this.Session.MenuItem.Title, 20 ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Create the customer name object // pageField = pageGroup.createNumericField ( EvMenuItem.MenuFieldNames.Order.ToString ( ), EdLabels.Menu_Order_Field_Label, this.Session.MenuItem.Order, 0, 200 ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Create the customer name object // optionList = this.AdapterObjects.Settings.GetRoleOptionList ( false ); string roles = this.Session.MenuItem.RoleList; pageField = pageGroup.createCheckBoxListField ( EvMenuItem.MenuFieldNames.Role_List.ToString ( ), EdLabels.Menu_Role_List_Field_Label, roles, optionList ); pageField.Layout = EuAdapter.DefaultFieldLayout; pageField.Description = EdLabels.Menu_Role_List_Field_Description; // // Create the customer name object // pageField = pageGroup.createTextField ( EvMenuItem.MenuFieldNames.Parameters.ToString ( ), EdLabels.Menu_Parameters_Field_Label, String.Empty, this.Session.MenuItem.Parameters, 20 ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Add the save groupCommand // pageCommand = pageGroup.addCommand ( EdLabels.Menu_Save_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Menu.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Save_Object ); // // Define the save and delete groupCommand parameters // pageCommand.SetGuid ( ClientDataObject.Id ); // // Add the delete groupCommand object. // pageCommand = pageGroup.addCommand ( EdLabels.Menu_Delete_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Menu.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Save_Object ); // // Define the save and delete groupCommand parameters // pageCommand.SetGuid ( ClientDataObject.Id ); pageCommand.AddParameter ( Evado.Digital.Model.EvcStatics.CONST_SAVE_ACTION, EuMenus.CONST_DELETE_ACTION ); }//END Method
// ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="PageObject">Evado.UniForm.Model.Page object.</param> /// <param name="GroupId">string: group identifier.</param> /// <returns>ClientApplicationData object</returns> // ------------------------------------------------------------------------------ private void getList_Menu_List_Group ( Evado.UniForm.Model.Page PageObject, String GroupId ) { this.LogMethod ( "getListGroup" ); this.LogValue ( "GroupId: " + GroupId ); try { // // initialise the methods variables and objects. // List<EvMenuItem> menuList = new List<EvMenuItem> ( ); Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( ); // // Create the list pageMenuGroup object. // Evado.UniForm.Model.Group pageGroup = PageObject.AddGroup ( EdLabels.Menu_Item_List, Evado.UniForm.Model.EditAccess.Inherited ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.CmdLayout = Evado.UniForm.Model.GroupCommandListLayouts.Vertical_Orientation; pageGroup.Title = EdLabels.Menu_Item_List; // // Display a message if the pageMenuGroup has not been selected. // if ( GroupId == String.Empty ) { pageGroup.Description = EdLabels.Menu_List_Group_Not_Selected_Message; return; } // // Add the save groupCommand // groupCommand = pageGroup.addCommand ( EdLabels.Menu_New_Item_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Menu.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Create_Object ); groupCommand.SetBackgroundDefaultColour ( Evado.UniForm.Model.Background_Colours.Purple ); // // get the list of customers. // foreach ( EvMenuItem item in this.AdapterObjects.MenuList ) { if ( item.Group.ToLower ( ) == GroupId.ToLower ( ) ) { menuList.Add ( item ); } } // // generate the page links. // foreach ( EvMenuItem menuItem in menuList ) { this.LogValue ( "P: " + menuItem.PageId + ", T: " + menuItem.Title + ", R: " + menuItem.RoleList ); // // Add the Menu Field to the list of organisations as a groupCommand. // groupCommand = pageGroup.addCommand ( menuItem.LinkText, EuAdapter.ADAPTER_ID, EuAdapterClasses.Menu.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Get_Object ); groupCommand.SetGuid ( menuItem.Guid ); }//END Menu Field list iteration loop this.LogValue ( " command object count: " + pageGroup.CommandList.Count ); } catch ( Exception Ex ) { // // Create the error message to be displayed to the user. // this.ErrorMessage = "Error raised when generating a list of trial sites."; // // Generate the log the error event. // this.LogException ( Ex ); } }//END getListObject 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
}//END getListObject method. // ============================================================================== /// <summary> /// This method creates the record view pageMenuGroup containing a list of commands to /// open the form record. /// </summary> /// <param name="Page">Evado.Model.Uniform.Page object to add the pageMenuGroup to.</param> // ------------------------------------------------------------------------------ private void getRecordExport_SelectionGroup ( Evado.UniForm.Model.Page Page ) { this.LogMethod ( "getRecordExport_SelectionGroup" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( ); Evado.UniForm.Model.Command command = new Evado.UniForm.Model.Command ( ); Evado.UniForm.Model.Field selectionField = new Evado.UniForm.Model.Field ( ); List<EvOption> optionList = new List<EvOption> ( ); // // If the issued form list is empty fill it with the currently issued form selection objects. // if ( this.Session.IssueFormList.Count == 0 ) { this.LogDebug ( "Issued Forms is empty so create list." ); EdRecordLayouts forms = new EdRecordLayouts ( this.ClassParameters ); this.Session.IssueFormList = forms.getList ( EdRecordTypes.Null, EdRecordObjectStates.Form_Issued, false ); } this.LogDebug ( "Issued Forms list count {0}.", this.Session.IssueFormList.Count ); // // Create the new pageMenuGroup for query selection. // pageGroup = Page.AddGroup ( EdLabels.Record_Selection_Group_Title, Evado.UniForm.Model.EditAccess.Enabled ); pageGroup.GroupType = Evado.UniForm.Model.GroupTypes.Default; pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.AddParameter ( Evado.UniForm.Model.GroupParameterList.Offline_Hide_Group, true ); // // Add the selection pageMenuGroup. // selectionField = pageGroup.createSelectionListField ( EdRecord.FieldNames.Layout_Id, EdLabels.Label_Form_Id, this.Session.Selected_EntityLayoutId, this.Session.IssueFormList ); selectionField.Layout = EuAdapter.DefaultFieldLayout; // // Define the include draft record selection option. // selectionField = pageGroup.createBooleanField ( EuEntities.CONST_INCLUDE_DRAFT_RECORDS, EdLabels.Record_Export_Include_Draft_Record_Field_Title, this.Session.FormRecords_IncludeDraftRecords ); selectionField.Layout = EuAdapter.DefaultFieldLayout; // // Define the include free text ResultData selection option. // selectionField = pageGroup.createBooleanField ( EuEntities.CONST_INCLUDE_FREE_TEXT_DATA, EdLabels.Record_Export_Include_FreeText_data_Field_Title, this.Session.FormRecords_IncludeFreeTextData ); selectionField.Layout = EuAdapter.DefaultFieldLayout; // // Add the selection groupCommand // command = pageGroup.addCommand ( EdLabels.Record_Export_Selection_Group_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Entities.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Custom_Method ); command.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.List_of_Objects ); }//END getRecordExport_ListObject method
}//END executeRecordQuery method. // ============================================================================== /// <summary> /// This method creates the record view pageMenuGroup containing a list of commands to /// open the form record. /// </summary> /// <param name="PageObject">Evado.Model.Uniform.Page object to add the pageMenuGroup to.</param> /// <param name="RecordList">List of EvForm: form record objects.</param> // ------------------------------------------------------------------------------ private void getEntity_ListGroup ( Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "getEntity_ListGroup" ); this.LogDebug ( "PageObject.EditAccess {0}.", PageObject.EditAccess ); this.LogDebug ( "this.Session.EntityLayout.Title {0}.", this.Session.EntityLayout.Title ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( ); Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( ); // // Create the record display pageMenuGroup. // pageGroup = PageObject.AddGroup ( EdLabels.Entity_List_Group_Title ); pageGroup.CmdLayout = Evado.UniForm.Model.GroupCommandListLayouts.Vertical_Orientation; pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; if ( this.Session.EntityLayout.Title != String.Empty ) { pageGroup.Title = String.Format ( EdLabels.Entity_List_Title_Group_Title, this.Session.EntityLayout.Title ); } if ( this.Session.EntityList.Count > 0 ) { pageGroup.Title += EdLabels.List_Count_Label + this.Session.EntityList.Count; } // // Add a create record command. // if ( this.Session.Selected_EntityLayoutId != String.Empty && this.Session.PageId != Evado.Digital.Model.EdStaticPageIds.Entity_Filter_View.ToString ( ) && pageGroup.EditAccess == Evado.UniForm.Model.EditAccess.Enabled && ( this.Session.EntityLayout.Design.ParentEntities.Contains ( this.ParentLayoutId ) == true || this.Session.EntityLayout.Design.ParentEntities == String.Empty ) ) { groupCommand = pageGroup.addCommand ( String.Format ( EdLabels.Entity_Create_New_List_Command_Title, this.Session.EntityLayout.Title ), EuAdapter.ADAPTER_ID, EuAdapterClasses.Entities, Evado.UniForm.Model.ApplicationMethods.Create_Object ); groupCommand.SetBackgroundDefaultColour ( Evado.UniForm.Model.Background_Colours.Purple ); groupCommand.AddParameter ( Evado.Digital.Model.EdRecord.FieldNames.Layout_Id, this.Session.Selected_EntityLayoutId ); groupCommand.AddParameter ( EdRecord.FieldNames.ParentGuid, this.Session.Entity.Guid ); groupCommand.SetGuid ( this.Session.Entity.Guid ); } this.LogDebug ( "EntityList.Count: " + this.Session.EntityList.Count ); // // Iterate through the record list generating a groupCommand to access each record // then append the groupCommand to the record pageMenuGroup view's groupCommand list. // foreach ( Evado.Digital.Model.EdRecord entity in this.Session.EntityList ) { this.LogDebug ( "LCD {0}, LT {1}, FC {2}", entity.Design.LinkContentSetting, entity.CommandTitle, entity.Fields.Count ); // // Create the group list groupCommand object. // this.getGroupListCommand ( entity, pageGroup, this.Session.EntityLayout.Design.LinkContentSetting ); }//END iteration loop this.LogValue ( "Group command count: " + pageGroup.CommandList.Count ); this.LogMethodEnd ( "getRecord_ListGroup" ); }//END createViewCommandList method
}//END getListObject method. // ============================================================================== /// <summary> /// This method creates the record view pageMenuGroup containing a list of commands to /// open the form record. /// </summary> /// <param name="PageObject">Evado.Model.Uniform.Page object to add the pageMenuGroup to.</param> // ------------------------------------------------------------------------------ private void getList_SelectionGroup ( Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "getList_SelectionGroup" ); this.LogDebug ( "IssuedEntityLayouts.Count {0}. ", this.AdapterObjects.IssuedEntityLayouts.Count ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( ); List<EvOption> optionList; Evado.UniForm.Model.Field selectionField; if ( this._HideSelectionGroup == true ) { this.LogMethodEnd ( "getList_SelectionGroup" ); return; } // // Create the new pageMenuGroup for record selection. // pageGroup = PageObject.AddGroup ( EdLabels.Entities_Selection_Group_Title, Evado.UniForm.Model.EditAccess.Enabled ); pageGroup.GroupType = Evado.UniForm.Model.GroupTypes.Default; pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.AddParameter ( Evado.UniForm.Model.GroupParameterList.Offline_Hide_Group, true ); // // Add the record state selection option // optionList = new List<EvOption> ( ); optionList.Add ( new EvOption ( ) ); foreach ( EdRecord layout in this.AdapterObjects.IssuedEntityLayouts ) { optionList.Add ( new EvOption ( layout.LayoutId, String.Format ( "{0} - {1}", layout.LayoutId, layout.Title ) ) ); } selectionField = pageGroup.createSelectionListField ( EdRecord.FieldNames.Layout_Id, EdLabels.Label_Form_Id, this.Session.Selected_EntityLayoutId, optionList ); selectionField.Layout = EuAdapter.DefaultFieldLayout; selectionField.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 ); // // Add the record state selection option // optionList = EdRecord.getRecordStates ( false ); selectionField = pageGroup.createSelectionListField ( EdRecord.FieldNames.Status.ToString ( ), EdLabels.Record_State_Selection, this.Session.EntityStateSelection, optionList ); selectionField.Layout = EuAdapter.DefaultFieldLayout; selectionField.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 ); // // Add the selection groupCommand // Evado.UniForm.Model.Command selectionCommand = pageGroup.addCommand ( EdLabels.Select_Records_Command_Title, EuAdapter.ADAPTER_ID, EuAdapterClasses.Entities.ToString ( ), Evado.UniForm.Model.ApplicationMethods.Custom_Method ); selectionCommand.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.List_of_Objects ); }//ENd getList_SelectionGroup method