public void LoadData()
        {
            IsBusy = true;
            LoadOperation <DocumentManager.Web.Model.standbook> loadOperationStandBookType =
                documentManagerContext.Load <DocumentManager.Web.Model.standbook>(documentManagerContext.GetStandBookQuery());

            loadOperationStandBookType.Completed += loadOperationStandBook_Completed;
        }
示例#2
0
        private void loadOperationTaxPayer_Completed(object sender, EventArgs e)
        {
            TaxPayerEntityDirectory.Clear();

            LoadOperation loadOperation = sender as LoadOperation;

            foreach (Web.Model.taxpayer taxpayer in loadOperation.Entities)
            {
                TaxPayerEntity lTaxPayerEntity = new TaxPayerEntity();
                lTaxPayerEntity.TaxPayer = taxpayer;
                lTaxPayerEntity.Update();
                TaxPayerEntityDirectory.Add(lTaxPayerEntity.TaxPayerId, lTaxPayerEntity);
            }

            LoadOperation <DocumentManager.Web.Model.standbook> loadOperationStandBook =
                documentManagerContext.Load <DocumentManager.Web.Model.standbook>(documentManagerContext.GetStandBookQuery());

            loadOperationStandBook.Completed += loadOperationStandBook_Completed;
        }
示例#3
0
        private LoadOperation <Web.Model.standbook> LoadStandBook()
        {
            BeginLoadings(null, null);
            EntityQuery <Web.Model.standbook> lQuery = documentManagerContext.GetStandBookQuery();

            if (taxPayerEntity != null)
            {
                lQuery = lQuery.Where(c => c.projectname == taxPayerEntity.TaxPayerProject).OrderByDescending(c => c.paytime);
            }
            else if (innerStandBookEntity != null)
            {
                lQuery = lQuery.Where(c => c.projectname == innerStandBookEntity.ProjectName).OrderByDescending(c => c.paytime);
            }
            else
            {
                lQuery = lQuery.Where(c => c.projectname == "-1").OrderByDescending(c => c.paytime);
            }
            return(documentManagerContext.Load(lQuery.SortAndPageBy(standbookView)));
        }