예제 #1
0
        private static GeoLocation GetCloneOfOriginalGeoLocation(HumanCase humanCase)
        {
            GeoLocation originalGeoLocation = humanCase.PointGeoLocation;

            originalGeoLocation.idfsGeoLocationType = (long)GeoLocationTypeEnum.ExactPoint;
            GeoLocation cloneGeoLocation = originalGeoLocation.CloneWithSetup();

            if (humanCase.PointGeoLocation.IsNull)
            {
                cloneGeoLocation.Country = humanCase.Patient.CurrentResidenceAddress.Country;
                cloneGeoLocation.Region  = humanCase.Patient.CurrentResidenceAddress.Region;
                cloneGeoLocation.Rayon   = humanCase.Patient.CurrentResidenceAddress.Rayon;
            }
            return(cloneGeoLocation);
        }
예제 #2
0
        private void ValidateGeoLocation(GeoLocation originalGeoLocation, GeoLocation cloneGeoLocation, FormCollection formData)
        {
            using (GeoLocation tempGeoLocation = originalGeoLocation.CloneWithSetup())
            {
                ModifyOriginalGeoLocation(tempGeoLocation, cloneGeoLocation, formData);

                tempGeoLocation.Validation += hc_ValidationDetails;
                if (m_Validation == null)
                {
                    using (DbManagerProxy manager = DbManagerFactory.Factory.Create(EidssUserContext.Instance))
                    {
                        GeoLocation.Accessor acch = GeoLocation.Accessor.Instance(null);
                        acch.Validate(manager, tempGeoLocation, true, true, true);
                    }
                }
                tempGeoLocation.Validation -= hc_ValidationDetails;
            }
        }