private void DataPortal_DeleteSelf([Inject] ISalesOrderTypeDal dal) { using (BypassPropertyChecks) DataPortal_Delete(new Criteria { SalesOrderTypeKey = this.SalesOrderTypeKey }, dal); }
private void DataPortal_Fetch(Criteria criteria, [Inject] ISalesOrderTypeDal dal) { BusinessRules.CascadeOnDirtyProperties = true; var dto = dal.Fetch(criteria.SalesOrderTypeKey); FetchObject(dto); }
private void DataPortal_Insert([Inject] ISalesOrderTypeDal dal) { CreatedByUserKey = Helpers.GetCurrentUserKey(); CreatedByUserId = Csla.ApplicationContext.User.Identity.Name; using (BypassPropertyChecks) { var result = dal.Insert(CreatedByUserKey, Name, SalesOrderTypeId, SalesOrderTypeValue); SalesOrderTypeKey = result.Key; LastChanged = result.LastChanged; } FieldManager.UpdateChildren(this); }
private void DataPortal_Fetch([Inject] ISalesOrderTypeDal dal) { var rlce = RaiseListChangedEvents; RaiseListChangedEvents = false; IsReadOnly = false; var data = dal.FetchList(); foreach (var dto in data) { var item = DataPortal.FetchChild <SalesOrderTypeInfo>(dto); Add(item); } IsReadOnly = true; RaiseListChangedEvents = rlce; }
private void DataPortal_Fetch(Criteria criteria, [Inject] ISalesOrderTypeDal dal) { var dto = dal.Fetch(criteria.SalesOrderTypeKey); FetchObject(dto); }
private void DataPortal_Execute([Inject] ISalesOrderTypeDal dal) { Exists = dal.Exists(SalesOrderTypeId); }
private void DataPortal_Execute([Inject] ISalesOrderTypeDal dal) { Key = dal.GetKey(SalesOrderTypeId); }
private void DataPortal_Delete(Criteria criteria, [Inject] ISalesOrderTypeDal dal) { dal.Delete(criteria.SalesOrderTypeKey); }