///<summary> /// Method Invocation of wrapper classes ///<summary> protected static FR_L6PR_GPMwRIfDTaR_1317_Array Invoke(DbConnection Connection, DbTransaction Transaction, string ConnectionString, P_L6PR_GPMwRIfDTaR_1317 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { bool cleanupConnection = Connection == null; bool cleanupTransaction = Transaction == null; FR_L6PR_GPMwRIfDTaR_1317_Array functionReturn = new FR_L6PR_GPMwRIfDTaR_1317_Array(); try { if (cleanupConnection == true) { Connection = CSV2Core_MySQL.Support.DBSQLSupport.CreateConnection(ConnectionString); Connection.Open(); } if (cleanupTransaction == true) { Transaction = Connection.BeginTransaction(); } functionReturn = Execute(Connection, Transaction, Parameter, securityTicket); #region Cleanup Connection/Transaction //Commit the transaction if (cleanupTransaction == true) { Transaction.Commit(); } //Close the connection if (cleanupConnection == true) { Connection.Close(); } #endregion } catch (Exception ex) { try { if (cleanupTransaction == true && Transaction != null) { Transaction.Rollback(); } } catch { } try { if (cleanupConnection == true && Connection != null) { Connection.Close(); } } catch { } throw new Exception("Exception occured in method cls_Get_ProjectMembers_with_RecommendationsInfo_for_DTaskID_and_Right", ex); } return(functionReturn); }
protected static FR_L6PR_GPMwRIfDTaR_1317_Array Execute(DbConnection Connection, DbTransaction Transaction, P_L6PR_GPMwRIfDTaR_1317 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { #region UserCode var returnValue = new FR_L6PR_GPMwRIfDTaR_1317_Array(); //Put your code here List <L6PR_GPMwRIfDTaR_1317> tempResult = new List <L6PR_GPMwRIfDTaR_1317>(); ORM_TMS_PRO_DeveloperTask developerTask = new ORM_TMS_PRO_DeveloperTask(); developerTask.Load(Connection, Transaction, Parameter.DeveloperTask_ID); P_L3PM_GPMfPaRP_1459 ParameterMembers = new P_L3PM_GPMfPaRP_1459(); ParameterMembers.ProjectID = developerTask.Project_RefID; ParameterMembers.RightPackageID = Parameter.Right_ID; var tempMembers = cls_Get_ProjectMemebers_for_ProjectID_and_RightPackageID.Invoke(Connection, Transaction, ParameterMembers, securityTicket).Result; if (tempMembers != null) { ORM_TMS_PRO_DeveloperTask_Recommendation.Query recommendationsQuery = new ORM_TMS_PRO_DeveloperTask_Recommendation.Query(); recommendationsQuery.DeveloperTask_RefID = Parameter.DeveloperTask_ID; recommendationsQuery.IsDeleted = false; foreach (var member in tempMembers) { L6PR_GPMwRIfDTaR_1317 tempResultItem = new L6PR_GPMwRIfDTaR_1317(); tempResultItem.ProjectMember_FirstName = member.ProjectMember_FirstName; tempResultItem.ProjectMember_ID = member.ProjectMember_ID; tempResultItem.ProjectMember_AccountID = member.ProjectMember_AccountID; tempResultItem.ProjectMember_LastName = member.ProjectMember_LastName; tempResultItem.ProjectMember_ProfilePic_ServerLocation = member.ProjectMember_ProfilePic_ServerLocation; recommendationsQuery.RecommendedTo_ProjectMember_RefID = member.ProjectMember_ID; tempResultItem.ProjectMember_IsRecommended = ORM_TMS_PRO_DeveloperTask_Recommendation.Query.Exists(Connection, Transaction, recommendationsQuery); tempResult.Add(tempResultItem); } } returnValue.Result = tempResult.ToArray(); return(returnValue); #endregion UserCode }