private static String GetFeaturePath_NEW(DbConnection Connection, DbTransaction Transaction, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket, Guid Feature_Parent_ID)
        {
            String ResultPath = "";

            P_L2BT_GBTPfFPID_1511 parameter = new P_L2BT_GBTPfFPID_1511();

            parameter.Feature_Parent_RefID = Feature_Parent_ID;

            L2BT_GBTPfFPID_1511 FeatureParentBTPackage = cls_Get_BusinessTaskPackage_for_FeatureParentID.Invoke(Connection, Transaction, parameter, securityTicket).Result;

            if (FeatureParentBTPackage != null && !FeatureParentBTPackage.BTP_Name.Equals("") && FeatureParentBTPackage.TMS_PRO_BusinessTaskPackageID != Guid.Empty)
            {
                ResultPath = FeatureParentBTPackage.BTP_Name;

                if (FeatureParentBTPackage.Parent_RefID != null && FeatureParentBTPackage.Parent_RefID != Guid.Empty)
                {
                    P_L2BT_GBTPP_1544 param = new P_L2BT_GBTPP_1544();
                    param.BT_Parent_ID = FeatureParentBTPackage.Parent_RefID;

                    L2BT_GBTPP_1544 BusinessTaskPackageParent = new L2BT_GBTPP_1544();

                    do
                    {
                        BusinessTaskPackageParent = cls_Get_BusinessTaskPackage_Parent.Invoke(Connection, Transaction, param, securityTicket).Result;
                        param.BT_Parent_ID        = BusinessTaskPackageParent.Parent_RefID;

                        ResultPath = BusinessTaskPackageParent.BTP_Name + "/" + ResultPath;
                    }while (cls_Get_BusinessTaskPackage_Parent.Invoke(Connection, Transaction, param, securityTicket).Result != null && cls_Get_BusinessTaskPackage_Parent.Invoke(Connection, Transaction, param, securityTicket).Result.Parent_RefID != Guid.Empty);
                }

                return(ResultPath);
            }


            else
            {
                return(ResultPath);
            }
        }
        protected static FR_L3FE_GFDDMI_1652_Array Execute(DbConnection Connection, DbTransaction Transaction, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            //Leave UserCode region to enable user code saving
            #region UserCode
            var returnValue = new FR_L3FE_GFDDMI_1652_Array();
            returnValue.Result = new L3FE_GFDDMI_1652[0];
            //Put your code here

            List <L3FE_GFDDMI_1652> DropDownList = new List <L3FE_GFDDMI_1652>();

            List <L2PR_GAPfTID_1700> Projects = cls_Get_AllProjects_for_TenantID.Invoke(Connection, Transaction, securityTicket).Result.ToList();
            List <L2BT_GBTPfT_1127>  AllBusinessTaskPackages = cls_Get_BusinessTaskPackages_for_Tenant.Invoke(Connection, Transaction, securityTicket).Result.ToList();


            foreach (var project in Projects)
            {
                if (project.IsArchived == false)
                {
                    DropDownList.Add(new L3FE_GFDDMI_1652(project.Name, "", project.TMS_PRO_ProjectID));
                }
            }

            foreach (var package in AllBusinessTaskPackages)
            {
                String Path = package.BTP_Name;

                P_L2PR_GPfPID_0857 parameter = new P_L2PR_GPfPID_0857();
                parameter.ProjectID = package.Project_RefID;

                L2PR_GPfPID_0857 packageProject = cls_Get_Project_for_ProjectID.Invoke(Connection, Transaction, parameter, securityTicket).Result;

                if (packageProject != null && packageProject.TMS_PRO_ProjectID != Guid.Empty && packageProject.Name != null)
                {
                    if (package.Parent_RefID == null || package.Parent_RefID == Guid.Empty)
                    {
                        DropDownList.Add(new L3FE_GFDDMI_1652(packageProject.Name, Path, package.TMS_PRO_BusinessTaskPackageID));
                    }

                    if (package.Parent_RefID != null && package.Parent_RefID != Guid.Empty)
                    {
                        P_L2BT_GBTPP_1544 parentPackageParam = new P_L2BT_GBTPP_1544();


                        do
                        {
                            parentPackageParam.BT_Parent_ID = package.Parent_RefID;

                            L2BT_GBTPP_1544 currentPackageParent = cls_Get_BusinessTaskPackage_Parent.Invoke(Connection, Transaction, parentPackageParam, securityTicket).Result;

                            Path = currentPackageParent.BTP_Name + "/" + Path;

                            DropDownList.Add(new L3FE_GFDDMI_1652(packageProject.Name, Path, package.TMS_PRO_BusinessTaskPackageID));

                            if (currentPackageParent.Parent_RefID != null && currentPackageParent.Parent_RefID != Guid.Empty)
                            {
                                parentPackageParam.BT_Parent_ID = currentPackageParent.Parent_RefID;
                            }

                            else
                            {
                                parentPackageParam.BT_Parent_ID = Guid.Empty;
                            }
                        }while (cls_Get_BusinessTaskPackage_Parent.Invoke(Connection, Transaction, parentPackageParam, securityTicket).Result != null && cls_Get_BusinessTaskPackage_Parent.Invoke(Connection, Transaction, parentPackageParam, securityTicket).Result.Parent_RefID != Guid.Empty);
                    }
                }
            }



            if (DropDownList.Count != 0 && DropDownList != null)
            {
                returnValue.Result = DropDownList.ToArray();
            }

            return(returnValue);

            #endregion UserCode
        }