}//END getDataObject_GroupCommands method. // ============================================================================== /// <summary> /// This method outputs a debug group in the registration page. /// </summary> /// <param name="Page"> Evado.Model.UniForm.Page object.</param> // ------------------------------------------------------------------------------ private void getDataObject_Debug_Group ( Evado.Model.UniForm.Page PageObject ) { if ( this.LoggingLevel < 6 ) { return; } var pageGroup = PageObject.AddGroup ( "", Model.UniForm.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_PageCommands method //=================================================================================== /// <summary> /// This method generates the relevant page page field for the milestone record page. /// </summary> /// <param name="Page">Evado.Model.UniForm.Page object</param> //----------------------------------------------------------------------------------- private void getClientDataObject_FieldGroup ( Evado.Model.UniForm.Page Page ) { this.LogMethod ( "getClientDataObject_FieldGroup" ); // // Initialise the methods variables and objects. // Evado.Model.UniForm.Field pageField = new Evado.Model.UniForm.Field ( ); Evado.Model.UniForm.Group pageGroup = new Model.UniForm.Group ( ); // // generate the pageMenuGroup object. // pageGroup = Page.AddGroup ( EvLabels.Ancillary_Record_Object_Page_Title, Evado.Model.UniForm.EditAccess.Inherited_Access ); pageGroup.Layout = Evado.Model.UniForm.GroupLayouts.Full_Width; // // Create the customer id object // pageField = pageGroup.createReadOnlyTextField ( EvAncillaryRecord.SubjectRecordFieldNames.RecordId.ToString ( ), EvLabels.Ancillary_Record_RecordId_Field_Label, this.Session.AncillaryRecord.RecordId ); pageField.Layout = EuFormGenerator.ApplicationFieldLayout; // // Create the customer name object // pageField = pageGroup.createTextField ( EvAncillaryRecord.SubjectRecordFieldNames.Subject.ToString ( ), EvLabels.Ancillary_Record_Record_Subject_Field_Label, this.Session.AncillaryRecord.Subject, 50 ); pageField.Layout = EuFormGenerator.ApplicationFieldLayout; // // Create the record subject object // pageField = pageGroup.createDateField ( EvAncillaryRecord.SubjectRecordFieldNames.RecordDate.ToString ( ), EvLabels.Ancillary_Record_Date_Field_Label, this.Session.AncillaryRecord.RecordDate ); pageField.Layout = EuFormGenerator.ApplicationFieldLayout; // // Create the record content object // pageField = pageGroup.createFreeTextField ( EvAncillaryRecord.SubjectRecordFieldNames.Record.ToString ( ), EvLabels.Ancillary_Record_Record_Content_Field_Label, this.Session.AncillaryRecord.Record, 100, 15 ); pageField.Layout = Model.UniForm.FieldLayoutCodes.Column_Layout; }//END getClientDataObject_FieldGroup method.
}//END getClientDataObject_BinaryFileGroup method // ============================================================================== /// <summary> /// This method creates the project signoff pageMenuGroup /// </summary> /// <param name="Page">Evado.Model.UniForm.Page object object.</param> // ------------------------------------------------------------------------------ private void getClientDataObject_SignoffLog_Group ( Evado.Model.UniForm.Page Page ) { this.LogMethod ( "getClientDataObject_SignoffLog" ); // // Display comments it they exist. // if ( this.Session.AncillaryRecord.Signoffs == null ) { this.Session.AncillaryRecord.Signoffs = new List<EvUserSignoff> ( ); } // // Display comments it they exist. // if ( this.Session.AncillaryRecord.Signoffs.Count == 0 ) { this.LogValue ( EvLabels.Label_No_Signoff_Label ); return; } // // create the page pageMenuGroup // Evado.Model.UniForm.Field pageField = new Evado.Model.UniForm.Field ( ); Evado.Model.UniForm.Group pageGroup = Page.AddGroup ( EvLabels.Label_Signoff_Log_Group_Title, Evado.Model.UniForm.EditAccess.Enabled ); pageGroup.Layout = Evado.Model.UniForm.GroupLayouts.Full_Width; // // Create the record state object // pageField = pageGroup.createReadOnlyTextField ( String.Empty, EvLabels.Ancillary_Record_Status_Field_Label, this.Session.AncillaryRecord.StateDesc ); pageField.Layout = EuFormGenerator.ApplicationFieldLayout; pageField = pageGroup.createReadOnlyTextField ( String.Empty, EvLabels.Label_Signoff_Log_Field_Title, String.Empty, EvUserSignoff.getSignoffLog ( this.Session.AncillaryRecord.Signoffs, false ) ); pageField.Layout = EuFormGenerator.ApplicationFieldLayout; }//END getProjectPage_SignoffLog Method
}//END getclientDataObject_Commands Method // ============================================================================== /// <summary> /// This method creates the demonstration user registration instructions. /// </summary> /// <param name="Page">Evado.Model.UniForm.Page object.</param> // ------------------------------------------------------------------------------ private void getDataObject_InstructionsGroup ( Evado.Model.UniForm.Page Page ) { this.LogMethod ( "getDataObject_InstructionsGroup" ); // // Initialise the methods variables and objects. // Evado.Model.UniForm.Group pageGroup = new Evado.Model.UniForm.Group ( ); // // create the page pageMenuGroup // pageGroup = Page.AddGroup ( String.Empty, Evado.Model.UniForm.EditAccess.Disabled ); pageGroup.Layout = Evado.Model.UniForm.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_Selection_Group method // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="Page">Evado.Model.UniForm.Page.</param> // ------------------------------------------------------------------------------ private void getListObject_List_Group ( Evado.Model.UniForm.Page Page ) { this.LogMethod ( "getListObject_List_Group" ); try { // // Create the new pageMenuGroup. // Evado.Model.UniForm.Group listGroup = Page.AddGroup ( EvLabels.Alert_List_Group_Title, Evado.Model.UniForm.EditAccess.Inherited ); listGroup.Layout = Evado.Model.UniForm.GroupLayouts.Full_Width; listGroup.CmdLayout = Evado.Model.UniForm.GroupCommandListLayouts.Vertical_Orientation; // // generate the page links. // foreach ( EvAlert alert in _AlertView ) { String stAlertTite = alert.Subject; Evado.Model.UniForm.Command command = listGroup.addCommand ( stAlertTite, EuAdapter.APPLICATION_ID, EuAdapterClasses.Alert.ToString ( ), Model.UniForm.ApplicationMethods.Get_Object ); command.SetGuid (alert.Guid ); }//END Alert list iteration loop this.LogValue ( "listGroup command count: " + listGroup.CommandList.Count ); } catch ( Exception Ex ) { // // Create the error message to be displayed to the user. // this.ErrorMessage = EvLabels.Alert_List_Error_Message; // // Generate the log the error event. // this.LogException( Ex ); } }//END getListObject method.
}//END getClientDataObject_FieldGroup method. //=================================================================================== /// <summary> /// This method generates the relevant inary files groups for the milestone record page. /// </summary> /// <param name="Page">Evado.Model.UniForm.Page object</param> //----------------------------------------------------------------------------------- private void getClientDataObject_BinaryFileGroup ( Evado.Model.UniForm.Page Page ) { this.LogMethod ( "getClientDataObject_BinaryFileGroup" ); // // Initialise the methods variables and objects. // this.Session.FileMetaDataList = new List<EvBinaryFileMetaData> ( ); // // Exit if binary ResultData is not being collected. // if ( this.Session.Trial.Data.EnableBinaryData == false ) { this.LogValue ( "Trial not collecting binary data." ); return; } // // Initialise the binary file object to retrieve binary files associated with the visit. // EuBinaryFiles binaryFiles = new EuBinaryFiles ( this.ApplicationObjects, this.ServiceUserProfile, this.Session, this.UniForm_BinaryFilePath, this.UniForm_BinaryServiceUrl, this._FileRepositoryPath, this.ClassParameters ); binaryFiles.LoggingLevel = this.LoggingLevel; this.LogValue ( "Initialise the binary files class. " + binaryFiles.Log ); Evado.Model.UniForm.Group group = binaryFiles.getListGroup ( EuAdapterClasses.Ancillary_Record, 200 ); this.LogValue ( "binaryFiles.getListGroup debuglog: " + binaryFiles.Log ); if ( group != null ) { this.LogValue ( "Display group not null" ); Page.AddGroup ( group ); } // // If the user has edit access add binary upload pageMenuGroup. // if ( Page.EditAccess == Evado.Model.UniForm.EditAccess.Enabled ) { // // Get the binary file pageMenuGroup // group = binaryFiles.getUploadGroup ( EuAdapterClasses.Ancillary_Record ); this.LogValue ( "binaryFiles.getUploadGroup debuglog: " + binaryFiles.Log ); if ( group != null ) { this.LogValue ( "Upload group not null" ); Page.AddGroup ( group ); } } this.LogMethodEnd ( "getClientDataObject_BinaryFileGroup" ); }//END getClientDataObject_BinaryFileGroup method
}//END getListObject method. // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="Page">Evado.Model.UniForm.Page.</param> // ------------------------------------------------------------------------------ private void getListObject_Selection_Group ( Evado.Model.UniForm.Page Page ) { this.LogMethod ( "getListObject_Selection_Group" ); // // Initialise the methods variables and objects. // Evado.Model.UniForm.Field groupField = new Model.UniForm.Field ( ); Evado.Model.UniForm.Command command = new Model.UniForm.Command ( ); List<EvOption> optionList = new List<EvOption>(); // // Create the new pageMenuGroup. // Evado.Model.UniForm.Group pageGroup = Page.AddGroup ( EvLabels.Alert_List_Selection_Group_Title, Evado.Model.UniForm.EditAccess.Enabled ); pageGroup.Layout = Evado.Model.UniForm.GroupLayouts.Full_Width; // // generate the alert state option list. // optionList = EvAlert.getTypeList ( ); // // create the alert type selection // groupField = pageGroup.createSelectionListField ( EuAlerts.CONST_ALERT_TYPE, EvLabels.Alert_List_Alert_Type_Field_Label, this.Session.AlertType.ToString(), optionList ); groupField.Layout = EuRecordGenerator.ApplicationFieldLayout; groupField.AddParameter ( Evado.Model.UniForm.FieldParameterList.Snd_Cmd_On_Change, 1 ); // // generate the alert types option list. // optionList = EvAlert.getStateList ( ); // // create the alert type selection field. // groupField = pageGroup.createSelectionListField ( EuAlerts.CONST_ALERT_STATE, EvLabels.Alert_List_Alert_State_Field_Label, this.Session.AlertState.ToString ( ), optionList ); groupField.Layout = EuRecordGenerator.ApplicationFieldLayout; groupField.AddParameter ( Evado.Model.UniForm.FieldParameterList.Snd_Cmd_On_Change, 1 ); // // Add the selection groupCommand // command = pageGroup.addCommand ( EvLabels.Alert_List_Selection_Command_Title, EuAdapter.APPLICATION_ID, EuAdapterClasses.Alert.ToString ( ), Evado.Model.UniForm.ApplicationMethods.Custom_Method ); command.setCustomMethod ( Evado.Model.UniForm.ApplicationMethods.List_of_Objects ); }//END getListObject_Selection_Group method
}//END getStreamedVideoField method. // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="Page">Evado.Model.UniForm.Page object.</param> // ------------------------------------------------------------------------------ private void getDataObject_FieldGroup ( Evado.Model.UniForm.Page Page ) { this.LogMethod ( "getDataObject_FieldGroup" ); // // Initialise the methods variables and objects. // Evado.Model.UniForm.Field groupField = new Evado.Model.UniForm.Field ( ); Evado.Model.UniForm.Group pageGroup = new Evado.Model.UniForm.Group ( ); Evado.Model.UniForm.Command groupCommand = new Evado.Model.UniForm.Command ( ); // // create the page pageMenuGroup // pageGroup = Page.AddGroup ( String.Empty, Evado.Model.UniForm.EditAccess.Inherited ); pageGroup.Layout = Evado.Model.UniForm.GroupLayouts.Full_Width; pageGroup.EditAccess = Evado.Model.UniForm.EditAccess.Enabled; pageGroup.SetCommandBackBroundColor ( Model.UniForm.GroupParameterList.BG_Mandatory, Model.UniForm.Background_Colours.Red ); // // Add the groups commands. // this.getDataObject_GroupCommands ( pageGroup ); // // Create the user id object // groupField = pageGroup.createTextField ( Evado.Model.Digital.EdUserProfile.UserProfileFieldNames.UserId.ToString ( ), EdLabels.User_Profile_Identifier_Field_Label, this.Session.AdminUserProfile.UserId, 80 ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.EditAccess = Evado.Model.UniForm.EditAccess.Disabled; // // Create the comon name object // groupField = pageGroup.createTextField ( Evado.Model.Digital.EdUserProfile.UserProfileFieldNames.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.Model.Digital.EdUserProfile.UserProfileFieldNames.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.Model.Digital.EdUserProfile.UserProfileFieldNames.Email_Address.ToString ( ), EdLabels.UserProfile_Email_Field_Label, this.Session.AdminUserProfile.EmailAddress ); groupField.Layout = EuAdapter.DefaultFieldLayout; groupField.Mandatory = true; groupField.setBackgroundColor ( Model.UniForm.FieldParameterList.BG_Mandatory, Model.UniForm.Background_Colours.Red ); }//END getDataObject_FieldGroup Method