Ejemplo n.º 1
0
 private void loginWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     MUserEntity MUser = new MUserEntity(Kalibrasi.global_variable.global.gcUSERID);
     Kalibrasi.global_variable.global.gcPASSWORD = MUser.CPassword;
 }
Ejemplo n.º 2
0
        /// <summary> Initializes the class members</summary>
        private void InitClassMembers()
        {
            _muser = null;
            _muserReturnsNewIfNotFound = true;
            _alwaysFetchMuser = false;
            _alreadyFetchedMuser = false;

            PerformDependencyInjection();

            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END

            OnInitClassMembersComplete();
        }
Ejemplo n.º 3
0
 /// <summary> setups the sync logic for member _muser</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncMuser(IEntity relatedEntity)
 {
     if(_muser!=relatedEntity)
     {
         DesetupSyncMuser(true, true);
         _muser = (MUserEntity)relatedEntity;
         base.PerformSetupSyncRelatedEntity( _muser, new PropertyChangedEventHandler( OnMuserPropertyChanged ), "Muser", MDepartementEntity.Relations.MUserEntityUsingCUserId, true, ref _alreadyFetchedMuser, new string[] {  } );
     }
 }
Ejemplo n.º 4
0
 /// <summary> Removes the sync logic for member _muser</summary>
 /// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
 /// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
 private void DesetupSyncMuser(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity( _muser, new PropertyChangedEventHandler( OnMuserPropertyChanged ), "Muser", MDepartementEntity.Relations.MUserEntityUsingCUserId, true, signalRelatedEntity, "Mdepartement", resetFKFields, new int[] { (int)MDepartementFieldIndex.CUserId } );
     _muser = null;
 }
Ejemplo n.º 5
0
        /// <summary> Retrieves the related entity of type 'MUserEntity', using a relation of type 'n:1'</summary>
        /// <param name="forceFetch">if true, it will discard any changes currently in the currently loaded related entity and will refetch the entity from the persistent storage</param>
        /// <returns>A fetched entity of type 'MUserEntity' which is related to this entity.</returns>
        public virtual MUserEntity GetSingleMuser(bool forceFetch)
        {
            if( ( !_alreadyFetchedMuser || forceFetch || _alwaysFetchMuser) && !base.IsSerializing && !base.IsDeserializing  && !base.InDesignMode)
            {
                bool performLazyLoading = base.CheckIfLazyLoadingShouldOccur(MDepartementEntity.Relations.MUserEntityUsingCUserId);

                MUserEntity newEntity = new MUserEntity();
                if(base.ParticipatesInTransaction)
                {
                    base.Transaction.Add(newEntity);
                }
                bool fetchResult = false;
                if(performLazyLoading)
                {
                    fetchResult = newEntity.FetchUsingPK(this.CUserId);
                }
                if(fetchResult)
                {
                    if(base.ActiveContext!=null)
                    {
                        newEntity = (MUserEntity)base.ActiveContext.Get(newEntity);
                    }
                    this.Muser = newEntity;
                }
                else
                {
                    if(_muserReturnsNewIfNotFound)
                    {
                        if(performLazyLoading || (!performLazyLoading && (_muser == null)))
                        {
                            this.Muser = newEntity;
                        }
                    }
                    else
                    {
                        this.Muser = null;
                    }
                }
                _alreadyFetchedMuser = fetchResult;
                if(base.ParticipatesInTransaction && !fetchResult)
                {
                    base.Transaction.Remove(newEntity);
                }
            }
            return _muser;
        }
Ejemplo n.º 6
0
        /// <summary>Private CTor for deserialization</summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected MDepartementEntity(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            _muser = (MUserEntity)info.GetValue("_muser", typeof(MUserEntity));
            if(_muser!=null)
            {
                _muser.AfterSave+=new EventHandler(OnEntityAfterSave);
            }
            _muserReturnsNewIfNotFound = info.GetBoolean("_muserReturnsNewIfNotFound");
            _alwaysFetchMuser = info.GetBoolean("_alwaysFetchMuser");
            _alreadyFetchedMuser = info.GetBoolean("_alreadyFetchedMuser");

            base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance(), PersistenceInfoProviderSingleton.GetInstance());

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
Ejemplo n.º 7
0
        /// <summary> Initializes the class members</summary>
        private void InitClassMembers()
        {
            _thistoryAlat = new Kalibrasi.Data.CollectionClasses.THistoryAlatCollection(new THistoryAlatEntityFactory());
            _thistoryAlat.SetContainingEntityInfo(this, "Malat");
            _alwaysFetchThistoryAlat = false;
            _alreadyFetchedThistoryAlat = false;

            _muser = null;
            _muserReturnsNewIfNotFound = true;
            _alwaysFetchMuser = false;
            _alreadyFetchedMuser = false;

            PerformDependencyInjection();

            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END

            OnInitClassMembersComplete();
        }
Ejemplo n.º 8
0
        /// <summary>Creates a new, empty MUserEntity object.</summary>
        /// <returns>A new, empty MUserEntity object.</returns>
        public override IEntity Create()
        {
            IEntity toReturn = new MUserEntity();

            // __LLBLGENPRO_USER_CODE_REGION_START CreateNewMUser
            // __LLBLGENPRO_USER_CODE_REGION_END

            return toReturn;
        }