}//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
Beispiel #3
0
    //  =================================================================================
    /// <summary>
    ///   This method generates the streamed video form field object as html markup.
    /// </summary>
    /// <param name="GroupField">Evado.Model.UniForm.PageGroup object.</param>
    //  ---------------------------------------------------------------------------------
    private void getStreamedVideoField (
      Evado.Model.UniForm.Group PageGroup )
    {
      this.LogMethod ( "getStreamedVideoField" );

      //
      // if there is not video donot create the video field.
      //
      if ( this.AdapterObjects.Settings.DemoRegistrationVideoUrl == String.Empty )
      {
        return;
      }

      // 
      // Initialise local variables.
      // 
      Evado.Model.UniForm.Field groupField = PageGroup.createField ( );
      groupField.Type = Evado.Model.EvDataTypes.Streamed_Video;
      groupField.Value = this.AdapterObjects.Settings.DemoRegistrationVideoUrl;
      groupField.Description = String.Empty;

      int iWidth = 800;
      int iHeight = 0;

      this.LogDebug ( "iWidth: " + iWidth );
      this.LogDebug ( "iHeight: " + iHeight );
      if ( iWidth > 0 )
      {
        groupField.AddParameter ( Model.UniForm.FieldParameterList.Width, iWidth.ToString ( ) );
      }
      if ( iHeight > 0 )
      {
        groupField.AddParameter ( Model.UniForm.FieldParameterList.Height, iHeight.ToString ( ) );
      }

      this.LogDebug ( "Value: " + groupField.Value );

      return;

    }//END getStreamedVideoField method.
    // ==============================================================================
    /// <summary>
    /// This method returns a client application ResultData object
    /// </summary>
    /// <param name="ClientClientDataObjectObject">The customer object.</param>
    //  ------------------------------------------------------------------------------
    private void getClientDataObject ( Evado.Model.UniForm.AppData ClientClientDataObjectObject )
    {
      this.LogMethod ( "getClientClientDataObjectObject" );
      // 
      // Initialise the methods variables and objects.
      // 
      Evado.Model.UniForm.Command pageCommand = new Evado.Model.UniForm.Command ( );
      Evado.Model.UniForm.Field pageField = new Evado.Model.UniForm.Field ( );
      bool userHasEditAccess = this.UserHasEditAccess ( );

      //
      // Initialise the client ResultData object.
      //
      ClientClientDataObjectObject.Id = this.Session.Alert.Guid;
      ClientClientDataObjectObject.Title = EvLabels.Alert_Page_Title;

      ClientClientDataObjectObject.Page.Id = ClientClientDataObjectObject.Id;
      ClientClientDataObjectObject.Page.Title = ClientClientDataObjectObject.Title;
      ClientClientDataObjectObject.Page.EditAccess = Evado.Model.UniForm.EditAccess.Enabled;

      //
      // If the user has edit access enable the page for the user.
      //
      if ( userHasEditAccess == true )
      {
        ClientClientDataObjectObject.Page.EditAccess = Evado.Model.UniForm.EditAccess.Enabled;
      }

      // 
      // create the general page pageMenuGroup
      // 
      Evado.Model.UniForm.Group pageGroup = ClientClientDataObjectObject.Page.AddGroup (
        EvLabels.Alert_Page_Header_Group_Title,
        String.Empty,
        Evado.Model.UniForm.EditAccess.Inherited );
      pageGroup.Layout = Model.UniForm.GroupLayouts.Full_Width;

      // 
      // Create the customer id object
      // 
      pageField = pageGroup.createReadOnlyTextField (
        EvAlert.AlertFieldNames.Alert_Id.ToString ( ),
        EvLabels.Label_Alert_Id,
        this.Session.Alert.ToOrgId );
      pageField.Layout = EuRecordGenerator.ApplicationFieldLayout;

      // 
      // Add from user name
      // 
      pageField = pageGroup.createReadOnlyTextField (
        EvAlert.AlertFieldNames.From_User.ToString ( ),
        EvLabels.Alert_Page_From_Label,
        this.Session.Alert.FromUser );
      pageField.Layout = EuRecordGenerator.ApplicationFieldLayout;

      // 
      // Add to user name
      // 
      if ( this.Session.Alert.ToUser != String.Empty )
      {
        pageField = pageGroup.createReadOnlyTextField (
          EvAlert.AlertFieldNames.To_User.ToString ( ),
          EvLabels.Alert_Page_To_Label,
          this.Session.Alert.ToUser );
        pageField.Layout = EuRecordGenerator.ApplicationFieldLayout;
      }

      // 
      // Add alert milestone name
      // 
      pageField = pageGroup.createReadOnlyTextField (
        EvAlert.AlertFieldNames.Alert_Subject.ToString ( ),
        EvLabels.Alert_Page_Subject_Label,
        this.Session.Alert.Subject );
      pageField.Layout = EuRecordGenerator.ApplicationFieldLayout;

      // 
      // Add alert message name
      // 
      pageField = pageGroup.createReadOnlyTextField (
        EvAlert.AlertFieldNames.Message.ToString ( ),
        EvLabels.Alert_Page_Message_Label,
        this.Session.Alert.Message );
      pageField.Layout = EuRecordGenerator.ApplicationFieldLayout;

      // 
      // Add alert message name
      // 
      pageField = pageGroup.createReadOnlyTextField (
        EvAlert.AlertFieldNames.Alert_State.ToString ( ),
        EvLabels.Alert_Page_Status,
        this.Session.Alert.StateDesc );

      pageField.Layout = EuRecordGenerator.ApplicationFieldLayout;

      // 
      // include the acknowledged content if it exists.
      // 
      if ( this.Session.Alert.Acknowledged !=  Evado.Model.Digital.EvcStatics.CONST_DATE_NULL )
      {
        pageField = pageGroup.createReadOnlyTextField (
          EvAlert.AlertFieldNames.Acknowledged_Date.ToString ( ),
          EvLabels.Alert_Page_Acknowledged_Date_Label,
          this.Session.Alert.Acknowledged.ToString ( "dd MMM yyy HH:mm" ) );

        pageField.Layout = EuRecordGenerator.ApplicationFieldLayout;

        pageField = pageGroup.createReadOnlyTextField (
          EvAlert.AlertFieldNames.Acknowledged_By.ToString ( ),
          EvLabels.Alert_Page_Acknowledged_By_Label,
          this.Session.Alert.AcknowledgedBy );

        pageField.Layout = EuRecordGenerator.ApplicationFieldLayout;
      }

      // 
      // include the clodes content if it exists.
      // 
      if ( this.Session.Alert.Closed !=  Evado.Model.Digital.EvcStatics.CONST_DATE_NULL )
      {

        pageField = pageGroup.createReadOnlyTextField (
          EvAlert.AlertFieldNames.Closed_Date.ToString ( ),
          EvLabels.Alert_Page_Closed_Date_Label,
          this.Session.Alert.Closed.ToString ( "dd MMM yyy HH:mm" ) );

        pageField.Layout = EuRecordGenerator.ApplicationFieldLayout;

        pageField = pageGroup.createReadOnlyTextField (
          EvAlert.AlertFieldNames.Closed_By.ToString ( ),
          EvLabels.Alert_Page_Closed_By_Label,
          this.Session.Alert.ClosedBy );

        pageField.Layout = EuRecordGenerator.ApplicationFieldLayout;
      }

      this.LogValue ( "Edit Access: " + userHasEditAccess );
      this.LogValue ( "Alert.Status: " + this.Session.Alert.State );

      //
      // Add the record access command.
      //
      pageGroup.addCommand ( this.getRecordCommand ( ) );
      
      // 
      // Add page commands if the user has edit access to them.
      // 
      if ( userHasEditAccess == true )
      {
        this.LogValue ( "User has edit access" );

        switch ( this.Session.Alert.State )
        {
          case EvAlert.AlertStates.Raised:
            {
              this.LogValue ( "Alert.Status: Raised" );
              // 
              // Add the save groupCommand
              // 
              pageCommand = pageGroup.addCommand (
                EvLabels.Alert_Save_Command_Title,
                EuAdapter.APPLICATION_ID,
                EuAdapterClasses.Alert.ToString ( ),
                Evado.Model.UniForm.ApplicationMethods.Save_Object );

              pageCommand.AddParameter (
                 Evado.Model.Digital.EvcStatics.CONST_SAVE_ACTION,
                EvAlert.AlertSaveActionCodes.Save_Alert.ToString ( ));

              pageCommand.SetGuid( ClientClientDataObjectObject.Id );

              // 
              // Add acknowledge groupCommand.
              // 
              pageCommand = pageGroup.addCommand (
                EvLabels.Alert_Page_Acknowledge_Command,
                EuAdapter.APPLICATION_ID,
                EuAdapterClasses.Alert.ToString ( ),
                Evado.Model.UniForm.ApplicationMethods.Save_Object );

              pageCommand.SetGuid ( ClientClientDataObjectObject.Id );

              pageCommand.AddParameter (
                 Evado.Model.Digital.EvcStatics.CONST_SAVE_ACTION,
                EvAlert.AlertSaveActionCodes.Acknowledge_Alert.ToString ( ) );

              // 
              // Add the close groupCommand.
              // 
              pageCommand = pageGroup.addCommand (
                EvLabels.Alert_Page_Close_Command,
                EuAdapter.APPLICATION_ID,
                EuAdapterClasses.Alert.ToString ( ),
                Evado.Model.UniForm.ApplicationMethods.Save_Object );

              pageCommand.SetGuid ( ClientClientDataObjectObject.Id );

              pageCommand.AddParameter (
                 Evado.Model.Digital.EvcStatics.CONST_SAVE_ACTION,
                EvAlert.AlertSaveActionCodes.Close_Alert.ToString ( ));

              break;
            }//END raised state.

          case EvAlert.AlertStates.Acknowledged:
            {
              this.LogValue ( "Alert.Status: Acknowledged" );
              // 
              // Add the save groupCommand
              // 
              pageCommand = pageGroup.addCommand (
                EvLabels.Alert_Save_Command_Title,
                EuAdapter.APPLICATION_ID,
                EuAdapterClasses.Alert.ToString ( ),
                Evado.Model.UniForm.ApplicationMethods.Save_Object );

              pageCommand.AddParameter (
                 Evado.Model.Digital.EvcStatics.CONST_SAVE_ACTION,
                EvAlert.AlertSaveActionCodes.Save_Alert.ToString ( ));

              pageCommand.SetGuid ( ClientClientDataObjectObject.Id );

              // 
              // Add the close groupCommand.
              // 
              pageCommand = pageGroup.addCommand (
                EvLabels.Alert_Page_Close_Command,
                EuAdapter.APPLICATION_ID,
                EuAdapterClasses.Alert.ToString ( ),
                Evado.Model.UniForm.ApplicationMethods.Save_Object );

              pageCommand.SetGuid (  ClientClientDataObjectObject.Id );

              pageCommand.AddParameter (
                 Evado.Model.Digital.EvcStatics.CONST_SAVE_ACTION,
                EvAlert.AlertSaveActionCodes.Close_Alert.ToString ( ) );
              break;
            }//END acknowledge state.

        }//END Alert State switch

      }//END user edit access.

    }//END Method
Beispiel #5
0
    }//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