}//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 method // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #endregion #region Class private methods // ============================================================================== /// <summary> /// This method returns a client application ResultData object /// </summary> /// <param name="PageCommand">Evado.Model.UniForm.Command object.</param> /// <returns>Evado.Model.UniForm.AppData object</returns> // ------------------------------------------------------------------------------ private Evado.Model.UniForm.AppData getListObject ( Evado.Model.UniForm.Command PageCommand ) { try { this.LogMethod ( "getListObject" ); this.LogValue ( "UserProfile.CommonName: " + this.Session.UserProfile.CommonName ); // // Determine if the user has access to this page and log and error if they do not. // if ( this.Session.UserProfile.hasRecordAccess == false ) { this.LogIllegalAccess ( "Evado.UniForm.Clinical.AncilliaryRecords.getObject", this.Session.UserProfile ); this.ErrorMessage = EvLabels.Illegal_Page_Access_Attempt; return null; } // // Log access to page. // this.LogPageAccess ( "Evado.UniForm.Clinical.AncilliaryRecords.getListObject", this.Session.UserProfile ); // // Initialise the methods variables and objects. // Evado.Model.UniForm.AppData clientDataObject = new Evado.Model.UniForm.AppData ( ); Evado.Model.UniForm.Command groupCommand = new Model.UniForm.Command ( ); Evado.Model.UniForm.Group pageGroup = new Model.UniForm.Group ( ); clientDataObject.Title = EvLabels.Ancillary_Record_List_Page_Title; clientDataObject.Page.Title = clientDataObject.Title; clientDataObject.Id = Guid.NewGuid ( ); this.LogValue ( "data.Page.Title: " + clientDataObject.Page.Title ); // // Create the new pageMenuGroup. // pageGroup = clientDataObject.Page.AddGroup ( EvLabels.Ancillary_Record_List_Page_Group_Title, Evado.Model.UniForm.EditAccess.Enabled ); pageGroup.CmdLayout = Evado.Model.UniForm.GroupCommandListLayouts.Vertical_Orientation; pageGroup.Layout = Evado.Model.UniForm.GroupLayouts.Full_Width; if ( this.Session.UserProfile.hasRecordEditAccess == true ) { groupCommand = pageGroup.addCommand ( EvLabels.Ancillary_Record_Add_Record_Command_Title, EuAdapter.APPLICATION_ID, EuAdapterClasses.Ancillary_Record.ToString ( ), Model.UniForm.ApplicationMethods.Create_Object ); groupCommand.SetBackgroundColour ( Model.UniForm.CommandParameters.BG_Default, Model.UniForm.Background_Colours.Purple ); } // // get the list of customers. // List<EvAncillaryRecord> siteList = this._Bll_AncillaryRecords.getView ( this.Session.Trial.TrialId, this.Session.Subject.SubjectId, String.Empty, String.Empty ); this.LogValue ( this._Bll_AncillaryRecords.DebugLog ); this.LogValue ( "list count: " + siteList.Count ); // // generate the page links. // foreach ( EvAncillaryRecord ancillaryRecord in siteList ) { groupCommand = pageGroup.addCommand( ancillaryRecord.RecordId, EuAdapter.APPLICATION_ID, EuAdapterClasses.Ancillary_Record.ToString ( ), Evado.Model.UniForm.ApplicationMethods.Get_Object ); groupCommand.SetGuid( ancillaryRecord.Guid ); groupCommand.Title = ancillaryRecord.Subject + EvLabels.Space_Open_Bracket + EvLabels.Label_Date + ancillaryRecord.stRecordDate + EvLabels.Space_Close_Bracket; }//END ancillary command iteration loop. if ( pageGroup.CommandList.Count == 0 ) { pageGroup.Description = EvLabels.Ancillary_Record_List_Page_No_Records_Label ; } this.LogValue ( "command object count: " + pageGroup.CommandList.Count ); return clientDataObject; } catch ( Exception Ex ) { // // Create the error message to be displayed to the user. // this.ErrorMessage = EvLabels.Ancillary_Record_Page_Error_Message; // // Generate the log the error event. // this.LogException ( Ex ); } return null; }//END getListObject method.