Esempio n. 1
0
        public virtual DateTime?GetLatestScreeningDate()
        {
            if (this.RequestHistories != null && this.RequestHistories.Count > 0)
            {
                RequestHistory latest = (from rh in this.RequestHistories
                                         where new string[] {
                    RequestStatus.NAME_CREATED,
                    RequestStatus.NAME_SENT_FOR_VALIDATION,
                    RequestStatus.NAME_SENT_FOR_SCREENING,
                    RequestStatus.NAME_SCREENING_IN_PROGRESS,
                    RequestStatus.NAME_SENT_FOR_CONSOLIDATION
                }.Contains(rh.RequestStatus.RequestStatusName)
                                         orderby rh.DateStatusReached descending
                                         select rh).First <RequestHistory>();

                if (latest == this.MostRecentHistory)
                {
                    return(DateTime.Now);
                }
                else
                {
                    return(latest.DateStatusReached);
                }
            }
            return(null);
        }
Esempio n. 2
0
 public virtual void AddHistory(RequestHistory rh)
 {
     if (!this.RequestHistories.Contains(rh))
     {
         this.RequestHistories.Add(rh);
     }
 }
Esempio n. 3
0
        public virtual DateTime GetCreatedDate()
        {
            RequestHistory createdHistory = this.GetHistory(RequestStatus.NAME_CREATED);

            if (createdHistory != null)
            {
                return(createdHistory.DateStatusReached);
            }
            return(default(DateTime));
        }