Ejemplo n.º 1
0
        public void RejectAccountGroupAccountRequest(string ticket, int id, string message)
        {
            using (SnCore.Data.Hibernate.Session.OpenConnection())
            {
                ISession session           = SnCore.Data.Hibernate.Session.Current;
                ManagedSecurityContext sec = new ManagedSecurityContext(session, ticket);

                try
                {
                    ManagedAccountGroupAccountRequest req = new ManagedAccountGroupAccountRequest(session, id);
                    req.Reject(sec, message);
                    SnCore.Data.Hibernate.Session.Flush();
                }
                catch (NHibernate.ObjectNotFoundException)
                {
                    throw new Exception("This membership request cannot be found. Another administrator may have already rejected it.");
                }
            }
        }
Ejemplo n.º 2
0
        public void RejectAccountGroupAccountRequest(string ticket, int id, string message)
        {
            using (SnCore.Data.Hibernate.Session.OpenConnection())
            {
                ISession session = SnCore.Data.Hibernate.Session.Current;
                ManagedSecurityContext sec = new ManagedSecurityContext(session, ticket);

                try
                {
                    ManagedAccountGroupAccountRequest req = new ManagedAccountGroupAccountRequest(session, id);
                    req.Reject(sec, message);
                    SnCore.Data.Hibernate.Session.Flush();
                }
                catch (NHibernate.ObjectNotFoundException)
                {
                    throw new Exception("This membership request cannot be found. Another administrator may have already rejected it.");
                }
            }
        }