コード例 #1
0
        public async override Task InitQuery()
        {
            dgLinkedGrid.UpdateMaster(dcorderlineMaster as UnicontaBaseEntity);
            await dgLinkedGrid.Filter(null);

            if (dcorderlineMaster._Qty < 0)
            {
                // we select all, since it is a credit note.
                dgUnlinkedGrid.UpdateMaster(invItemMaster);
            }
            else
            {
                // We only select opens
                var mast = new InvSerieBatchOpen();
                mast.SetMaster(invItemMaster);
                dgUnlinkedGrid.UpdateMaster(mast);
            }
            dgUnlinkedGrid.Filter(null);
        }
コード例 #2
0
        public override Task InitQuery()
        {
            dgLinkedGrid.UpdateMaster(dcorderlineMaster as UnicontaBaseEntity);
            var t1 = dgLinkedGrid.Filter(null);

            if (dcorderlineMaster._Qty < 0)
            {
                // we select all, since it is a credit note.
                dgUnlinkedGrid.UpdateMaster(invItemMaster);
            }
            else
            {
                // We only select opens
                var mast = new InvSerieBatchOpen();
                mast.SetMaster(invItemMaster);
                if (invItemMaster._UseBatch && api.CompanyEntity.Warehouse)
                {
                    dgUnlinkedGrid.masterRecords = new List <UnicontaBaseEntity>(2)
                    {
                        mast, new InvSerieBatchStorage()
                    }
                }
                ;
                else
                {
                    dgUnlinkedGrid.UpdateMaster(mast);
                }
            }
            var t2 = dgUnlinkedGrid.Filter(null);

#if SILVERLIGHT
            return(t2);
#else
            return(Task.WhenAll(t1, t2));
#endif
        }