Exemplo n.º 1
0
        private void DataPortal_Fetch()
        {
            var dal = new Dal.Counties();

            IsReadOnly = false;
            foreach (var item in dal.Get())
            {
                Add(DataPortal.FetchChild <CountyInfo>(item.Id, item.Name));
            }
            IsReadOnly = true;
        }
Exemplo n.º 2
0
        private void Child_Fetch(Dal.CaseDal data)
        {
            Id              = data.Id;
            MCMNumber       = data.MCMNumber;
            IntakeDate      = data.IntakeDate;
            LastSeen        = data.LastSeen;
            ReportedMissing = data.ReportedMissing;
            Age             = data.Age;
            Gender          = data.Gender;
            PeopleServed    = data.PeopleServed;
            City            = data.City;
            CountyId        = data.CountyId;
            State           = data.State;
            StartCaseType   = data.StartCaseType;
            EndCaseType     = data.EndCaseType;
            Disposition     = data.Disposition;
            CloseDate       = data.CloseDate;
            ReferralType    = data.ReferralType;
            CaseStatus      = data.CaseStatus;
            SchoolId        = data.SchoolId;

            var cdal = new Dal.Counties();
            var c    = cdal.Get(CountyId);

            if (c != null)
            {
                County = c.Name;
            }
            else
            {
                County = "n/a";
            }

            var sdal = new Dal.Schools();
            var s    = sdal.Get(SchoolId);

            if (s != null)
            {
                School = s.Name;
            }
            else
            {
                School = "n/a";
            }
        }
Exemplo n.º 3
0
        private void DataPortal_Fetch(int id)
        {
            var dal  = new Dal.Cases();
            var data = dal.Get(id);

            using (BypassPropertyChecks)
            {
                Csla.Data.DataMapper.Map(data, this);
                GetRaceEthnicityList(id, dal);
                GetVulnerabilityList(id, dal);
                GetCaseLawEnforcementList(id, dal);
            }

            var cdal = new Dal.Counties();
            var c    = cdal.Get(CountyId);

            if (c != null)
            {
                County = c.Name;
            }
            else
            {
                County = "n/a";
            }

            var sdal = new Dal.Schools();
            var s    = sdal.Get(SchoolId);

            if (s != null)
            {
                School = s.Name;
            }
            else
            {
                School = "n/a";
            }
        }