예제 #1
0
        public virtual IList <TView> GetPagedData(PagedDataInfo pagedDataInfo)
        {
            var content   = restClient.Execute(HttpRestClient.RestAuthRequest(Method.POST, string.Format("{0}/{1}", RouteSuffix, "PagedData"), ActiveUser).AddObject(pagedDataInfo)).Content;
            var apiResult = JsonConvert.DeserializeObject <ApiResult <TView> >(content);

            pagedDataInfo.TotalCount = ((apiResult != null) && apiResult.TotalResults > 0) ? apiResult.TotalResults : apiResult.ReturnedResults;
            return(apiResult.Results);
        }
예제 #2
0
 public static IList <SysRefModel> GetDeleteInfoModules(PagedDataInfo pagedDataInfo)
 {
     return(_commands.GetDeleteInfoModules(ActiveUser, pagedDataInfo));
 }
예제 #3
0
 /// <summary>
 /// Get list of customer dclocation data
 /// </summary>
 /// <param name="pagedDataInfo"></param>
 /// <returns></returns>
 public IList <CustDcLocation> GetPagedData(PagedDataInfo pagedDataInfo)
 {
     return(_commands.GetPagedData(ActiveUser, pagedDataInfo));
 }
 public virtual IQueryable <ScnOrderService> PagedData(PagedDataInfo pagedDataInfo)
 {
     _ScnOrderServiceCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_ScnOrderServiceCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }
 public virtual IQueryable <SystemPageTabName> PagedData(PagedDataInfo pagedDataInfo)
 {
     _systemPageTabNameCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_systemPageTabNameCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }
예제 #6
0
 public virtual IQueryable <JobXcblInfo> PagedData(PagedDataInfo pagedDataInfo)
 {
     _jobXcblInfoCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_jobXcblInfoCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }
 /// <summary>
 /// Get list of customer business terms data
 /// </summary>
 /// <param name="pagedDataInfo"></param>
 /// <returns></returns>
 public IList <CustBusinessTerm> GetPagedData(PagedDataInfo pagedDataInfo)
 {
     return(_commands.GetPagedData(ActiveUser, pagedDataInfo));
 }
예제 #8
0
 public virtual IQueryable <Report> PagedData(PagedDataInfo pagedDataInfo)
 {
     _reportCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_reportCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }
예제 #9
0
 public virtual IQueryable <ScrRequirementList> PagedData(PagedDataInfo pagedDataInfo)
 {
     _scrRequirementListCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_scrRequirementListCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }
 /// <summary>
 /// Get list of SubSubSecurityByRole data
 /// </summary>
 /// <param name="pagedDataInfo"></param>
 /// <returns></returns>
 public IList <SubSecurityByRole> GetPagedData(PagedDataInfo pagedDataInfo)
 {
     return(_commands.GetPagedData(ActiveUser, pagedDataInfo));
 }
 public virtual IQueryable <ScrGatewayList> PagedData(PagedDataInfo pagedDataInfo)
 {
     _ScrGatewayListCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_ScrGatewayListCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }
 public virtual IQueryable <OrgFinancialCalendar> PagedData(PagedDataInfo pagedDataInfo)
 {
     _orgFinancialCalendarCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_orgFinancialCalendarCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }
예제 #13
0
 /// <summary>
 /// Get list of system page tab name data
 /// </summary>
 /// <param name="pagedDataInfo"></param>
 /// <returns></returns>
 public IList <SystemPageTabName> GetPagedData(PagedDataInfo pagedDataInfo)
 {
     return(_commands.GetPagedData(ActiveUser, pagedDataInfo));
 }
예제 #14
0
 public static void RemoveDeleteInfoRecords(PagedDataInfo pagedDataInfo)
 {
     _commands.RemoveDeleteInfoRecords(ActiveUser, pagedDataInfo);
 }
예제 #15
0
 public static dynamic GetDeleteInfoRecords(PagedDataInfo pagedDataInfo)
 {
     return(_commands.GetDeleteInfoRecords(ActiveUser, pagedDataInfo));
 }
예제 #16
0
 /// <summary>
 /// Get list of StatusLog data
 /// </summary>
 /// <param name="pagedDataInfo"></param>
 /// <returns></returns>
 public IList <StatusLog> GetPagedData(PagedDataInfo pagedDataInfo)
 {
     return(_commands.GetPagedData(ActiveUser, pagedDataInfo));
 }
예제 #17
0
 /// <summary>
 /// Gets list of coulmn alias data
 /// </summary>
 /// <param name="pagedDataInfo"></param>
 /// <returns></returns>
 public IList <ColumnAlias> GetPagedData(PagedDataInfo pagedDataInfo)
 {
     return(_commands.GetPagedData(ActiveUser, pagedDataInfo));
 }
예제 #18
0
        /// <summary>
        /// Get list of system reference data
        /// </summary>
        /// <param name="pagedDataInfo"></param>
        /// <returns></returns>

        public IList <SystemReference> GetPagedData(PagedDataInfo pagedDataInfo)
        {
            return(_commands.GetPagedData(ActiveUser, pagedDataInfo));
        }
예제 #19
0
 public IList <NavRemittance> GetPagedData(PagedDataInfo pagedDataInfo)
 {
     throw new NotImplementedException();
 }
예제 #20
0
 /// <summary>
 /// Get list of job attribute data
 /// </summary>
 /// <param name="pagedDataInfo"></param>
 /// <returns></returns>
 public IList <JobAttribute> GetPagedData(PagedDataInfo pagedDataInfo)
 {
     return(_commands.GetPagedData(ActiveUser, pagedDataInfo));
 }
예제 #21
0
 public virtual IQueryable <CompanyAddress> PagedData(PagedDataInfo pagedDataInfo)
 {
     _companyAddressCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_companyAddressCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }
예제 #22
0
        public IList <JobAdvanceReport> GetPagedData(PagedDataInfo pagedDataInfo)
        {
            IList <JobAdvanceReport> result = null;
            bool isCostChargeReport         = false;
            bool isPriceChargeReport        = false;

            result              = _commands.GetPagedData(ActiveUser, pagedDataInfo);
            isCostChargeReport  = result != null && result.Count > 0 && (result.ToList().Where(x => x.IsCostChargeReport).Any());
            isPriceChargeReport = result != null && result.Count > 0 && (result.ToList().Where(x => x.IsPriceChargeReport).Any());
            if (isCostChargeReport || isPriceChargeReport)
            {
                IList <JobAdvanceReport> updatedResult           = new List <JobAdvanceReport>();
                JobAdvanceReport         currentJobAdvanceReport = null;
                int jobItemCount = 1;
                if (isPriceChargeReport)
                {
                    NavSalesOrderPostedInvoiceResponse navSalesOrderPostedInvoiceResponse = CommonCommands.GetCachedNavSalesOrderValues();
                    NavSalesOrderItemResponse          navSalesOrderItemResponse          = CommonCommands.GetCachedNavSalesOrderItemValues();
                    foreach (var currentJob in result)
                    {
                        var currentNavSalesOrder = navSalesOrderPostedInvoiceResponse.NavSalesOrder.FirstOrDefault(x => x.M4PL_Job_ID.ToLong() == currentJob.JobId);
                        if (currentNavSalesOrder != null && !string.IsNullOrEmpty(currentNavSalesOrder.No))
                        {
                            var currentSalesLineItem = navSalesOrderItemResponse.NavSalesOrderItem.Where(x => x.Document_No.Equals(currentNavSalesOrder.No, StringComparison.OrdinalIgnoreCase));
                            if (currentSalesLineItem.Any() && currentSalesLineItem.Count() > 0)
                            {
                                foreach (var salesLineItem in currentSalesLineItem)
                                {
                                    currentJobAdvanceReport = currentJob.DeepCopy();
                                    currentJobAdvanceReport.RateChargeCode = string.IsNullOrEmpty(salesLineItem.Cross_Reference_No) ? salesLineItem.No : salesLineItem.Cross_Reference_No;
                                    currentJobAdvanceReport.RateTitle      = salesLineItem.Description;
                                    currentJobAdvanceReport.RateAmount     = salesLineItem.Unit_Price;
                                    currentJobAdvanceReport.Id             = currentJob.Id;
                                    updatedResult.Add(currentJobAdvanceReport);
                                    jobItemCount = jobItemCount + 1;
                                }
                            }
                        }
                    }
                }
                else
                {
                    NavPurchaseOrderPostedInvoiceResponse navPurchaseOrderPostedInvoiceResponse = CommonCommands.GetCachedNavPurchaseOrderValues();
                    NavPurchaseOrderItemResponse          navPurchaseOrderItemResponse          = CommonCommands.GetCachedNavPurchaseOrderItemValues();
                    foreach (var currentJob in result)
                    {
                        var currentNavPurchaseOrder = navPurchaseOrderPostedInvoiceResponse.NavPurchaseOrder.FirstOrDefault(x => x.M4PL_Job_ID.ToLong() == currentJob.JobId);
                        if (currentNavPurchaseOrder != null && !string.IsNullOrEmpty(currentNavPurchaseOrder.No))
                        {
                            var currentPurchaseLineItem = navPurchaseOrderItemResponse.NavPurchaseOrderItem.Where(x => x.Document_No.Equals(currentNavPurchaseOrder.No, StringComparison.OrdinalIgnoreCase));
                            if (currentPurchaseLineItem.Any() && currentPurchaseLineItem.Count() > 0)
                            {
                                foreach (var purchaseLineItem in currentPurchaseLineItem)
                                {
                                    currentJobAdvanceReport = currentJob.DeepCopy();
                                    currentJobAdvanceReport.RateChargeCode = string.IsNullOrEmpty(purchaseLineItem.Cross_Reference_No) ? purchaseLineItem.No : purchaseLineItem.Cross_Reference_No;
                                    currentJobAdvanceReport.RateTitle      = purchaseLineItem.Description;
                                    currentJobAdvanceReport.RateAmount     = purchaseLineItem.Unit_Cost_LCY;
                                    currentJobAdvanceReport.Id             = currentJob.Id;
                                    updatedResult.Add(currentJobAdvanceReport);
                                    jobItemCount = jobItemCount + 1;
                                }
                            }
                        }
                    }
                }

                pagedDataInfo.TotalCount = updatedResult != null && updatedResult.Count > 0 ? updatedResult.Count : 0;
                return(updatedResult);
            }

            return(result);
        }
예제 #23
0
 public virtual IQueryable <PrgMvoc> PagedData(PagedDataInfo pagedDataInfo)
 {
     _prgMvocCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_prgMvocCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }
예제 #24
0
 public IList <EmailDetail> GetPagedData(PagedDataInfo pagedDataInfo)
 {
     throw new NotImplementedException();
 }
예제 #25
0
 public virtual IQueryable <MessageType> PagedData(PagedDataInfo pagedDataInfo)
 {
     _messageTypeCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_messageTypeCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }
예제 #26
0
 public virtual IQueryable <VendDcLocationContact> PagedData(PagedDataInfo pagedDataInfo)
 {
     _vendDcLocationContactCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_vendDcLocationContactCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }
예제 #27
0
 public virtual IQueryable <DeliveryStatus> PagedData(PagedDataInfo pagedDataInfo)
 {
     _deliveryStatusCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_deliveryStatusCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }
예제 #28
0
 /// <summary>
 /// Get list of menu driver data
 /// </summary>
 /// <param name="pagedDataInfo"></param>
 /// <returns></returns>
 public IList <Report> GetPagedData(PagedDataInfo pagedDataInfo)
 {
     return(_commands.GetPagedData(ActiveUser, pagedDataInfo));
 }
예제 #29
0
 public virtual IQueryable <NavCostCode> PagedData(PagedDataInfo pagedDataInfo)
 {
     _navCostCodeCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_navCostCodeCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }
예제 #30
0
 public virtual IQueryable <Customer> PagedData(PagedDataInfo pagedDataInfo)
 {
     _customerCommands.ActiveUser = Models.ApiContext.ActiveUser;
     return(_customerCommands.GetPagedData(pagedDataInfo).AsQueryable());
 }