private void DataPortal_Delete(int id) { var dal = new Dal.LawEnforcement(); using (BypassPropertyChecks) { dal.Delete(id); } }
private void DataPortal_Fetch(int id) { var dal = new Dal.LawEnforcement(); var data = dal.Get(id); using (BypassPropertyChecks) { Id = data.Id; Agency = data.Agency; } }
protected override void DataPortal_Update() { var dal = new Dal.LawEnforcement(); using (BypassPropertyChecks) { var data = new Dal.AgencyDal { Id = Id, Agency = Agency }; dal.Update(data); } }
private void DataPortal_Fetch() { var dal = new Dal.LawEnforcement(); IsReadOnly = false; Add(DataPortal.FetchChild <LawEnforcementInfo>(0, "none")); foreach (var item in dal.Get()) { Add(DataPortal.FetchChild <LawEnforcementInfo>(item.Id, item.Agency)); } IsReadOnly = true; }
protected override void DataPortal_Insert() { var dal = new Dal.LawEnforcement(); using (BypassPropertyChecks) { var data = new Dal.AgencyDal { Agency = Agency }; var newId = dal.Insert(data); Id = newId; } }