Пример #1
0
        ///<summary>
        /// Method Invocation of wrapper classes
        ///<summary>
        protected static FR_L6US_GDMDMDfAU_1802 Invoke(DbConnection Connection, DbTransaction Transaction, string ConnectionString, P_L6US_GDMDMDfAU_1802 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            bool cleanupConnection  = Connection == null;
            bool cleanupTransaction = Transaction == null;

            FR_L6US_GDMDMDfAU_1802 functionReturn = new FR_L6US_GDMDMDfAU_1802();

            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_DeveloperModuleDashboardMenuData_for_ActiveUser", ex);
            }
            return(functionReturn);
        }
Пример #2
0
        protected static FR_L6US_GDMDMDfAU_1802 Execute(DbConnection Connection, DbTransaction Transaction, P_L6US_GDMDMDfAU_1802 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            #region UserCode
            var returnValue = new FR_L6US_GDMDMDfAU_1802();
            //Put your code here
            returnValue.Result = new L6US_GDMDMDfAU_1802();


            #region ActiveTask
            P_L3DT_GADTfAU_1505 Parameter_ActiveTask = new P_L3DT_GADTfAU_1505();
            Parameter_ActiveTask.IsBeingPrepared_Only       = Parameter.IsBeingPrepared_Only;
            Parameter_ActiveTask.FeatureStatusExcluded      = Parameter.FeatureStatusDifferentFromThis;
            Parameter_ActiveTask.BusinessTaskStatusExcluded = Parameter.BusinessTaskStatusDifferentFromThis;
            Parameter_ActiveTask.ProjectStatusExcluded      = Parameter.ProjectStatusDifferenFromThis;
            returnValue.Result.ActiveTask = cls_Get_ActiveDeveloperTask_for_ActiveUser.Invoke(Connection, Transaction, Parameter_ActiveTask, securityTicket).Result;
            #endregion


            #region ProjectIDs
            P_L3PR_GPIDLfAUaRPL_1344 Paramater_Project = new P_L3PR_GPIDLfAUaRPL_1344();
            Paramater_Project.IsArchived      = Parameter.IsArchived;
            Paramater_Project.RightPackIDList = Parameter.RightPackIDList;
            List <L3PR_GPIDLfAUaRPL_1344> AvailableProjects = cls_Get_ProjectIDList_for_ActiveUser_and_RightPackageList.Invoke(Connection, Transaction, Paramater_Project, securityTicket).Result.ToList();
            #endregion

            if (AvailableProjects != null && AvailableProjects.Count > 0)
            {
                #region AssignedTasks
                P_L3DT_GADTLfAUaPL_1559 Parameter_AssignedTasks = new P_L3DT_GADTLfAUaPL_1559();
                Parameter_AssignedTasks.IsBeingPrepared_Only       = Parameter.IsBeingPrepared_Only;
                Parameter_AssignedTasks.ProjectID_List             = AvailableProjects.Select(p => p.Project_ID).ToArray();
                Parameter_AssignedTasks.FeatureStatusExcluded      = Parameter.FeatureStatusDifferentFromThis;
                Parameter_AssignedTasks.BusinessTaskStatusExcluded = Parameter.BusinessTaskStatusDifferentFromThis;
                Parameter_AssignedTasks.ProjectStatusExcluded      = Parameter.ProjectStatusDifferenFromThis;
                returnValue.Result.AssignedTasks = cls_Get_AssignedDeveloperTaskList_for_ActiveUser_and_ProjectList.Invoke(Connection, Transaction, Parameter_AssignedTasks, securityTicket).Result;
                #endregion

                #region CompletedTasks
                P_L3DT_GCDTfAUaPL_1610 Parameter_CompletedTasks = new P_L3DT_GCDTfAUaPL_1610();
                Parameter_CompletedTasks.ProjectID_List = AvailableProjects.Select(p => p.Project_ID).ToArray();
                returnValue.Result.CompletedTasks       = cls_Get_CompletedDeveloperTasks_for_ActiveUser_and_ProjectList.Invoke(Connection, Transaction, Parameter_CompletedTasks, securityTicket).Result;
                #endregion

                #region MentionedTasks
                P_L3DT_GDTIDwAUiM_1712 Parameter_MentionTasks = new P_L3DT_GDTIDwAUiM_1712();
                Parameter_MentionTasks.BusinessTaskStatusExcluded = Parameter.BusinessTaskStatusDifferentFromThis;
                Parameter_MentionTasks.FeatureStatusExcluded      = Parameter.FeatureStatusDifferentFromThis;
                Parameter_MentionTasks.ProjectStatusExcluded      = Parameter.ProjectStatusDifferenFromThis;
                returnValue.Result.MentionTasks = cls_Get_DeveloperTaskIDs_where_ActiveUser_is_Mentioned.Invoke(Connection, Transaction, Parameter_MentionTasks, securityTicket).Result;
                #endregion

                #region FreeTasks
                P_L3DT_GFDTLfAUIDaPL_1643 Parameter_FreeTasks = new P_L3DT_GFDTLfAUIDaPL_1643();
                Parameter_FreeTasks.IsBeingPrepared_Only       = Parameter.IsBeingPrepared_Only;
                Parameter_FreeTasks.ProjectID_List             = AvailableProjects.Select(p => p.Project_ID).ToArray();
                Parameter_FreeTasks.BusinessTaskStatusExcluded = Parameter.BusinessTaskStatusDifferentFromThis;
                Parameter_FreeTasks.FeatureStatusExcluded      = Parameter.FeatureStatusDifferentFromThis;
                Parameter_FreeTasks.ProjectStatusExcluded      = Parameter.ProjectStatusDifferenFromThis;
                returnValue.Result.FreeTasks = cls_Get_FreeDeveloperTasksList_for_ActiveUser_and_ProjectList.Invoke(Connection, Transaction, Parameter_FreeTasks, securityTicket).Result;
                #endregion

                #region RecommendedTasks
                P_L3DT_GRDTLfAU_1408 Parameter_RecommendedTasks = new P_L3DT_GRDTLfAU_1408();
                Parameter_RecommendedTasks.BusinessTaskStatusExcluded = Parameter.BusinessTaskStatusDifferentFromThis;
                Parameter_RecommendedTasks.FeatureStatusExcluded      = Parameter.FeatureStatusDifferentFromThis;
                Parameter_RecommendedTasks.ProjectStatusExcluded      = Parameter.ProjectStatusDifferenFromThis;
                Parameter_RecommendedTasks.IsBeingPrepared_Only       = Parameter.IsBeingPrepared_Only;
                Parameter_RecommendedTasks.ProjectID_List             = AvailableProjects.Select(p => p.Project_ID).ToArray();
                returnValue.Result.RecomendedTasks = cls_Get_RecommendedDeveloperTaskList_for_ActiveUser.Invoke(Connection, Transaction, Parameter_RecommendedTasks, securityTicket).Result;
                #endregion
            }

            //Updated independently
            //#region InvestedTime
            //returnValue.Result.CurrentDayWorkTime = cls_Get_Invested_Working_Time_for_Today.Invoke(Connection, Transaction, securityTicket).Result.ToArray();
            //#endregion

            return(returnValue);

            #endregion UserCode
        }