Exemplo n.º 1
0
        private void DataPortal_Delete(int id)
        {
            var dal = new Dal.Schools();

            using (BypassPropertyChecks)
            {
                dal.Delete(id);
            }
        }
Exemplo n.º 2
0
        private void DataPortal_Fetch(int id)
        {
            var dal  = new Dal.Schools();
            var data = dal.Get(id);

            using (BypassPropertyChecks)
            {
                Id   = data.Id;
                Name = data.Name;
            }
        }
Exemplo n.º 3
0
        private void DataPortal_Fetch()
        {
            var dal = new Dal.Schools();

            IsReadOnly = false;
            foreach (var item in dal.Get())
            {
                Add(DataPortal.FetchChild <SchoolInfo>(item.Id, item.Name));
            }
            IsReadOnly = true;
        }
Exemplo n.º 4
0
        protected override void DataPortal_Update()
        {
            var dal = new Dal.Schools();

            using (BypassPropertyChecks)
            {
                var data = new Dal.SchoolDal {
                    Id = Id, Name = Name
                };
                dal.Update(data);
            }
        }
Exemplo n.º 5
0
        protected override void DataPortal_Insert()
        {
            var dal = new Dal.Schools();

            using (BypassPropertyChecks)
            {
                var data = new Dal.SchoolDal {
                    Name = Name
                };
                var newId = dal.Insert(data);
                Id = newId;
            }
        }
Exemplo n.º 6
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.º 7
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";
            }
        }