示例#1
0
        }//End getList method.

        // =====================================================================================
        /// <summary>
        /// This class filters out the Option object items that the user should not be seeing.
        /// </summary>
        /// <param name="CurrentUser">Evado.Model.Digital.EdUserProfile: a current user profile object</param>
        /// <param name="Project">The current project</param>
        /// <param name="View">List of EvOption: a list options</param>
        /// <remarks>
        /// This method consists of the following steps:
        ///
        /// 1. Loop through the Options list and validate
        /// whether the Current user is not the trailUser and VisitId is not empty.
        ///
        /// 2. Remove the option items that has no role to access Project.
        /// </remarks>
        // -------------------------------------------------------------------------------------
        private void FilterLists(
            Evado.Model.Digital.EdUserProfile CurrentUser,
            Evado.Model.Digital.EdApplication Project,
            List <EvOption> View)
        {
            this.LogMethod("FilterLists method. ");

            //
            // Filter out the studies the user should not be seeing.
            //
            for (int iCount = 0; iCount < View.Count; iCount++)
            {
                string sProjectId = (View [iCount]).Value;

                this.LogDebug("ProjectId: " + sProjectId);

                //
                // If the User is Cro staff or the trial Id is null then skip the
                // row in the currentSchedule.
                //
                if (CurrentUser.hasRecordAccess == false &&
                    sProjectId.Length > 0)
                {
                    //CurrentUser.setProjectRole ( Project );

                    if (CurrentUser.hasRecordAccess == false)
                    {
                        this.LogDebug(" DELETED");
                        View.RemoveAt(iCount);
                        iCount--;
                    }
                } //END If remove Option items
            }     //END For loop
        }         //End FilterLists method.
示例#2
0
        }//End getMilestoneList method.

        // =====================================================================================
        /// <summary>
        /// This class filters out the alert object items that the user should not be seeing.
        /// </summary>
        /// <param name="CurrentUser">Evado.Model.Digital.EdUserProfile: The currentMonth user's profile</param>
        /// <param name="Project">the current Project</param>
        /// <param name="View">List of EvAlert: a list of alert object.</param>
        /// <remarks>
        /// This method consists of the following steps:
        ///
        /// 1. Loop through the Alerts list and validate whether the currentuser is not a ProjectStaff.
        ///
        /// 2. Remove the Alert object
        /// </remarks>
        // -------------------------------------------------------------------------------------
        private void FilterViews(
            Evado.Model.Digital.EdUserProfile CurrentUser,
            Evado.Model.Digital.EdApplication Project,
            List <EvAlert> View)
        {
            this.LogMethod("FilterViews method. ");
            //
            // Filter out the studies the user should not be seeing.
            //
            for (int iCount = 0; iCount < View.Count; iCount++)
            {
                if (CurrentUser.hasManagementAccess == false)
                {
                    string sProjectId = ((EvAlert)View [iCount]).ProjectId;
                    this.LogDebug("ProjectId: " + sProjectId);

                    //CurrentUser.setProjectRole ( Project );

                    if (CurrentUser.hasManagementEditAccess == true)
                    {
                        continue;
                    }

                    if (CurrentUser.hasRecordEditAccess == true)
                    {
                        continue;
                    }
                }
            }

            this.LogDebug("Count: " + View.Count);
            this.LogMethodEnd("FilterViews");
        }//End FilterViews method.