protected static FR_L5SG_GDfSR_1618 Execute(DbConnection Connection, DbTransaction Transaction, P_L5SG_GDfSR_1618 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { //Leave UserCode region to enable user code saving #region UserCode var returnValue = new FR_L5SG_GDfSR_1618(); var getArticleParameter = new P_L3AR_GAfAL_0942(); getArticleParameter.ProductID_List = new Guid[1]; getArticleParameter.ProductID_List[0] = Parameter.ProductID; var article = cls_Get_Articles_for_ArticleList.Invoke(Connection, Transaction, getArticleParameter, securityTicket).Result.First(); var getStorageDetailsParameter = new P_L5SG_GSDfPIDoSID_1612(); getStorageDetailsParameter.ProductID = Parameter.ProductID; var storageDetails = cls_Get_StorageDetails_for_ProductIDorShelfID.Invoke(Connection, Transaction, getStorageDetailsParameter, securityTicket).Result.ToList(); List <L5SG_GDfSR_1618a> articleStorageDetails = new List <L5SG_GDfSR_1618a>(); foreach (var storageDetail in storageDetails) { L5SG_GDfSR_1618a temporaryDetail = new L5SG_GDfSR_1618a(); temporaryDetail.Article = article; temporaryDetail.StorageDetails = storageDetail; articleStorageDetails.Add(temporaryDetail); } returnValue.Result = new L5SG_GDfSR_1618(); returnValue.Result.ArticleStorageDetails = articleStorageDetails.ToArray(); //Put your code here return(returnValue); #endregion UserCode }
///<summary> /// Method Invocation of wrapper classes ///<summary> protected static FR_L5SG_GDfSR_1618 Invoke(DbConnection Connection, DbTransaction Transaction, string ConnectionString, P_L5SG_GDfSR_1618 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { bool cleanupConnection = Connection == null; bool cleanupTransaction = Transaction == null; FR_L5SG_GDfSR_1618 functionReturn = new FR_L5SG_GDfSR_1618(); 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_Data_for_StockRelocation_by_Article", ex); } return(functionReturn); }