Example #1
0
        public static bool CanDelete(int IMGroupId)
        {
            bool retval = Security.IsUserInGroup(InternalSecureGroups.Administrator);

            if (retval)                         // Check for users
            {
                using (IDataReader reader = DBIMGroup.GetListUsers(IMGroupId))
                {
                    if (reader.Read())
                    {
                        retval = false;
                    }
                }
            }

            if (retval)                         // Check for partner
            {
                DataTable table = DBIMGroup.GetIMGroup(IMGroupId, true);
                if (table.Rows.Count > 0)
                {
                    if ((bool)table.Rows[0]["is_partner"])
                    {
                        retval = false;
                    }
                }
            }
            return(retval);
        }
Example #2
0
 /// <summary>
 /// DataTable contains columns:
 ///		IMGroupId, IMGroupName, color, logo_version, is_partner
 /// </summary>
 public static DataTable GetListIMGroup()
 {
     return(DBIMGroup.GetIMGroup(0, false));
 }
Example #3
0
 /// <summary>
 /// DataTable contains columns:
 ///		IMGroupId, IMGroupName, color, logo_version, is_partner
 /// </summary>
 public static DataTable GetGroup(int imGroupId)
 {
     return(DBIMGroup.GetIMGroup(imGroupId, true));
 }