protected static FR_L6US_GUWTfD_1532_Array Execute(DbConnection Connection, DbTransaction Transaction, P_L6US_GUWTfD_1532 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { #region UserCode var returnValue = new FR_L6US_GUWTfD_1532_Array(); List <L6US_GUWTfD_1532> tempResult = new List <L6US_GUWTfD_1532>(); #region Reported work times P_L6QT_GQTIWTfAUaST_1046 Parameter_ReportedTimes = new P_L6QT_GQTIWTfAUaST_1046(); Parameter_ReportedTimes.StartDate = Parameter.StartDate; var ReportedTimes_Result = cls_Get_QuickTaskInvestedWorkTimes_for_ActiveUser_and_Date.Invoke(Connection, Transaction, Parameter_ReportedTimes, securityTicket); if (ReportedTimes_Result.Status == FR_Status.Success && ReportedTimes_Result.Result != null && ReportedTimes_Result.Result.Count() > 0) { foreach (var currentReportedTime in ReportedTimes_Result.Result) { L6US_GUWTfD_1532 tempResultItem = new L6US_GUWTfD_1532(); tempResultItem.SourceItem_ID = currentReportedTime.TMS_QuickTaskID; tempResultItem.SourceItem_Name = null; tempResultItem.SourceItem_Name_Dict = currentReportedTime.QuickTask_Title; tempResultItem.SourceItem_Description = null; tempResultItem.SourceItem_Description_Dict = currentReportedTime.QuickTask_Description; tempResultItem.SourceItem_IdentificationNumber = "W" + currentReportedTime.IdentificationNumber; tempResultItem.SourceItem_ParentProjectID = currentReportedTime.TMS_PRO_ProjectID; tempResultItem.SourceItem_ParentProjectName = currentReportedTime.Project_Name; tempResultItem.SourceItem_StartTime = currentReportedTime.QuickTask_StartTime; tempResultItem.SourceItem_TypeRefID = currentReportedTime.QuickTask_Type_RefID; tempResultItem.SourceItem_WorkTimeDuration = currentReportedTime.R_QuickTask_InvestedTime_min; tempResult.Add(tempResultItem); } } #endregion #region Developer Task related work times P_L6DT_GDTIWTfAUaST_1046 Parameter_DeveloperTaskTimes = new P_L6DT_GDTIWTfAUaST_1046(); Parameter_DeveloperTaskTimes.StartDate = Parameter.StartDate; var DeveloperTaskTimes_Result = cls_Get_DeveloperTaskInvestedWorkTime_for_ActiveAcount_and_Date.Invoke(Connection, Transaction, Parameter_DeveloperTaskTimes, securityTicket); if (DeveloperTaskTimes_Result.Status == FR_Status.Success && DeveloperTaskTimes_Result.Result != null && DeveloperTaskTimes_Result.Result.Count() > 0) { foreach (var currentDeveloperTaskTime in DeveloperTaskTimes_Result.Result) { L6US_GUWTfD_1532 tempResultItem = new L6US_GUWTfD_1532(); tempResultItem.SourceItem_Description = currentDeveloperTaskTime.DeveloperTask_Description; tempResultItem.SourceItem_Description_Dict = null; tempResultItem.SourceItem_ID = currentDeveloperTaskTime.TMS_PRO_DeveloperTaskID; tempResultItem.SourceItem_IdentificationNumber = "D" + currentDeveloperTaskTime.IdentificationNumber; tempResultItem.SourceItem_Name = currentDeveloperTaskTime.DeveloperTask_Name; tempResultItem.SourceItem_Name_Dict = null; tempResultItem.SourceItem_ParentProjectID = currentDeveloperTaskTime.TMS_PRO_ProjectID; tempResultItem.SourceItem_ParentProjectName = currentDeveloperTaskTime.Project_Name; tempResultItem.SourceItem_StartTime = currentDeveloperTaskTime.WorkTime_Start; tempResultItem.SourceItem_TypeRefID = currentDeveloperTaskTime.DeveloperTask_Type_RefID; tempResultItem.SourceItem_WorkTimeDuration = currentDeveloperTaskTime.WorkTime_Amount_min; tempResult.Add(tempResultItem); } } #endregion returnValue.Result = tempResult.OrderBy(item => item.SourceItem_StartTime).ToArray(); return(returnValue); #endregion UserCode }
///<summary> /// Invokes the method for the given Connection, and Transaction, leaving them open/not commited if no exceptions occured ///<summary> public static FR_L6US_GUWTfD_1532_Array Invoke(DbConnection Connection, DbTransaction Transaction, P_L6US_GUWTfD_1532 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { return(Invoke(Connection, Transaction, null, Parameter, securityTicket)); }
///<summary> /// Method Invocation of wrapper classes ///<summary> protected static FR_L6US_GUWTfD_1532_Array Invoke(DbConnection Connection, DbTransaction Transaction, string ConnectionString, P_L6US_GUWTfD_1532 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { bool cleanupConnection = Connection == null; bool cleanupTransaction = Transaction == null; FR_L6US_GUWTfD_1532_Array functionReturn = new FR_L6US_GUWTfD_1532_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_UserWorkTime_for_Date", ex); } return(functionReturn); }
///<summary> /// Opens the connection/transaction for the given connectionString, and closes them when complete ///<summary> public static FR_L6US_GUWTfD_1532_Array Invoke(string ConnectionString, P_L6US_GUWTfD_1532 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { return(Invoke(null, null, ConnectionString, Parameter, securityTicket)); }