예제 #1
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);
        }
예제 #2
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);
        }