private void DataPortal_Delete(int id) { var dal = new Dal.Schools(); using (BypassPropertyChecks) { dal.Delete(id); } }
private void DataPortal_Fetch(int id) { var dal = new Dal.Schools(); var data = dal.Get(id); using (BypassPropertyChecks) { Id = data.Id; Name = data.Name; } }
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; }
protected override void DataPortal_Update() { var dal = new Dal.Schools(); using (BypassPropertyChecks) { var data = new Dal.SchoolDal { Id = Id, Name = Name }; dal.Update(data); } }
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; } }
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"; } }
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"; } }