Example #1
0
 private void DataPortal_DeleteSelf([Inject] ISalesOrderTypeDal dal)
 {
     using (BypassPropertyChecks)
         DataPortal_Delete(new Criteria {
             SalesOrderTypeKey = this.SalesOrderTypeKey
         }, dal);
 }
Example #2
0
        private void DataPortal_Fetch(Criteria criteria, [Inject] ISalesOrderTypeDal dal)
        {
            BusinessRules.CascadeOnDirtyProperties = true;
            var dto = dal.Fetch(criteria.SalesOrderTypeKey);

            FetchObject(dto);
        }
Example #3
0
        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;
        }
Example #5
0
        private void DataPortal_Fetch(Criteria criteria, [Inject] ISalesOrderTypeDal dal)
        {
            var dto = dal.Fetch(criteria.SalesOrderTypeKey);

            FetchObject(dto);
        }
Example #6
0
 private void DataPortal_Execute([Inject] ISalesOrderTypeDal dal)
 {
     Exists = dal.Exists(SalesOrderTypeId);
 }
Example #7
0
 private void DataPortal_Execute([Inject] ISalesOrderTypeDal dal)
 {
     Key = dal.GetKey(SalesOrderTypeId);
 }
Example #8
0
 private void DataPortal_Delete(Criteria criteria, [Inject] ISalesOrderTypeDal dal)
 {
     dal.Delete(criteria.SalesOrderTypeKey);
 }