public ElementView(ELEMENT element, IList<Note> noteList, IUser assignedTo, LookupSorted elementStatus, RequestView parent) : base(element.ELEMENT_ID, elementStatus, element.ASSIGNED_DATE, element.CLOSED_DATE, element.LAST_UPDATED_DATE, element.ELEMENT_SUMMARY) { this.AssignedTo = (User)assignedTo; this.Parent = parent; this.percentComplete = element.PERCENT_COMPLETE; this.hours = element.HOURS; this.Resolution = element.RESOLUTION; this.Note = noteList == null ? new List<Note>() : noteList; }
partial void DeleteELEMENT(ELEMENT instance);
private ElementView convertElement(ELEMENT element) { // find parent Request RequestView parentRequest = getRequest(element.PARENT_REQUEST_ID); if (parentRequest == null) throw new NullReferenceException("Unable to find the parent request of the element: " + element.ELEMENT_SUMMARY); UserMgr userMgr = new UserMgr(MainFactory.getUserSvc()); return new ElementView(element, null, userMgr.getUser(element.ASSIGNED_TO_ID), this.elementStatusList.Data.Where(x => x.ID == element.ELEMENT_STATUS_ID).FirstOrDefault(), parentRequest); }
partial void UpdateELEMENT(ELEMENT instance);
partial void InsertELEMENT(ELEMENT instance);
private void detach_ELEMENTs(ELEMENT entity) { this.SendPropertyChanging(); entity.ELEMENT_STATUS = null; }
private void detach_ELEMENTs(ELEMENT entity) { this.SendPropertyChanging(); entity.REQUEST = null; }
private void attach_ELEMENTs(ELEMENT entity) { this.SendPropertyChanging(); entity.REQUEST = this; }