}//END getDataObject_GroupCommands method. // ============================================================================== /// <summary> /// This method outputs a debug group in the registration page. /// </summary> /// <param name="Page"> Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void getDataObject_Debug_Group ( Evado.UniForm.Model.Page PageObject ) { if ( this.LoggingLevel < 6 ) { return; } var pageGroup = PageObject.AddGroup ( "", Evado.UniForm.Model.EditAccess.Disabled ); System.Text.StringBuilder description = new StringBuilder ( ); description.AppendLine ( "Demonstration User details: " ); description.AppendFormat ( "UserId: {0} \r\n", this.Session.AdminUserProfile.UserId ); description.AppendFormat ( "GivenName: {0} \r\n", this.Session.AdminUserProfile.GivenName ); description.AppendFormat ( "FamilyName: {0} \r\n", this.Session.AdminUserProfile.FamilyName ); description.AppendFormat ( "RoleId: {0} \r\n", this.Session.AdminUserProfile.Roles ); // // Create the name object // this.LogValue ( "Given Name:" + this.Session.AdminUserProfile.GivenName ); this.LogValue ( "Family Name:" + this.Session.AdminUserProfile.FamilyName ); this.LogDebug ( "Group Description:\r\n " + description.ToString ( ) ); pageGroup.Description = description.ToString ( ); }
}//END getclientDataObject Method // ============================================================================== /// <summary> /// This method adds the user generation group. /// </summary> /// <param name="Page">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void getDataObject_MUP_GeneralGroup ( Evado.UniForm.Model.Page Page ) { this.LogMethod ( "getDataObject_MUP_GeneralGroup" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( ); Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( ); Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( ); List<EvOption> optionList = new List<EvOption> ( ); // // create the page pageMenuGroup // pageGroup = Page.AddGroup ( EdLabels.UserProfile_General_Field_Group_Title ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.EditAccess = Evado.UniForm.Model.EditAccess.Disabled; // // Create the user id object // groupField = pageGroup.createTextField ( String.Empty, EdLabels.User_Profile_Identifier_Field_Label, this.Session.UserProfile.UserId, 80 ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.EditAccess = Evado.UniForm.Model.EditAccess.Enabled; this.LogMethodEnd ( "getDataObject_MUP_GeneralGroup" ); }//END getDataObject_MUP_GeneralGroup Method
}//END create_ResetPasswordEmail_Group Method // ============================================================================== /// <summary> /// This method creates the password change group objectt. /// </summary> /// <param name="PageObject">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void create_PasswordChangeEmail_Group ( Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "create_PasswordChangeEmail_Group" ); // // 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 ( ); // // create the page pageMenuGroup // Evado.UniForm.Model.Group pageGroup = PageObject.AddGroup ( EdLabels.UserAdmin_Password_Confirmation_Group_Title, Evado.UniForm.Model.EditAccess.Inherited ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; // // Add the group comands // this.addGroupCommands ( pageGroup ); if ( this._displayPage == true ) { this.create_Display_Group ( pageGroup, this.AdapterObjects.ContentTemplates.PasswordConfirmationEmail_Title, this.AdapterObjects.ContentTemplates.PasswordConfirmationEmail_Body ); return; } // // Create the home page title // pageField = pageGroup.createTextField ( EvStaticContentTemplates.ClassFieldNames.Password_Confirmation_Email_Title, EdLabels.UserAdmin_Email_Title_Field_Label, this.AdapterObjects.ContentTemplates.PasswordConfirmationEmail_Title, 80 ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Create the home page title // pageField = pageGroup.createFreeTextField ( EvStaticContentTemplates.ClassFieldNames.Password_Confirmation_Email_Body, EdLabels.UserAdmin_Email_Body_Field_Label, this.AdapterObjects.ContentTemplates.PasswordConfirmationEmail_Body, 80, 20 ); pageField.Layout = EuAdapter.DefaultFieldLayout; pageField.Description = EdLabels.UserAdmin_PasswordChange_Body_Description_Field_Label ; }//END create_PasswordChangeEmail_Group 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 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 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
}//END create_PasswordChangeEmail_Group Method // ============================================================================== /// <summary> /// This method creates the password change group objectt. /// </summary> /// <param name="PageObject">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void create_DemonRegistration_Group ( Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "create_DemonRegistration_Group" ); // // 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 ( ); // // create the page pageMenuGroup // Evado.UniForm.Model.Group pageGroup = PageObject.AddGroup ( EdLabels.UserAdmin_Demo_Registration_Group_Title, Evado.UniForm.Model.EditAccess.Inherited ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; // // Add the group comands // this.addGroupCommands ( pageGroup ); // // Create instructions field // pageField = pageGroup.createFreeTextField ( EvStaticContentTemplates.ClassFieldNames.DemoRegistrationInstuctions, EdLabels.UserAdmin_Demo_Registration_Instructions_Field_Label, this.AdapterObjects.ContentTemplates.DemoRegistrationInstuctions, 80, 20 ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Create instructions field // pageField = pageGroup.createFreeTextField ( EvStaticContentTemplates.ClassFieldNames.DemoRegistrationConfirmation, EdLabels.UserAdmin_Demo_Registration_Confirmation_Field_Label, this.AdapterObjects.ContentTemplates.DemoRegistrationConfirmation, 80, 20 ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Create instructions field // pageField = pageGroup.createFreeTextField ( EvStaticContentTemplates.ClassFieldNames.DemoRegistrationError, EdLabels.UserAdmin_Demo_Registration_Error_Field_Label, this.AdapterObjects.ContentTemplates.DemoRegistrationError, 80, 20 ); pageField.Layout = EuAdapter.DefaultFieldLayout; }//END create_PasswordChangeEmail_Group 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 getclientDataObject_Commands Method // ============================================================================== /// <summary> /// This method creates the demonstration user registration instructions. /// </summary> /// <param name="Page">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void getDataObject_InstructionsGroup ( Evado.UniForm.Model.Page Page ) { this.LogMethod ( "getDataObject_InstructionsGroup" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( ); // // create the page pageMenuGroup // pageGroup = Page.AddGroup ( String.Empty, Evado.UniForm.Model.EditAccess.Disabled ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; // // Define the markdown options. // MarkdownSharp.MarkdownOptions markDownOptions = new MarkdownSharp.MarkdownOptions ( ); markDownOptions.AutoHyperlink = true; markDownOptions.AutoNewlines = true; markDownOptions.EmptyElementSuffix = "/>"; markDownOptions.EncodeProblemUrlCharacters = true; markDownOptions.LinkEmails = true; markDownOptions.StrictBoldItalic = true; // // Initialise the markdown class // MarkdownSharp.Markdown markDown = new MarkdownSharp.Markdown ( markDownOptions ); // // perform the html body transformation. // string description = markDown.Transform ( this.AdapterObjects.ContentTemplates.DemoRegistrationInstuctions ); pageGroup.Description = description; // // Add a streamed video if exists. // this.getStreamedVideoField ( pageGroup ); this.LogMethodEnd ( "getDataObject_InstructionsGroup" ); }
}//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
// ============================================================================== /// <summary> /// This method add the user personaliseation group /// </summary> /// <param name="Page">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void getDataObject_MUP_OrganisationGroup ( Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "getDataObject_MUP_OrganisationGroup" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( ); Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( ); Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( ); List<EvOption> optionList = new List<EvOption> ( ); if ( this.AdapterObjects.Settings.EnableUserOrganisationUpdate == false ) { this.LogDebug ( "Update update of organisations is disabled." ); this.LogMethodEnd ( "getDataObject_MUP_OrganisationGroup" ); return; } // // create the page pageMenuGroup // pageGroup = PageObject.AddGroup ( String.Empty ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.EditAccess = Evado.UniForm.Model.EditAccess.Enabled; // // Add the groups commands. // this.getDataObject_UserGroupCommands ( pageGroup ); // // Create the customer name object // groupField = pageGroup.createTextField ( EuUserProfiles.CONST_ORG_PREFIX + EdOrganisation.FieldNames.Name.ToString ( ), EdLabels.Organisation_Name_Field_Label, this.Session.Organisation.Name, 50 ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.Mandatory = true; groupField.setBackgroundColor ( Evado.UniForm.Model.FieldParameterList.BG_Mandatory, Evado.UniForm.Model.Background_Colours.Red ); // // Create the customer name object // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Image_File_Name ) == false ) { groupField = pageGroup.createImageField ( EuUserProfiles.CONST_ORG_PREFIX + EdOrganisation.FieldNames.Image_File_Name.ToString ( ), EdLabels.Organisation_ImageFileame_Field_Label, this.Session.Organisation.ImageFileName, 300, 200 ); groupField.Layout = EuAdapter.DefaultFieldLayout; try { String stTargetPath = this.UniForm_BinaryFilePath + this.Session.Organisation.ImageFileName; String stImagePath = this.UniForm_ImageFilePath + this.Session.Organisation.ImageFileName; this.LogDebug ( "Target path {0}.", stTargetPath ); this.LogDebug ( "Image path {0}.", stImagePath ); // // copy the file into the image directory. // System.IO.File.Copy ( stImagePath, stTargetPath, true ); } catch { } } else { this.Session.Organisation.ImageFileName = String.Empty; } // // Create the street address 1 // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Address_1 ) == false ) { groupField = pageGroup.createTextField ( EuUserProfiles.CONST_ORG_PREFIX + EdOrganisation.FieldNames.Address_1, EdLabels.Organisation_Address_Street_Field_Label, this.Session.Organisation.AddressStreet_1, 50 ); groupField.Layout = EuAdapter.DefaultFieldLayout; // // Create the street address 2 // groupField = pageGroup.createTextField ( EuUserProfiles.CONST_ORG_PREFIX + EdOrganisation.FieldNames.Address_2, EdLabels.Organisation_Address_Street_Field_Label, this.Session.Organisation.AddressStreet_2, 50 ); groupField.Layout = EuAdapter.DefaultFieldLayout; } // // Create the street address city // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Address_City ) == false ) { groupField = pageGroup.createTextField ( EuUserProfiles.CONST_ORG_PREFIX + EdOrganisation.FieldNames.Address_City, EdLabels.Organisation_Address_City_Field_Label, this.Session.Organisation.AddressCity, 50 ); groupField.Layout = EuAdapter.DefaultFieldLayout; } // // Create the street address state // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Address_State ) == false ) { groupField = pageGroup.createTextField ( EuUserProfiles.CONST_ORG_PREFIX + EdOrganisation.FieldNames.Address_State, EdLabels.Organisation_Address_State_Field_Label, this.Session.Organisation.AddressState, 10 ); groupField.Layout = EuAdapter.DefaultFieldLayout; } // // Create the street address 1 // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Address_Post_Code ) == false ) { groupField = pageGroup.createTextField ( EuUserProfiles.CONST_ORG_PREFIX + EdOrganisation.FieldNames.Address_Post_Code, EdLabels.Organisation_Address_City_Field_Label, this.Session.Organisation.AddressPostCode, 50 ); groupField.Layout = EuAdapter.DefaultFieldLayout; } // // Create the street address 1 // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Address_Country ) == false ) { groupField = pageGroup.createTextField ( EuUserProfiles.CONST_ORG_PREFIX + EdOrganisation.FieldNames.Address_Country, EdLabels.Organisation_Address_Country_Field_Label, this.Session.Organisation.AddressCountry, 50 ); groupField.Layout = EuAdapter.DefaultFieldLayout; } // // Create the organisation telephone number object // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Telephone ) == false ) { groupField = pageGroup.createTelephoneNumberField ( EuUserProfiles.CONST_ORG_PREFIX + EdOrganisation.FieldNames.Telephone.ToString ( ), EdLabels.Organisation_Telephone_Field_Label, this.Session.Organisation.Telephone ); groupField.Layout = EuAdapter.DefaultFieldLayout; } // // Create the organisation fax number object // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Email_Address ) == false ) { groupField = pageGroup.createEmailAddressField ( EuUserProfiles.CONST_ORG_PREFIX + EdOrganisation.FieldNames.Email_Address.ToString ( ), EdLabels.Organisation_Email_Field_Label, this.Session.Organisation.EmailAddress ); groupField.Layout = EuAdapter.DefaultFieldLayout; } this.LogMethodEnd ( "getDataObject_MUP_OrganisationGroup" ); }
}//END getStreamedVideoField method. // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="Page">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void getDataObject_FieldGroup ( Evado.UniForm.Model.Page Page ) { this.LogMethod ( "getDataObject_FieldGroup" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( ); Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( ); Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( ); // // create the page pageMenuGroup // pageGroup = Page.AddGroup ( String.Empty, Evado.UniForm.Model.EditAccess.Inherited ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.EditAccess = Evado.UniForm.Model.EditAccess.Enabled; pageGroup.SetCommandBackBroundColor ( Evado.UniForm.Model.GroupParameterList.BG_Mandatory, Evado.UniForm.Model.Background_Colours.Red ); // // Add the groups commands. // this.getDataObject_GroupCommands ( pageGroup ); // // Create the user id object // groupField = pageGroup.createTextField ( Evado.Digital.Model.EdUserProfile.FieldNames.UserId.ToString ( ), EdLabels.User_Profile_Identifier_Field_Label, this.Session.AdminUserProfile.UserId, 80 ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.EditAccess = Evado.UniForm.Model.EditAccess.Disabled; // // Create the comon name object // groupField = pageGroup.createTextField ( Evado.Digital.Model.EdUserProfile.FieldNames.CommonName, EdLabels.Dem_Registration_CommonName_Field_Label, this.Session.AdminUserProfile.CommonName, 80 ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.Mandatory = true; // // Create the user's email address object // groupField = pageGroup.createTelephoneNumberField ( Evado.Digital.Model.EdUserProfile.FieldNames.Telephone.ToString ( ), EdLabels.UserProfile_Telephone_Field_Label, this.Session.AdminUserProfile.Telephone ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.Mandatory = true; // // Create the user's email address object // groupField = pageGroup.createEmailAddressField ( Evado.Digital.Model.EdUserProfile.FieldNames.Email_Address.ToString ( ), EdLabels.UserProfile_Email_Field_Label, this.Session.AdminUserProfile.EmailAddress ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.Mandatory = true; groupField.setBackgroundColor ( Evado.UniForm.Model.FieldParameterList.BG_Mandatory, Evado.UniForm.Model.Background_Colours.Red ); }//END getDataObject_FieldGroup 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 add the user personaliseation group /// </summary> /// <param name="PageObject">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void getDataObject_MUP_PersonaliseGroup ( Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "getDataObject_MUP_PersonaliseGroup" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( ); Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( ); Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( ); List<EvOption> optionList = new List<EvOption> ( ); // // create the page pageMenuGroup // pageGroup = new Evado.UniForm.Model.Group ( EdLabels.UserProfile_Dashboard_Field_Group_Title, Evado.UniForm.Model.EditAccess.Inherited ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.EditAccess = Evado.UniForm.Model.EditAccess.Enabled; // // Add the groups commands. // this.getDataObject_UserGroupCommands ( pageGroup ); /* if ( this.Session.UserProfile.hasManagementAccess == true ) { // // create the project dashboard option list. // optionList = Evado.Digital.Model.EdApplication.getDashBoardList ( false ); // // Add the user's project dashboard component selection // groupField = pageGroup.createCheckBoxListField ( EvUserProfile.UserProfileFieldNames.Project_Dashboard_Components, EdLabels.UserProfile_Project_Dashboard_Option_Title, this.Session.UserProfile.ProjectDashboardComponents, optionList ); groupField.Layout = EuFormGenerator.ApplicationFieldLayout; } // // These can see site dashboard. // if ( ( this.ApplicationObjects.ApplicationSettings.DisplaySiteDashboard == true ) && ( this.Session.UserProfile.hasEndUserRole( this.Session.Record.Design.ReadAccessRoles ) == true ) ) { // // create the site dashboard option list. // optionList = Evado.Digital.Model.EdApplication.getDashBoardList ( true ); // // Add the user's site dashboard component selection // groupField = pageGroup.createCheckBoxListField ( EvUserProfile.UserProfileFieldNames.Site_Dashboard_Components, EdLabels.UserProfile_Site_Dashboard_Option_Title, this.Session.UserProfile.SiteDashboardComponents, optionList ); groupField.Layout = EuFormGenerator.ApplicationFieldLayout; } */ if ( pageGroup.FieldList.Count > 0 ) { PageObject.AddGroup ( pageGroup ); } this.LogMethodEnd ( "getDataObject_MUP_PersonaliseGroup" ); }
}//END getProperties_GeneralPageGroup Method // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="Page">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void getPropertiesPage_SettingGroup ( Evado.UniForm.Model.Page Page ) { this.LogMethod ( "getPropertiesPage_SettingGroup" ); // // 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 groupField = new Evado.UniForm.Model.Field ( ); Evado.UniForm.Model.Parameter parameter = new Evado.UniForm.Model.Parameter ( ); List<EvOption> optionList = new List<EvOption> ( ); // // Define the general properties pageMenuGroup.. // pageGroup = Page.AddGroup ( EdLabels.Form_Properties_Settings_Group_Title ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.SetCommandBackBroundColor ( Evado.UniForm.Model.GroupParameterList.BG_Mandatory, Evado.UniForm.Model.Background_Colours.Red ); this.GetDataObject_GroupCommands ( pageGroup ); // // Layout field readonly display format settings // optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.FieldReadonlyDisplayFormats ), false ); groupField = pageGroup.createSelectionListField ( EdRecord.FieldNames.FieldReadonlyDisplayFormat.ToString ( ), EdLabels.EntityLayout_FieldDisplayFormat_Field_Title, this.Session.EntityLayout.Design.FieldReadonlyDisplayFormat, optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; // // Form Update reason // optionList = this.AdapterObjects.Settings.GetRoleOptionList ( false ); groupField = pageGroup.createCheckBoxListField ( EdRecord.FieldNames.ReadAccessRoles.ToString ( ), EdLabels.Record_Layout_AccessRole_Field_Label, this.Session.EntityLayout.Design.EditAccessRoles, optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.EditAccess = this._DesignAccess; groupField = pageGroup.createCheckBoxListField ( EdRecord.FieldNames.EditAccessRoles.ToString ( ), EdLabels.Record_Layout_EditRole_Field_Label, this.Session.EntityLayout.Design.ReadAccessRoles, optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.EditAccess = this._DesignAccess; // // Layout author only draft record access // optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.AuthorAccessList ), false ); this.LogDebug ( "Author Access option list length: ", optionList ); this.LogDebug ( "RecordLayout.Design.AuthorAccess: ", this.Session.EntityLayout.Design.AuthorAccess ); groupField = pageGroup.createSelectionListField ( EdRecord.FieldNames.AuthorAccess.ToString ( ), EdLabels.Record_Layout_Author_Access_Setting_Field_Title, this.Session.EntityLayout.Design.AuthorAccess, optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.EditAccess = this._DesignAccess; // // Enable display if chiled entities. // groupField = pageGroup.createBooleanField ( EdRecord.FieldNames.DisplayRelatedEntities.ToString ( ), EdLabels.EntityLayout_Display_Related_Entities_Field_Title, this.Session.EntityLayout.Design.DisplayRelatedEntities ); groupField.Layout = EuAdapter.DefaultFieldLayout; // // Layout author only edit record access // optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.ParentTypeList ), true ); groupField = pageGroup.createSelectionListField ( EdRecord.FieldNames.ParentType.ToString ( ), EdLabels.Record_Layout_Parent_Object_Type_Field_Title, this.Session.EntityLayout.Design.ParentType, optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.EditAccess = this._DesignAccess; // // Select the hierachical entities this entity can be referenced to. // if ( this.Session.EntityLayout.Design.ParentType == EdRecord.ParentTypeList.Entity ) { optionList = this.AdapterObjects.GetIssuedEntityOptions ( false ); groupField = pageGroup.createCheckBoxListField ( EdRecord.FieldNames.ParentEntities.ToString ( ), EdLabels.Record_Layout_Parent_Entity_Selection_Field_Title, this.Session.EntityLayout.Design.ParentEntities, optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; } // // Default field layout // optionList = EvStatics.getOptionsFromEnum ( typeof ( Evado.UniForm.Model.FieldLayoutCodes ), false ); if ( this.Session.EntityLayout.Design.DefaultPageLayout == null ) { this.Session.EntityLayout.Design.DefaultPageLayout = EuAdapter.DefaultFieldLayout.ToString ( ); } groupField = pageGroup.createSelectionListField ( EdRecord.FieldNames.DefaultPageLayout.ToString ( ), EdLabels.Form_Llink_Default_Layout_Field_Title, this.Session.EntityLayout.Design.DefaultPageLayout, optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; // // Record LLnk content setting // optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.LinkContentSetting ), false ); if ( this.Session.EntityLayout.Design.LinkContentSetting == EdRecord.LinkContentSetting.Null ) { this.Session.EntityLayout.Design.LinkContentSetting = EdRecord.LinkContentSetting.Default; } groupField = pageGroup.createSelectionListField ( EdRecord.FieldNames.LinkContentSetting, EdLabels.Record_Link_Content_Setting_Field_Title, this.Session.EntityLayout.Design.LinkContentSetting, optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; // // Record header layout settings // optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.HeaderFormat ), false ); if ( this.Session.EntityLayout.Design.HeaderFormat == EdRecord.HeaderFormat.Null ) { this.Session.EntityLayout.Design.HeaderFormat = EdRecord.HeaderFormat.Default; } groupField = pageGroup.createSelectionListField ( EdRecord.FieldNames.HeaderFormat, EdLabels.RecordLayout_Header_Format_Field_Title, this.Session.EntityLayout.Design.HeaderFormat, optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; // // Record footer layout settings // optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.FooterFormat ), false ); if ( this.Session.EntityLayout.Design.FooterFormat == EdRecord.FooterFormat.Null ) { this.Session.EntityLayout.Design.FooterFormat = EdRecord.FooterFormat.Default; } groupField = pageGroup.createSelectionListField ( EdRecord.FieldNames.FooterFormat, EdLabels.RecordLayout_Footer_Format_Field_Title, this.Session.EntityLayout.Design.FooterFormat, optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; // // Form CS Script // groupField = pageGroup.createBooleanField ( EdRecord.FieldNames.HasCsScript.ToString ( ), EdLabels.Form_Cs_Script_Field_Title, this.Session.EntityLayout.Design.hasCsScript ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.EditAccess = this._DesignAccess; this.LogMethodEnd ( "getPropertiesPage_SettingGroup" ); }//END getProperties_GeneralPageGroup Method
}//END getPropertiesDataObject Method // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="Page">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void getPropertiesPage_GeneralGroup ( Evado.UniForm.Model.Page Page ) { this.LogMethod ( "getProperties_GeneralPageGroup" ); // // 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 groupField = new Evado.UniForm.Model.Field ( ); Evado.UniForm.Model.Parameter parameter = new Evado.UniForm.Model.Parameter ( ); List<EvOption> optionList = new List<EvOption> ( ); // // Define the general properties pageMenuGroup.. // pageGroup = Page.AddGroup ( EdLabels.Form_Properties_General_Group_Title); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.SetCommandBackBroundColor ( Evado.UniForm.Model.GroupParameterList.BG_Mandatory, Evado.UniForm.Model.Background_Colours.Red ); // // Define the form save commands. // this.GetDataObject_GroupCommands ( pageGroup ); // // Define the page layout selection // this.GetDataObject_LayoutCommands ( pageGroup ); // // Set the entity type // if ( this.Session.EntityLayout.Design.TypeId == EdRecordTypes.Null ) { this.Session.EntityLayout.Design.TypeId = EdRecordTypes.Normal_Record; } // // Form title // groupField = pageGroup.createTextField ( EdRecord.FieldNames.Layout_Id.ToString ( ), EdLabels.Label_Form_Id, this.Session.EntityLayout.LayoutId, 10 ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.EditAccess = this._InitialAccess; // // Form title // groupField = pageGroup.createTextField ( EdRecord.FieldNames.RecordPrefix, EdLabels.Record_Layout_Record_Prefix_Field_Label, this.Session.EntityLayout.Design.RecordPrefix, 5 ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.EditAccess = this._InitialAccess; // // Form title // groupField = pageGroup.createTextField ( EdRecord.FieldNames.Object_Title.ToString ( ), EdLabels.Form_Title_Field_Label, this.Session.EntityLayout.Design.Title, 50 ); groupField.Layout = EuAdapter.DefaultFieldLayout; // // Form reference // groupField = pageGroup.createTextField ( EdRecord.FieldNames.Reference.ToString ( ), EdLabels.Form_Reference_Field_Label, this.Session.EntityLayout.Design.HttpReference, 50 ); groupField.Layout = EuAdapter.DefaultFieldLayout; // // Form Instructions // groupField = pageGroup.createFreeTextField ( EdRecord.FieldNames.Instructions.ToString ( ), EdLabels.Form_Instructions_Field_Title, this.Session.EntityLayout.Design.Instructions, 50, 4 ); groupField.Layout = EuAdapter.DefaultFieldLayout; // // Form category // groupField = pageGroup.createTextField ( EdRecord.FieldNames.FormCategory.ToString ( ), EdLabels.Form_Category_Field_Title, this.Session.EntityLayout.Design.RecordCategory, 50 ); groupField.Layout = EuAdapter.DefaultFieldLayout; // // Form Update reason // optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.UpdateReasonList ), false ); groupField = pageGroup.createSelectionListField ( EdRecord.FieldNames.UpdateReason.ToString ( ), EdLabels.Form_Update_Reason_Field_Title, this.Session.EntityLayout.Design.UpdateReason, optionList ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.EditAccess = this._DesignAccess; // // Form Change description // groupField = pageGroup.createFreeTextField ( EdRecord.FieldNames.Description.ToString ( ), EdLabels.Form_Description_Field_Title, this.Session.EntityLayout.Design.Description, 90, 5 ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.EditAccess = this._DesignAccess; }//END getProperties_GeneralPageGroup 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 ); }
// ============================================================================== /// <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 getDataObject_MUP_GeneralGroup Method // ============================================================================== /// <summary> /// This method add the user personal details update group. /// </summary> /// <param name="Page">Evado.UniForm.Model.Page object.</param> // ------------------------------------------------------------------------------ private void getDataObject_MUP_DetailsGroup ( Evado.UniForm.Model.Page Page ) { this.LogMethod ( "getDataObject_MUP_DetailsGroup" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( ); Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( ); Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( ); // // create the page pageMenuGroup // pageGroup = Page.AddGroup ( EdLabels.UserProfile_General_Details_Group_Title, Evado.UniForm.Model.EditAccess.Inherited ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.EditAccess = Evado.UniForm.Model.EditAccess.Enabled; pageGroup.SetCommandBackBroundColor ( Evado.UniForm.Model.GroupParameterList.BG_Mandatory, Evado.UniForm.Model.Background_Colours.Red ); // // Add the groups commands. // this.getDataObject_UserGroupCommands ( pageGroup ); this.LogDebug ( "ImageFileName {0}.", this.Session.UserProfile.ImageFileName ); // // Create the customer name object // if ( this.AdapterObjects.Settings.hasHiddenUserProfileField ( EdUserProfile.FieldNames.Image_File_Name ) == false ) { this.Session.UserProfile.CurrentImageFileName = this.Session.UserProfile.ImageFileName; groupField = pageGroup.createImageField ( Evado.Digital.Model.EdUserProfile.FieldNames.Image_File_Name, EdLabels.UserProfile_ImageFileame_Field_Label, this.Session.UserProfile.ImageFileName, 300, 300 ); groupField.Layout = EuAdapter.DefaultFieldLayout; try { String stTargetPath = this.UniForm_BinaryFilePath + this.Session.UserProfile.ImageFileName; String stImagePath = this.UniForm_ImageFilePath + this.Session.UserProfile.ImageFileName; this.LogDebug ( "Target path {0}.", stTargetPath ); this.LogDebug ( "Image path {0}.", stImagePath ); // // copy the file into the image directory. // System.IO.File.Copy ( stImagePath, stTargetPath, true ); } catch ( Exception Ex ) { this.LogException ( Ex ); } } else { this.Session.UserProfile.ImageFileName = String.Empty; } if ( this.AdapterObjects.Settings.hasHiddenUserProfileField ( EdUserProfile.FieldNames.Title ) == false ) { groupField = pageGroup.createTextField ( Evado.Digital.Model.EdUserProfile.FieldNames.Title, EdLabels.UserProfile_Title_Field_Label, this.Session.UserProfile.Title, 50 ); groupField.Layout = EuAdapter.DefaultFieldLayout; } // // create the name field. // this.LogDebug ( "Delimited Name: " + this.Session.UserProfile.DelimitedName ); groupField = pageGroup.createNameField ( Evado.Digital.Model.EdUserProfile.FieldNames.Delimted_Name, EdLabels.UserProfile_Name_Field_Label, this.Session.UserProfile.DelimitedName, true, false ); groupField.Layout = EuAdapter.DefaultFieldLayout; #region address block // // define the user address field. // if ( this.AdapterObjects.Settings.EnableUserAddressUpdate == true && this.AdapterObjects.Settings.EnableUserOrganisationUpdate == false ) { this.LogDebug ( "Address_1:" + this.Session.UserProfile.Address_1 ); this.LogDebug ( "Address_2:" + this.Session.UserProfile.Address_2 ); this.LogDebug ( "AddressCity:" + this.Session.UserProfile.AddressCity ); this.LogDebug ( "AddressState:" + this.Session.UserProfile.AddressState ); this.LogDebug ( "AddressPostCode:" + this.Session.UserProfile.AddressPostCode ); this.LogDebug ( "AddressCountry:" + this.Session.UserProfile.AddressCountry ); // // Create the customer name object // groupField = pageGroup.createAddressField ( EuUserProfiles.CONST_ADDRESS_FIELD_ID, EdLabels.UserProfile_Address_Field_Label, this.Session.UserProfile.Address_1, this.Session.UserProfile.Address_2, this.Session.UserProfile.AddressCity, this.Session.UserProfile.AddressState, this.Session.UserProfile.AddressPostCode, this.Session.UserProfile.AddressCountry ); groupField.Layout = EuAdapter.DefaultFieldLayout; this.LogDebug ( "AddresS:" + groupField.Value ); } #endregion #region contact details // // Create the customer telephone number object // groupField = pageGroup.createTelephoneNumberField ( Evado.Digital.Model.EdUserProfile.FieldNames.Telephone.ToString ( ), EdLabels.UserProfile_Telephone_Field_Label, this.Session.UserProfile.Telephone ); groupField.Layout = EuAdapter.DefaultFieldLayout; // // Create the customer telephone number object // groupField = pageGroup.createTelephoneNumberField ( Evado.Digital.Model.EdUserProfile.FieldNames.Mobile_Phone.ToString ( ), EdLabels.UserProfile_Mobilephone_Field_Label, this.Session.UserProfile.MobilePhone ); groupField.Layout = EuAdapter.DefaultFieldLayout; // // Create the customer fax number object // groupField = pageGroup.createEmailAddressField ( Evado.Digital.Model.EdUserProfile.FieldNames.Email_Address.ToString ( ), EdLabels.UserProfile_Email_Field_Label, this.Session.UserProfile.EmailAddress ); groupField.Layout = EuAdapter.DefaultFieldLayout; #endregion this.LogMethodEnd ( "getDataObject_MUP_DetailsGroup" ); }//END getDataObject_MUP_DetailsGroup 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
}//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
}//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 getDataObject_GroupCommands Method // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="PageObject">Evado.UniForm.Model.AppData object.</param> /// <returns>ClientApplicationData object</returns> // ------------------------------------------------------------------------------ private void getDataObject_DetailsGroup ( Evado.UniForm.Model.Page PageObject ) { this.LogMethod ( "getDataObject_DetailsGroup" ); // // Initialise the methods variables and objects. // Evado.UniForm.Model.Field pageField = new Evado.UniForm.Model.Field ( ); List<EvOption> optionList = new List<EvOption> ( ); Evado.UniForm.Model.EditAccess adminAccess = Evado.UniForm.Model.EditAccess.Disabled; if ( this.Session.UserProfile.hasAdministrationAccess == true ) { adminAccess = Evado.UniForm.Model.EditAccess.Enabled; } // // create the page pageMenuGroup // Evado.UniForm.Model.Group pageGroup = PageObject.AddGroup ( String.Empty ); pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; pageGroup.EditAccess = Evado.UniForm.Model.EditAccess.Enabled; // // Add the group commands // this.getDataObject_GroupCommands ( pageGroup ); // // Create the customer id object // pageField = pageGroup.createTextField ( EdOrganisation.FieldNames.OrgId.ToString ( ), EdLabels.Label_Organisation_Id, String.Empty, this.Session.AdminOrganisation.OrgId, 10 ); pageField.EditAccess = Evado.UniForm.Model.EditAccess.Disabled; pageField.Layout = EuAdapter.DefaultFieldLayout; pageField.EditAccess = adminAccess; // // get the org type selection list. // optionList = this.AdapterObjects.Settings.GetOrgTypeList ( true ); // // Generate the organisation type radio button list field object. // pageField = pageGroup.createSelectionListField ( EdOrganisation.FieldNames.Org_Type.ToString ( ), EdLabels.Organisation_Type_Field_Label, EdLabels.Organisation_Type_Field_Description, this.Session.AdminOrganisation.OrgType, optionList ); pageField.Layout = EuAdapter.DefaultFieldLayout; pageField.Mandatory = true; pageField.EditAccess = adminAccess; if ( this.Session.AdminOrganisation.OrgType == String.Empty ) { pageField.setBackgroundColor ( Evado.UniForm.Model.FieldParameterList.BG_Mandatory, Evado.UniForm.Model.Background_Colours.Red ); } // // Create the customer name object // pageField = pageGroup.createTextField ( EdOrganisation.FieldNames.Name.ToString ( ), EdLabels.Organisation_Name_Field_Label, this.Session.AdminOrganisation.Name, 50 ); pageField.Layout = EuAdapter.DefaultFieldLayout; pageField.Mandatory = true; pageField.setBackgroundColor ( Evado.UniForm.Model.FieldParameterList.BG_Mandatory, Evado.UniForm.Model.Background_Colours.Red ); // // Create the customer name object // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Image_File_Name ) == false ) { pageField = pageGroup.createImageField ( EdOrganisation.FieldNames.Image_File_Name.ToString ( ), EdLabels.Organisation_ImageFileame_Field_Label, this.Session.AdminOrganisation.ImageFileName, 300, 200 ); pageField.Layout = EuAdapter.DefaultFieldLayout; try { String stTargetPath = this.UniForm_BinaryFilePath + this.Session.AdminOrganisation.ImageFileName; String stImagePath = this.UniForm_ImageFilePath + this.Session.AdminOrganisation.ImageFileName; this.LogDebug ( "Target path {0}.", stTargetPath ); this.LogDebug ( "Image path {0}.", stImagePath ); // // copy the file into the image directory. // System.IO.File.Copy ( stImagePath, stTargetPath, true ); } catch { } } else { this.Session.Organisation.ImageFileName = String.Empty; } // // Create the street address 1 // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Address_1 ) == false ) { pageField = pageGroup.createTextField ( EdOrganisation.FieldNames.Address_1, EdLabels.Organisation_Address_Street_Field_Label, this.Session.AdminOrganisation.AddressStreet_1, 50 ); pageField.Layout = EuAdapter.DefaultFieldLayout; // // Create the street address 2 // pageField = pageGroup.createTextField ( EdOrganisation.FieldNames.Address_2, EdLabels.Organisation_Address_Street_Field_Label, this.Session.AdminOrganisation.AddressStreet_2, 50 ); pageField.Layout = EuAdapter.DefaultFieldLayout; } // // Create the street address city // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Address_City ) == false ) { pageField = pageGroup.createTextField ( EdOrganisation.FieldNames.Address_City, EdLabels.Organisation_Address_City_Field_Label, this.Session.AdminOrganisation.AddressCity, 50 ); pageField.Layout = EuAdapter.DefaultFieldLayout; } // // Create the street address state // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Address_State ) == false ) { pageField = pageGroup.createTextField ( EdOrganisation.FieldNames.Address_State, EdLabels.Organisation_Address_State_Field_Label, this.Session.AdminOrganisation.AddressState, 10 ); pageField.Layout = EuAdapter.DefaultFieldLayout; } // // Create the street address 1 // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Address_Post_Code ) == false ) { pageField = pageGroup.createTextField ( EdOrganisation.FieldNames.Address_Post_Code, EdLabels.Organisation_Address_City_Field_Label, this.Session.AdminOrganisation.AddressPostCode, 50 ); pageField.Layout = EuAdapter.DefaultFieldLayout; } // // Create the street address 1 // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Address_Country ) == false ) { pageField = pageGroup.createTextField ( EdOrganisation.FieldNames.Address_Country, EdLabels.Organisation_Address_Country_Field_Label, this.Session.AdminOrganisation.AddressCountry, 50 ); pageField.Layout = EuAdapter.DefaultFieldLayout; } // // Create the organisation telephone number object // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Telephone ) == false ) { pageField = pageGroup.createTelephoneNumberField ( EdOrganisation.FieldNames.Telephone.ToString ( ), EdLabels.Organisation_Telephone_Field_Label, this.Session.AdminOrganisation.Telephone ); pageField.Layout = EuAdapter.DefaultFieldLayout; } // // Create the organisation fax number object // if ( this.AdapterObjects.Settings.hasHiddenOrganisationField ( EdOrganisation.FieldNames.Email_Address ) == false ) { pageField = pageGroup.createEmailAddressField ( EdOrganisation.FieldNames.Email_Address.ToString ( ), EdLabels.Organisation_Email_Field_Label, this.Session.AdminOrganisation.EmailAddress ); pageField.Layout = EuAdapter.DefaultFieldLayout; } this.LogMethodEnd ( "getDataObject_DetailsGroup" ); }//END getDataObject_DetailsGroup Method
}//END getRecordExport_ListObject 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_DownloadGroup ( Evado.UniForm.Model.Page Page ) { this.LogMethod ( "getRecordExport_DownloadGroup" ); this.LogDebug ( "FormRecords_IncludeFreeTextData: " + this.Session.FormRecords_IncludeFreeTextData ); this.LogDebug ( "FormRecords_IncludeDraftRecords: " + this.Session.FormRecords_IncludeDraftRecords ); // // 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 ( ); EvFormRecordExport exportRecords = new EvFormRecordExport ( ); EvExportParameters exportParameters = new EvExportParameters ( ); EdQueryParameters queryParameters = new EdQueryParameters ( ); int exportRecordFileLimit = 250; this.LogDebug ( "exportRecordFileLimit: " + exportRecordFileLimit ); // // IF there are not parameters then exit. // if ( this.Session.Selected_EntityLayoutId == String.Empty ) { this.LogDebug ( " Form {0}. ", this.Session.Selected_EntityLayoutId ); this.LogMethodEnd ( "getRecordExport_DownloadGroup" ); return; } exportParameters = new EvExportParameters ( EvExportParameters.ExportDataSources.Project_Record, this.Session.Selected_EntityLayoutId ); exportParameters.IncludeTestSites = false; exportParameters.IncludeFreeTextData = this.Session.FormRecords_IncludeFreeTextData; exportParameters.IncludeDraftRecords = this.Session.FormRecords_IncludeDraftRecords; queryParameters = new EdQueryParameters ( ); queryParameters.LayoutId = this.Session.Selected_EntityLayoutId; queryParameters.States.Add ( EdRecordObjectStates.Withdrawn ); queryParameters.States.Add ( EdRecordObjectStates.Draft_Record ); queryParameters.States.Add ( EdRecordObjectStates.Empty_Record ); queryParameters.States.Add ( EdRecordObjectStates.Completed_Record ); if ( exportParameters.IncludeDraftRecords == true ) { queryParameters.States.Add ( EdRecordObjectStates.Withdrawn ); } queryParameters.NotSelectedState = true; queryParameters.IncludeSummary = true; queryParameters.IncludeRecordValues = false; queryParameters.IncludeComments = false; // // Create the export ResultData file. // int inResultCount = this._Bll_Entities.geyEntityCount ( queryParameters ); this.LogClass ( this._Bll_Entities.Log ); this.LogDebug ( "inResultCount: " + inResultCount ); // // Create the record display pageMenuGroup. // pageGroup = Page.AddGroup ( EdLabels.Record_Export_Download_Group_Title, Evado.UniForm.Model.EditAccess.Enabled ); pageGroup.CmdLayout = Evado.UniForm.Model.GroupCommandListLayouts.Vertical_Orientation; pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width; if ( inResultCount == 0 ) { LogDebug ( "Record Count is 0." ); pageGroup.Description = EdLabels.Form_Record_Export_Empty_List_Error_Message; this.LogMethodEnd ( "getRecordExport_DownloadGroup" ); return; } // // If the record list is less thant the exportrecord limit output. // if ( inResultCount <= exportRecordFileLimit ) { // // export the ResultData. // this.exportRecordData ( pageGroup, 0, exportParameters, this.Session.Selected_EntityLayoutId ); } else { // // Initialise the output loop parameters. int iRecordRangeStart = 0; int iRecordRangeFinish = exportRecordFileLimit; int iterations = ( inResultCount / exportRecordFileLimit ) + 1; this.LogValue ( "iterations: " + iterations ); for ( int iLoop = 0; iLoop < iterations && iRecordRangeFinish <= inResultCount; iLoop++ ) { // // export the ResultData. // var result = this.exportRecordData ( pageGroup, iLoop, exportParameters, this.Session.Selected_EntityLayoutId ); if ( result != EvEventCodes.Ok ) { this.LogDebug ( "Result {0}.", result ); this.LogMethodEnd ( "getRecordExport_DownloadGroup" ); return; } // // Increment the start and finish for then next loop // iRecordRangeStart = iRecordRangeFinish + 1; if ( ( iRecordRangeFinish + exportRecordFileLimit ) < inResultCount ) { iRecordRangeFinish += exportRecordFileLimit; } else { iRecordRangeFinish = inResultCount; } }//END loop iteration statement. } this.LogMethodEnd ( "getRecordExport_DownloadGroup" ); return; }//END getRecordExport_DownloadGroup method