Esempio n. 1
0
 public RequestView(REQUEST request, 
     User submittedBy,
     User requestedBy,
     User assignedTo,
     IList<ElementView> elements,
     LookupActive requestCategory,
     SupportArea supportArea,
     ProjectView project,
     Program program,
     ValueDriver valueDriver,
     LookupSorted requestStatus,
     LookupActive requestType,
     decimal? internalHoursMultiplier,
     decimal? externalHoursMultiplier)
     : base(request, 
             submittedBy, 
             requestedBy,
             supportArea,
             program,
             valueDriver,
             requestStatus,
             requestType,
             internalHoursMultiplier,
             externalHoursMultiplier,
             assignedTo)
 {
     this.RequestCategory = requestCategory;
     this.Parent = project;
     this.ElementList = elements == null ? new List<ElementView>() : elements;
     this.Resolution = request.RESOLUTION;
     this.ITFeatures = request.IT_FEATURE;
     this.TopOffnetAttributeNumber = request.TOP_OFFNET_ATTRIBUTE_NUMBER;
 }
Esempio n. 2
0
 /// <summary>
 /// Used for creating requests that exist in the data store
 /// </summary>
 /// <param name="request">The Server based object of request</param>
 public Request(REQUEST request)
     : base(request.REQUEST_ID,
                                        request.REQUEST_STATUS_ID,
                                        request.REQUESTED_BY_ID,
                                        request.SUBMITTED_BY_ID,
                                        request.SUBMITTED_DATE,
                                        request.REQUESTED_DUE_DATE,
                                        request.ESTIMATED_DUE_DATE,
                                        request.MANAGER_QUEUE_DATE,
                                        request.MANAGER_APPROVED_DATE,
                                        request.HOLD_DATE,
                                        request.RESUME_DATE,
                                        request.CLOSED_DATE,
                                        request.LAST_UPDATED_DATE,
                                        request.REQUEST_SUMMARY,
                                        request.REQUEST_DESCRIPTION,
                                        request.REQUEST_TYPE_ID,
                                        request.PROGRAM_ID,
                                        (int)request.SUPPORT_AREA_ID,
                                        (int)request.VALUE_DRIVER_ID,
                                        (decimal)request.VALUE,
                                        request.ESTIMATED_HOURS,
                                        request.ESTIMATED_COST,
                                        request.VALUE_REASON,
                                        request.MANAGER_NOTE)
 {
     setStatusID(request.REQUEST_STATUS_ID);
     this.AssignedTo = request.ASSIGNED_TO_ID;
     this.ProjectID = request.PARENT_PROJECT_ID;
     this.Resolution = request.RESOLUTION;
     this.ITFeature = request.IT_FEATURE;
     this.TopOffnetAttribute = request.TOP_OFFNET_ATTRIBUTE_NUMBER;
 }
Esempio n. 3
0
 public AProjectView(REQUEST request,
     User submittedBy,
     User requestedBy,
     SupportArea supportArea,
     Program program,
     ValueDriver valueDriver,
     LookupSorted requestStatus,
     LookupActive requestType,
     decimal? internalHoursMultipleir,
     decimal? externalHoursMultiplier,
     User assignedTo)
     : base(request.REQUEST_ID, 
             requestStatus, 
             request.SUBMITTED_DATE, 
             request.CLOSED_DATE, 
             request.LAST_UPDATED_DATE, 
             request.REQUEST_SUMMARY)
 {
     createDetails (requestedBy,
                     submittedBy,
                     requestType,
                     supportArea,
                     valueDriver,
                     request.REQUESTED_DUE_DATE,
                     request.ESTIMATED_DUE_DATE,
                     request.HOLD_DATE,
                     request.RESUME_DATE,
                     request.MANAGER_QUEUE_DATE,
                     request.MANAGER_APPROVED_DATE,
                     request.ESTIMATED_HOURS,
                     (decimal)request.VALUE,
                     request.ESTIMATED_COST,
                     request.ACTUAL_COST,
                     request.REQUEST_DESCRIPTION,
                     request.VALUE_REASON,
                     request.MANAGER_NOTE,
                     program,
                     internalHoursMultipleir,
                     externalHoursMultiplier,
                     assignedTo);
 }
Esempio n. 4
0
        private RequestView convertRequest(REQUEST request)
        {
            UserMgr userMgr = new UserMgr(MainFactory.getUserSvc());
            LookupMgr lookupMgr = new LookupMgr(this.svc);
            Configuration config = MainFactory.getConfiguration();
            RequestView r = new RequestView(request,
                                    (User)userMgr.getUser(request.SUBMITTED_BY_ID),
                                    (User)userMgr.getUser(request.REQUESTED_BY_ID),
                                    (User)userMgr.getUser((int)request.ASSIGNED_TO_ID),
                                    null,
                                    lookupMgr.getRequestCategories(false).Where(x => x.ID == request.REQUEST_CATEGORY_ID).FirstOrDefault(),
                                    lookupMgr.getSupportAreas().Where(x => x.ID == request.SUPPORT_AREA_ID).FirstOrDefault(),
                                    null,
                                    lookupMgr.getPrograms().Where(x => x.ID == request.PROGRAM_ID).Cast<Program>().FirstOrDefault(),
                                    lookupMgr.getValueDrivers().Where(x => x.ID == request.VALUE_DRIVER_ID).Cast<ValueDriver>().FirstOrDefault(),
                                    this.requestStatusList.Data.Where(x => x.ID == request.REQUEST_STATUS_ID).FirstOrDefault(),
                                    lookupMgr.getRequestTypes(EOpenType.Request, false).Where(x => x.ID == request.REQUEST_TYPE_ID).FirstOrDefault(),
                                    Decimal.Parse((string)config.get("HoursCostMultiplierInternal")),
                                    Decimal.Parse((string)config.get("HoursCostMultiplierExternal")));

            return r;
        }
Esempio n. 5
0
 partial void UpdateREQUEST(REQUEST instance);
Esempio n. 6
0
 partial void DeleteREQUEST(REQUEST instance);
Esempio n. 7
0
		private void detach_REQUESTs(REQUEST entity)
		{
			this.SendPropertyChanging();
			entity.PROJECT = null;
		}
Esempio n. 8
0
 partial void InsertREQUEST(REQUEST instance);
Esempio n. 9
0
		private void attach_REQUESTs(REQUEST entity)
		{
			this.SendPropertyChanging();
			entity.PROJECT = this;
		}
Esempio n. 10
0
		private void detach_REQUESTs(REQUEST entity)
		{
			this.SendPropertyChanging();
			entity.VALUE_DRIVER = null;
		}
Esempio n. 11
0
		private void detach_REQUESTs(REQUEST entity)
		{
			this.SendPropertyChanging();
			entity.REQUEST_CATEGORY = null;
		}
Esempio n. 12
0
		private void attach_REQUESTs(REQUEST entity)
		{
			this.SendPropertyChanging();
			entity.REQUEST_TYPE = this;
		}
Esempio n. 13
0
		private void detach_REQUESTs(REQUEST entity)
		{
			this.SendPropertyChanging();
			entity.SUPPORT_AREA = null;
		}