Exemple #1
0
        public Deactive DeActivateUser(int UserID)
        {
            if (CircuitMembersComponent.IsCircuitMember(UserID) || CircuitsComponent.GetCircuitsBySecretairyID(UserID).Count > 0)
            {
                return(Deactive.CannotDeactive);
            }

            if (UserComponent.DeActivateUser(UserID) == Deactive.Deactive)
            {
                return(Deactive.Deactive);
            }

            else
            {
                return(Deactive.failed);
            }
            //else if (SystemConfigurations.Settings_InDevelopmentMode)
            //{
            //    return Deactive.CannotDeactive;
            //    throw new ValidationExceptions("لا يمكن تعطيل مستخدم ضمن تشكيل حالي لدائرة");
            //}
        }