Beispiel #1
0
        public static object GetItem(ISession session, ActiveLogType type, int record)
        {
            switch (type)
            {
            case ActiveLogType.Client:
                return(session.Single <Client>(record));

            case ActiveLogType.ClientAccount:
                return(session.Single <ClientAccount>(record));

            case ActiveLogType.ClientManager:
                return(session.Single <ClientManager>(record));

            case ActiveLogType.ClientOrg:
                return(session.Single <ClientOrg>(record));

            case ActiveLogType.ClientRemote:
                return(session.Single <ClientRemote>(record));

            case ActiveLogType.Org:
                return(session.Single <Org>(record));

            default:
                throw new ArgumentException("type");
            }
        }
Beispiel #2
0
        public static ActiveLogItem <T> Create(ISession session, ActiveLogType type, int record, DateTime sd, DateTime ed)
        {
            T item = (T)GetItem(session, type, record);

            return(Create(session, item, sd, ed));
        }
Beispiel #3
0
        public static ActiveLogType GetActiveLogType(string tableName)
        {
            ActiveLogType result = (ActiveLogType)Enum.Parse(typeof(ActiveLogType), tableName);

            return(result);
        }