///<summary> /// Method Invocation of wrapper classes ///<summary> protected static FR_L3DT_GDTIaSfDT_1654 Invoke(DbConnection Connection, DbTransaction Transaction, string ConnectionString, P_L3DT_GDTIaSfDT_1654 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { bool cleanupConnection = Connection == null; bool cleanupTransaction = Transaction == null; FR_L3DT_GDTIaSfDT_1654 functionReturn = new FR_L3DT_GDTIaSfDT_1654(); 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_DeveloperTaskInfo_and_Subscriptions_for_DTaskID", ex); } return(functionReturn); }
protected static FR_L3DT_GDTIaSfDT_1654 Execute(DbConnection Connection, DbTransaction Transaction, P_L3DT_GDTIaSfDT_1654 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { var returnStatus = new FR_L3DT_GDTIaSfDT_1654(); DbCommand command = Connection.CreateCommand(); command.Connection = Connection; command.Transaction = Transaction; var commandLocation = "CL3_DeveloperTask.Atomic.Retrieval.SQL.cls_Get_DeveloperTaskInfo_and_Subscriptions_for_DTaskID.sql"; command.CommandText = new System.IO.StreamReader(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(commandLocation)).ReadToEnd(); CSV2Core_MySQL.Support.DBSQLSupport.SetParameter(command, "ticket", securityTicket); command.CommandTimeout = QueryTimeout; CSV2Core_MySQL.Support.DBSQLSupport.SetParameter(command, "DTaskID", Parameter.DTaskID); CSV2Core_MySQL.Support.DBSQLSupport.SetParameter(command, "IsBeingPrepared_Only", Parameter.IsBeingPrepared_Only); List <L3DT_GDTIaSfDT_1654_raw> results = new List <L3DT_GDTIaSfDT_1654_raw>(); var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(Connection, Transaction); var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader()); try { reader.SetOrdinals(new string[] { "TMS_PRO_DeveloperTaskID", "DOC_Structure_Header_RefID", "IdentificationNumber", "Name", "DeveloperTime_CurrentInvestment_min", "DeveloperTime_RequiredEstimation_min", "PercentageComplete", "Description", "Completion_Deadline", "TMS_PRO_DeveloperTask_PriorityID", "Priority_Label_DictID", "Priority_IconLocationURL", "PriorityLevel", "TMS_PRO_DeveloperTask_TypeID", "Type_Label_DictID", "Type_IconLocationURL", "IsIncompleteInformation", "Creation_Timestamp", "IsArchived", "IsComplete", "Completion_Timestamp", "IsBeingPrepared", "Parent_RefID", "Project_RefID", "CreatedBy_Username", "IsTaskEstimable", "TMS_PRO_DeveloperTask_InvolvementID", "OrderSequence", "IsActive", "R_InvestedWorkingTime_min", "Developer_CompletionTimeEstimation_min", "Assignment_Timestamp", "IsDeleted", "Assignment_To", "AssignedTo_ProjectMemberID", "CMN_PRO_Product_Release_RefID", "PeersDevelopmentAssignmentID", "TMS_PRO_ProjectMemberID", "RecommendedTo_ProjectMemberID", "RecommendedTo_AccountID", "RecommendedTo_Username" }); while (reader.Read()) { L3DT_GDTIaSfDT_1654_raw resultItem = new L3DT_GDTIaSfDT_1654_raw(); //0:Parameter TMS_PRO_DeveloperTaskID of type Guid resultItem.TMS_PRO_DeveloperTaskID = reader.GetGuid(0); //1:Parameter DOC_Structure_Header_RefID of type Guid resultItem.DOC_Structure_Header_RefID = reader.GetGuid(1); //2:Parameter IdentificationNumber of type String resultItem.IdentificationNumber = reader.GetString(2); //3:Parameter Name of type String resultItem.Name = reader.GetString(3); //4:Parameter DeveloperTime_CurrentInvestment_min of type Double resultItem.DeveloperTime_CurrentInvestment_min = reader.GetDouble(4); //5:Parameter DeveloperTime_RequiredEstimation_min of type Double resultItem.DeveloperTime_RequiredEstimation_min = reader.GetDouble(5); //6:Parameter PercentageComplete of type Double resultItem.PercentageComplete = reader.GetDouble(6); //7:Parameter Description of type String resultItem.Description = reader.GetString(7); //8:Parameter Completion_Deadline of type DateTime resultItem.Completion_Deadline = reader.GetDate(8); //9:Parameter TMS_PRO_DeveloperTask_PriorityID of type Guid resultItem.TMS_PRO_DeveloperTask_PriorityID = reader.GetGuid(9); //10:Parameter Priority_Label of type Dict resultItem.Priority_Label = reader.GetDictionary(10); resultItem.Priority_Label.SourceTable = "tms_pro_developertask_priorities"; loader.Append(resultItem.Priority_Label); //11:Parameter Priority_IconLocationURL of type String resultItem.Priority_IconLocationURL = reader.GetString(11); //12:Parameter PriorityLevel of type String resultItem.PriorityLevel = reader.GetString(12); //13:Parameter TMS_PRO_DeveloperTask_TypeID of type Guid resultItem.TMS_PRO_DeveloperTask_TypeID = reader.GetGuid(13); //14:Parameter Type_Label of type Dict resultItem.Type_Label = reader.GetDictionary(14); resultItem.Type_Label.SourceTable = "tms_pro_developertask_types"; loader.Append(resultItem.Type_Label); //15:Parameter Type_IconLocationURL of type String resultItem.Type_IconLocationURL = reader.GetString(15); //16:Parameter IsIncompleteInformation of type bool resultItem.IsIncompleteInformation = reader.GetBoolean(16); //17:Parameter Creation_Timestamp of type DateTime resultItem.Creation_Timestamp = reader.GetDate(17); //18:Parameter IsArchived of type bool resultItem.IsArchived = reader.GetBoolean(18); //19:Parameter IsComplete of type bool resultItem.IsComplete = reader.GetBoolean(19); //20:Parameter Completion_Timestamp of type DateTime resultItem.Completion_Timestamp = reader.GetDate(20); //21:Parameter IsBeingPrepared of type bool resultItem.IsBeingPrepared = reader.GetBoolean(21); //22:Parameter Parent_RefID of type Guid resultItem.Parent_RefID = reader.GetGuid(22); //23:Parameter Project_RefID of type Guid resultItem.Project_RefID = reader.GetGuid(23); //24:Parameter CreatedBy_Username of type String resultItem.CreatedBy_Username = reader.GetString(24); //25:Parameter IsTaskEstimable of type bool resultItem.IsTaskEstimable = reader.GetBoolean(25); //26:Parameter TMS_PRO_DeveloperTask_InvolvementID of type Guid resultItem.TMS_PRO_DeveloperTask_InvolvementID = reader.GetGuid(26); //27:Parameter OrderSequence of type int resultItem.OrderSequence = reader.GetInteger(27); //28:Parameter IsActive of type bool resultItem.IsActive = reader.GetBoolean(28); //29:Parameter R_InvestedWorkingTime_min of type long resultItem.R_InvestedWorkingTime_min = reader.GetLong(29); //30:Parameter Developer_CompletionTimeEstimation_min of type long resultItem.Developer_CompletionTimeEstimation_min = reader.GetLong(30); //31:Parameter Assignment_Timestamp of type DateTime resultItem.Assignment_Timestamp = reader.GetDate(31); //32:Parameter IsDeleted of type bool resultItem.IsDeleted = reader.GetBoolean(32); //33:Parameter Assignment_To of type String resultItem.Assignment_To = reader.GetString(33); //34:Parameter AssignedTo_ProjectMemberID of type Guid resultItem.AssignedTo_ProjectMemberID = reader.GetGuid(34); //35:Parameter CMN_PRO_Product_Release_RefID of type Guid resultItem.CMN_PRO_Product_Release_RefID = reader.GetGuid(35); //36:Parameter PeersDevelopmentAssignmentID of type Guid resultItem.PeersDevelopmentAssignmentID = reader.GetGuid(36); //37:Parameter TMS_PRO_ProjectMemberID of type Guid resultItem.TMS_PRO_ProjectMemberID = reader.GetGuid(37); //38:Parameter RecommendedTo_ProjectMemberID of type Guid resultItem.RecommendedTo_ProjectMemberID = reader.GetGuid(38); //39:Parameter RecommendedTo_AccountID of type Guid resultItem.RecommendedTo_AccountID = reader.GetGuid(39); //40:Parameter RecommendedTo_Username of type String resultItem.RecommendedTo_Username = reader.GetString(40); results.Add(resultItem); } } catch (Exception ex) { reader.Close(); throw new Exception("Exception occured durng data retrieval in method cls_Get_DeveloperTaskInfo_and_Subscriptions_for_DTaskID", ex); } reader.Close(); //Load all the dictionaries from the datatables loader.Load(); returnStatus.Result = L3DT_GDTIaSfDT_1654_raw.Convert(results).FirstOrDefault(); return(returnStatus); }