예제 #1
0
        public List <WorkItemModel> MyWorkItems()
        {
            var locallist = new List <WorkItemModel>();

            var localcontext = new METEntities();

            var items = localcontext.T_WORK_ITEM.Take(50);

            foreach (var item in items)
            {
                var newModel = new WorkItemModel();
                newModel.RELEASE_SEQ     = item.RELEASE_SEQ;
                newModel.SPRINT_SEQ      = item.SPRINT_SEQ;
                newModel.SYSTEM_SEQ      = item.SYSTEM_SEQ;
                newModel.TFS_WI_ID       = item.TFS_WI_ID;
                newModel.TFS_WI_SEVERITY = item.TFS_WI_SEVERITY;
                newModel.TITLE           = item.TITLE;
                newModel.TOTAL_DES_HOURS = item.TOTAL_DES_HOURS;
                newModel.TOTAL_DEV_HOURS = item.TOTAL_DEV_HOURS;
                newModel.TOTAL_HOURS     = item.TOTAL_HOURS;
                newModel.TYPE            = item.TYPE;
                newModel.UPDTD_BY        = item.UPDTD_BY;
                newModel.UPDTD_DTE       = item.UPDTD_DTE;
                newModel.WORK_ITEM_SEQ   = item.WORK_ITEM_SEQ;
                newModel.STATUS_CDE      = item.T_ASSIGNMENTS.OrderByDescending(x => x.UPDTD_DTE).FirstOrDefault() != null?item.T_ASSIGNMENTS.OrderByDescending(x => x.UPDTD_DTE).FirstOrDefault().STATUS_CDE : 0;

                locallist.Add(newModel);
            }

            return(locallist);
        }
예제 #2
0
        public List <WorkItemModel> WorkItemListBySprintSeq(long sprintSeq)
        {
            var locallist = new List <WorkItemModel>();

            var localcontext = new METEntities();

            var items = localcontext.T_WORK_ITEM.Where(y => y.SPRINT_SEQ == sprintSeq);

            foreach (var item in items)
            {
                var newModel = new WorkItemModel();
                newModel.RELEASE_SEQ = item.RELEASE_SEQ;
                newModel.SPRINT_SEQ  = item.SPRINT_SEQ;
                //newModel.SYSTEM_SEQ = item.SYSTEM_SEQ;
                newModel.TFS_WI_ID       = item.TFS_WI_ID;
                newModel.TFS_WI_SEVERITY = item.TFS_WI_SEVERITY;
                //newModel.TITLE = item.TITLE;
                //newModel.TOTAL_DES_HOURS = item.TOTAL_DES_HOURS;
                //newModel.TOTAL_DEV_HOURS = item.TOTAL_DEV_HOURS;
                //newModel.TOTAL_HOURS = item.TOTAL_HOURS;
                newModel.TYPE = item.TYPE;
                //newModel.UPDTD_BY = item.UPDTD_BY;
                //newModel.UPDTD_DTE = item.UPDTD_DTE;
                newModel.WORK_ITEM_SEQ = item.WORK_ITEM_SEQ;
                //newModel.STATUS_CDE = item.T_ASSIGNMENTS.OrderByDescending(x => x.UPDTD_DTE).FirstOrDefault() != null ? item.T_ASSIGNMENTS.OrderByDescending(x => x.UPDTD_DTE).FirstOrDefault().STATUS_CDE : 0;
                //newModel.Assignments = item.T_ASSIGNMENTS.OrderByDescending(x => x.UPDTD_DTE).ToList();

                locallist.Add(newModel);
            }

            return(locallist);
        }
예제 #3
0
        public ReleaseModel GetReleaseDetailsBySeq(long seq)
        {
            var context = new METEntities();

            var workitemModel = new WorkItemModel();

            var sprintModel = new SprintModel();

            var myRelease = context.T_RELEASE.Where(x => x.RELEASE_SEQ == seq).FirstOrDefault();

            var newModel = new ReleaseModel();

            if (myRelease != null)
            {
                newModel.WorkItems                 = workitemModel.WorkItemListByReleaseSeq(seq);
                newModel.RELEASE_NBR               = myRelease.RELEASE_NBR;
                newModel.RELEASE_SEQ               = myRelease.RELEASE_SEQ;
                newModel.NBR_PLAYBOOK              = myRelease.NBR_PLAYBOOK;
                newModel.NBR_ENVIRONMENT           = myRelease.NBR_ENVIRONMENT;
                newModel.NBR_BUILDS                = myRelease.NBR_BUILDS;
                newModel.NBR_DEPLOYMENTS           = myRelease.NBR_DEPLOYMENTS;
                newModel.NBR_PLAYBOOK_MEETING      = myRelease.NBR_PLAYBOOK_MEETING;
                newModel.NBR_DB_REFRESH            = myRelease.NBR_DB_REFRESH;
                newModel.NBR_SECURITY_SUPPORT_HOUR = myRelease.NBR_SECURITY_SUPPORT_HOUR;
                newModel.NBR_LOAD_TEST             = myRelease.NBR_LOAD_TEST;
                newModel.NBR_BATCH_VOLUME_TEST     = myRelease.NBR_BATCH_VOLUME_TEST;
                newModel.NBR_SECURITY_TEST         = myRelease.NBR_SECURITY_TEST;
                newModel.NBR_DESIGN_SESSION        = myRelease.NBR_DESIGN_SESSION;
                newModel.NBR_ARCHITECTURE_REVIEW   = myRelease.NBR_ARCHITECTURE_REVIEW;

                newModel.NoOfWorkItems        = newModel.WorkItems.ToList().Count;
                newModel.TotalEffortHours     = newModel.WorkItems.Sum(x => x.TOTAL_HOURS);
                newModel.NoOfPendingWokrItems = myRelease.T_WORK_ITEM.Select(x => x.T_ASSIGNMENTS.Where(y => y.STATUS_CDE != StatusCodeAssigned)).Count();
                newModel.NoOfSprints          = myRelease.T_SPRINT.Count;
                newModel.Sprints = sprintModel.GetSprintsByRelSeq(seq);
            }


            return(newModel);
        }
예제 #4
0
        public List <ReleaseModel> GetReleaseUserAccessListByUserSeq(long seq)
        {
            var context = new METEntities();

            var list = new List <ReleaseModel>();

            var workitemModel = new WorkItemModel();

            var myReleases = context.T_RELEASE_USER_ACCESS.Where(x => x.USER_SEQ == seq);

            foreach (var item in myReleases)
            {
                var newModel = new ReleaseModel();

                newModel.NoOfWorkItems = workitemModel.WorkItemListByReleaseSeq(item.RELEASE_SEQ).Count;
                newModel.RELEASE_NBR   = item.T_RELEASE.RELEASE_NBR;
                newModel.RELEASE_SEQ   = item.T_RELEASE.RELEASE_SEQ;

                list.Add(newModel);
            }

            return(list);
        }
예제 #5
0
        public List <SprintModel> GetSprintsByRelSeq(long seq)
        {
            var context = new METEntities();

            var sprintList = new List <SprintModel>();

            var dbSprints = context.T_SPRINT.Where(x => x.RELEASE_SEQ == seq).ToList();

            var workitemModel = new WorkItemModel();

            foreach (var item in dbSprints)
            {
                var localItem = new SprintModel();

                localItem.SPRINT_NAME      = item.SPRINT_NAME;
                localItem.SPRINT_SEQ       = item.SPRINT_SEQ;
                localItem.NBR_STORY_POINTS = item.NBR_STORY_POINTS;
                localItem.SprintWorkItems  = workitemModel.WorkItemListBySprintSeq(item.SPRINT_SEQ);

                sprintList.Add(localItem);
            }

            return(sprintList);
        }