Пример #1
0
        public void ClientMarkupsSynchronization()
        {
            var defaultItems = MarkupGlobalConfig.Defaults(user.Client);

            Assert.IsNotNull(defaultItems);
            Assert.IsTrue(defaultItems.Count == 6);
        }
        public virtual List <MarkupGlobalConfig> UpdateSynchronizationIfNeeds(ISession dbsession, Client client)
        {
            List <MarkupGlobalConfig> result = null;

            if (client.MarkupsSynchronization == false && ViewMarkupsSynchronization &&
                dbsession.Query <MarkupGlobalConfig>().Count(s => s.Client.Id == client.Id) == 0)
            {
                result = MarkupGlobalConfig.Defaults(client);
            }
            if (client.MarkupsSynchronization != ViewMarkupsSynchronization)
            {
                client.MarkupsSynchronization = ViewMarkupsSynchronization;
            }
            return(result);
        }