コード例 #1
0
 /// <summary>
 /// Creates a new instance of <see cref="SiteVisit"/> with instantiated members.
 /// </summary>
 public SiteVisit()
 {
     SupplementalObservations = new List <SupplementalObservation>();
     PointSurveys             = new List <FiftyMeterPointSurvey>();
     StartConditions          = new SiteCondition();
     EndConditions            = new SiteCondition();
     IsDataEntryComplete      = false;
 }
コード例 #2
0
        /// <summary>
        /// Factory method for creating a new Conditions object, automatically setting a new Guid for the identifier.
        /// </summary>
        /// <param name="siteVisitId">The site visit id.</param>
        /// <returns>Instance of SiteVisit</returns>
        public static SiteCondition CreateNewConditions(Guid siteVisitId)
        {
            SiteCondition s = new SiteCondition()
            {
                SiteVisitId = siteVisitId
            };

            s.SetNewId();

            return(s);
        }
コード例 #3
0
        /// <summary>
        /// Factory method for creating a new SiteVisit object, automatically setting a new Guid for the identifier.
        /// </summary>
        /// <param name="siteId">The site id.</param>
        /// <returns>Instance of SiteVisit</returns>
        public static SiteVisit CreateNewSiteVisit(Guid siteId)
        {
            SiteVisit s = new SiteVisit()
            {
                LocationId = siteId
            };

            s.SetNewId();

            s.StartConditions = SiteCondition.CreateNewConditions(s.Id);
            s.EndConditions   = SiteCondition.CreateNewConditions(s.Id);

            return(s);
        }