using System;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
using DevExpress.ExpressApp;
using System.ComponentModel;
using DevExpress.ExpressApp.DC;
using DevExpress.Data.Filtering;
using DevExpress.Persistent.Base;
using System.Collections.Generic;
using DevExpress.ExpressApp.Model;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;

namespace Nuvolar.Module.BusinessObjects.Popup
{
    [DefaultClassOptions]
    [NonPersistent]
    [NavigationItem(false)]
    [CreatableItem(false)]
    public class OrderInMovePopup : BaseObject
    { 
        public OrderInMovePopup(Session session): base(session) {}
        private OrderInHeader _OrderInHeader;
        private OrderInHeader _OrderInHeaderTo;
        [Browsable(false)]
        public OrderInHeader OrderInHeader {get{return _OrderInHeader; } set { SetPropertyValue("OrderInHeader", ref _OrderInHeader, value); }}
        [DataSourceCriteria("CustomersFrom='@This.OrderInHeader.CustomersFrom' And IsEditable = True")]
        public OrderInHeader OrderInHeaderTo { get { return _OrderInHeaderTo; } set { SetPropertyValue("OrderInHeaderTo", ref _OrderInHeaderTo, value); } }
        public XPCollection<StorageOutRowsInRows> StorageOutRowsInRows { get { return new XPCollection<StorageOutRowsInRows>(Session,CriteriaOperator.Parse("StorageOutRows.OrderInRows.OrderInHeader=? and StorageOutRows.QTT<>0 and DividedOriginal in (0,1)", OrderInHeader)); } }
                   
        public override void AfterConstruction()
        {
            base.AfterConstruction();
        }
    }
}
