protected static FR_L5EM_GEAAWCFTAE_1403 Execute(DbConnection Connection, DbTransaction Transaction, P_L5EM_GEAAWCFTAE_1403 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            #region UserCode
            var returnValue = new FR_L5EM_GEAAWCFTAE_1403();
            returnValue.Result = new L5EM_GEAAWCFTAE_1403();
            //Put your code here

            L5EM_GEAAWCFT_1210[] employees = cls_Get_Employees_And_ActiveWorkingContracts_For_Tenant.Invoke(Connection, Transaction, securityTicket).Result;
            if (employees == null)
            {
                employees = new L5EM_GEAAWCFT_1210[0];
                returnValue.Result.Employees = employees;
                return(returnValue);
            }
            L5EM_GEAAWCFT_1210 loggedEmployee = employees.Where(i => i.CMN_BPT_EMP_EmployeeID == Parameter.EmployeeID).FirstOrDefault();
            L5CM_GCSFT_1157    company        = cls_Get_Company_Structure_For_Tenant.Invoke(Connection, Transaction, securityTicket).Result;


            EmployeeUtils employeeUtils = new EmployeeUtils();
            employeeUtils.ComapnyStructure = company;
            List <Guid> employeesUnderManager = employeeUtils.getEmployeesForManager(Parameter.appStartDate, employees, company, Parameter.EmployeeID, securityTicket.SessionTicket);
            if (loggedEmployee == null)
            {
                employees = employees.Where(i => employeesUnderManager.Contains(i.CMN_BPT_EMP_EmployeeID)).ToArray();
            }


            employees = employees.Where(i => employeesUnderManager.Contains(i.CMN_BPT_EMP_EmployeeID) || EmployeeUtils.getEmployeeWorkplaceHistoriesFromAppStartDate(i.EmployeeWorkplaceHistory, Parameter.appStartDate).Intersect(EmployeeUtils.getEmployeeWorkplaceHistoriesFromAppStartDate(loggedEmployee.EmployeeWorkplaceHistory, Parameter.appStartDate)).Any()).ToArray();
            if (employees.Where(i => i.CMN_BPT_EMP_EmployeeID == Parameter.EmployeeID).ToArray().Length == 0)
            {
                if (loggedEmployee != null)
                {
                    if (employees.Length == 0)
                    {
                        employees    = new L5EM_GEAAWCFT_1210[1];
                        employees[0] = loggedEmployee;
                    }
                    else
                    {
                        L5EM_GEAAWCFT_1210[] employeeList = new L5EM_GEAAWCFT_1210[employees.Length + 1];
                        for (int i = 0; i < employees.Length; i++)
                        {
                            employeeList[i] = employees[i];
                        }
                        employeeList[employees.Length] = loggedEmployee;
                        employees = employeeList;
                    }
                }
            }
            returnValue.Result.Employees = employees;

            if (employees.Length == 0)
            {
                returnValue.Result = null;
            }
            return(returnValue);

            #endregion UserCode
        }