protected static FR_L6US_GPMTwCL_1310_Array Execute(DbConnection Connection, DbTransaction Transaction, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { #region UserCode var returnValue = new FR_L6US_GPMTwCL_1310_Array(); //Put your code here List <L6US_GPMTwCL_1310> tempResult = new List <L6US_GPMTwCL_1310>(); var tempProjectMemberTypes = cls_Get_ProjectMemberTypes_for_ActiveTenant.Invoke(Connection, Transaction, securityTicket).Result; foreach (var currentProjectMemberType in tempProjectMemberTypes) { L6US_GPMTwCL_1310 tempResultItem = new L6US_GPMTwCL_1310(); tempResultItem.ProjectMemberType_ID = currentProjectMemberType.TMP_PRO_ProjectMember_TypeID; tempResultItem.ProjectMemberType_Name = currentProjectMemberType.ProjectMemberType_Name; tempResultItem.Color = currentProjectMemberType.Color; P_L3PM_GACLfPMT_1114 chargingLevelsParameter = new P_L3PM_GACLfPMT_1114(); chargingLevelsParameter.MemberTypeID = currentProjectMemberType.TMP_PRO_ProjectMember_TypeID; tempResultItem.ProjectMemberType_ChargingLevels = cls_Get_AvailableChargingLevels_for_ProjectMemberTypeID.Invoke(Connection, Transaction, chargingLevelsParameter, securityTicket).Result; tempResult.Add(tempResultItem); } returnValue.Result = tempResult.ToArray(); return(returnValue); #endregion UserCode }
///<summary> /// Method Invocation of wrapper classes ///<summary> protected static FR_L6US_GPMTwCL_1310_Array Invoke(DbConnection Connection, DbTransaction Transaction, string ConnectionString, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { bool cleanupConnection = Connection == null; bool cleanupTransaction = Transaction == null; FR_L6US_GPMTwCL_1310_Array functionReturn = new FR_L6US_GPMTwCL_1310_Array(); try { if (cleanupConnection == true) { Connection = CSV2Core_MySQL.Support.DBSQLSupport.CreateConnection(ConnectionString); Connection.Open(); } if (cleanupTransaction == true) { Transaction = Connection.BeginTransaction(); } functionReturn = Execute(Connection, Transaction, 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_ProjectMemberTypes_with_ChargingLevels", ex); } return(functionReturn); }