Beispiel #1
0
        private object GetModelFromService(long layoutId)
        {
            AvrServiceAccessability access = AvrServiceAccessability.Check();

            if (!access.IsOk)
            {
                return(access.ErrorMessage);
            }
            AvrServicePivotResult pivotResult = ServiceClientHelper.GetAvrServicePivotResult(Session.SessionID, layoutId);

            if (!pivotResult.IsOk)
            {
                return(pivotResult.ErrorMessage);
            }

            pivotResult.Model.ViewHeader.AssignOwnerAndUniquePath();

            DataTable dt = pivotResult.Model.ViewData;

            AvrViewHelper.AddIDColumn(ref dt);

            AvrViewHelper.RemoveHASCadditions(pivotResult.Model.ViewHeader, ref dt);
            pivotResult.Model.ViewData = dt;

            return(pivotResult);
        }
Beispiel #2
0
        public void AvrServiceHelperGetAvrServicePivotResultTest()
        {
            ServiceClientHelper.CallAvrServiceToForceLOHMemoryAllocations();

            AvrServicePivotResult result = ServiceClientHelper.GetAvrServicePivotResult("xxx", -1);

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.Model);
            Assert.IsNotNull(result.Model.ViewHeader);
            Assert.IsNotNull(result.Model.ViewData);
        }
Beispiel #3
0
        // get viewModel from database and merge it with pivotResult
        // add values of aggregate columns to datasource
        private AvrPivotViewModel GetModelFromDb(long layoutId, AvrServicePivotResult pivotResult)
        {
            var dbView = GetModelFromDb(layoutId);

            return(AdjustToNew(layoutId, dbView, pivotResult.Model));
        }