Esempio n. 1
0
 public void Remove(UserSecurityObject value)
 {
     try
     {
         List.Remove(value);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
Esempio n. 2
0
 public int Add(UserSecurityObject value)
 {
     try
     {
         return(List.Add(value));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
Esempio n. 3
0
 // Called by UserObject when it changes
 internal void UserSecurityObjectChanged(UserSecurityObject userSecurity)
 {
     try
     {
         int index = List.IndexOf(userSecurity);
         OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
Esempio n. 4
0
 // Methods.
 object IBindingList.AddNew()
 {
     try
     {
         UserSecurityObject userSecurity = new UserSecurityObject();
         List.Add(userSecurity);
         return(userSecurity);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
Esempio n. 5
0
 protected override void OnRemoveComplete(int index, object value)
 {
     try
     {
         UserSecurityObject userSecurity = (UserSecurityObject)value;
         userSecurity.Parent = this;
         OnListChanged(new ListChangedEventArgs(ListChangedType.ItemDeleted, index));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
 public static UserSecurityObject UserSecurityRowToObject(DataRow user)
 {
     UserSecurityObject obj = new UserSecurityObject();
     try
     {
         if (user != null)
         {
             obj = (UserSecurityObject)PROF_IT.Common.Convert.Byte.ByteArrayToObject(RowFunctions.GetValueFromRowToByteArray(user, UserObject.SECURITY, true, DataRowVersion.Current));
             return obj;
         }
         obj = null;
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
     return obj;
 }
Esempio n. 7
0
        public static UserSecurityObject UserSecurityRowToObject(DataRow user)
        {
            UserSecurityObject obj = new UserSecurityObject();

            try
            {
                if (user != null)
                {
                    obj = (UserSecurityObject)PROF_IT.Common.Convert.Byte.ByteArrayToObject(RowFunctions.GetValueFromRowToByteArray(user, UserObject.SECURITY, true, DataRowVersion.Current));
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Esempio n. 8
0
        protected override void OnSetComplete(int index, object oldValue, object newValue)
        {
            try
            {
                if (oldValue != newValue)
                {
                    UserSecurityObject oldUserSecurity = (UserSecurityObject)oldValue;
                    UserSecurityObject newUserSecurity = (UserSecurityObject)newValue;
                    oldUserSecurity.Parent = null;
                    newUserSecurity.Parent = this;

                    OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, index));
                }
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
        }
 // Called by UserObject when it changes
 internal void UserSecurityObjectChanged(UserSecurityObject userSecurity)
 {
     try
     {
         int index = List.IndexOf(userSecurity);
         OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
 public void Remove(UserSecurityObject value)
 {
     try
     {
         List.Remove(value);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
 // Methods.
 object IBindingList.AddNew()
 {
     try
     {
         UserSecurityObject userSecurity = new UserSecurityObject();
         List.Add(userSecurity);
         return userSecurity;
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
 public int Add(UserSecurityObject value)
 {
     try
     {
         return List.Add(value);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
Esempio n. 13
0
 void IEditableObject.EndEdit()
 {
     try
     {
         if (inTxn)
         {
             _loadedEmployee = this.Employee;
             _loadedActive = this.Active;
             _loadedhasPopups = this.HasPopups;
             _loadedLogin = this.Login;
             _loadedName = this.Name;
             _loadedPassword = this.Password;
             _loadedSurname = this.Surname;
             _loadedSecurity = this.Security;
             _initialValueSet = false;
             inTxn = false;
         }
     }
     catch (Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }