}//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="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 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