예제 #1
0
 public void UndoEntityResponse(ScreeningRequestEntityResponse response)
 {
     if (response != null)
     {
         response.Archive = true;
     }
 }
예제 #2
0
        public ScreeningRequestEntityResponse SetEntityResponse(Request request, ScreeningEntity entity)
        {
            IDictionary <string, object> criteria = new Dictionary <string, object>();

            criteria.Add("Request", request);
            criteria.Add("ScreeningEntity", entity);
            ScreeningRequestEntityResponse response = this.srerRepo.FindOne(criteria);  // unique index exists over these two columns

            if (response != null)
            {
                response.Archive = false;
            }
            else
            {
                response                 = new ScreeningRequestEntityResponse();
                response.Request         = request;
                response.ScreeningEntity = entity;
            }
            response.ResponseDateTime = DateTime.Now;
            return(this.srerRepo.SaveOrUpdate(response));
        }