private void DataPortal_Delete(int id) { var dal = new Dal.Cases(); using (BypassPropertyChecks) { dal.Delete(id); } }
private void GetRaceEthnicityList(int id, Dal.Cases dal) { RaceEthnicityList.Clear(); var raceEthnicityList = dal.GetRaceEthnicity(id); if (raceEthnicityList != null) { RaceEthnicityList.AddRange(raceEthnicityList); } }
private void GetVulnerabilityList(int id, Dal.Cases dal) { VulnerabilityList.Clear(); var vulnerabilityList = dal.GetVulnerabilities(id); if (vulnerabilityList != null) { VulnerabilityList.AddRange(vulnerabilityList); } }
private void GetCaseLawEnforcementList(int id, Dal.Cases dal) { CaseLawEnforcementList.Clear(); var caseLawEnforcementList = dal.GetCaseLawEnforcementList(id); if (caseLawEnforcementList != null) { CaseLawEnforcementList.AddRange(caseLawEnforcementList.Select(r => new NameValueListBase <int, bool> .NameValuePair(r.AgencyId, r.Denial))); } }
private void DataPortal_Fetch() { var dal = new Dal.Cases(); IsReadOnly = false; foreach (var item in dal.Get()) { Add(DataPortal.FetchChild <CaseInfo>(item)); } IsReadOnly = true; }
protected override void DataPortal_Update() { var dal = new Dal.Cases(); using (BypassPropertyChecks) { var data = new Dal.CaseDal(); Csla.Data.DataMapper.Map(this, data, ignoreList); dal.Update(data, RaceEthnicityList, VulnerabilityList, CaseLawEnforcementList.Select(r => new Dal.CaseLawEnforcementDal { AgencyId = r.Key, Denial = r.Value }).ToList()); } }
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"; } }