コード例 #1
0
 public IQueryable <Order> GetFilteredOrdersFromFilter(OrderFilter Filter, Guid guid)
 {
     Filter.SelectedUsersStr   = Filter.getSelectedUsersJoinStr();
     Filter.SelectedObjectsStr = Filter.getSelectedObjectsJoinStr();
     Logger.info("Получение списка заказов (GetFilteredOrdersFromXML)", Logger.LoggerSource.service);
     LastUpdate.saveUpdate(guid);
     return(context.getOrders(Filter));
 }
コード例 #2
0
        public IQueryable <Order> GetFilteredOrdersFromFilterToMail(OrderFilter Filter, Guid guid)
        {
            Filter.SelectedUsersStr   = Filter.getSelectedUsersJoinStr();
            Filter.SelectedObjectsStr = Filter.getSelectedObjectsJoinStr();
            Logger.info("Получение списка заказов (GetFilteredOrdersFromXML) В почту", Logger.LoggerSource.service);
            IQueryable <Order> ordersQuery = context.getOrders(Filter);
            List <Order>       orders      = ordersQuery.ToList();

            MailContext.sendOrdersList("Список заявкок", orders);
            return(ordersQuery);
        }
コード例 #3
0
        protected void RefreshOrdersFilterXML(bool clear, bool sendMail)
        {
            if (clear)
            {
                context.Orders.Clear();
            }
            filter.SelectedUsersStr   = filter.getSelectedUsersJoinStr();
            filter.SelectedObjectsStr = filter.getSelectedObjectsJoinStr();
            string xml = XMLStringSerializer.Serialize <OrderFilter>(filter);

            if (!sendMail)
            {
                context.Load(
                    context.GetFilteredOrdersFromXMLQuery(xml, OrdersContext.Current.SessionGUID),
                    System.ServiceModel.DomainServices.Client.LoadBehavior.RefreshCurrent, true);
            }
            else
            {
                context.Load(
                    context.GetFilteredOrdersFromXMLToMailQuery(xml, OrdersContext.Current.SessionGUID),
                    System.ServiceModel.DomainServices.Client.LoadBehavior.RefreshCurrent, true);
            }
            LastUpdate = DateTime.Now;
        }