Пример #1
0
        public static RLListNavigation_PageNumberRecordList FromRestList <T>(RestList <T> restList, Func <T, RCListNavigation_PageNumberRecord> converter)
        {
            RLListNavigation_PageNumberRecordList result = new RLListNavigation_PageNumberRecordList();

            result.InnerFromRestList(restList, converter);
            return(result);
        }
Пример #2
0
        public static RLListNavigation_PageNumberRecordList ToList <T>(T[] array, Func <T, RCListNavigation_PageNumberRecord> converter)
        {
            RLListNavigation_PageNumberRecordList result = new RLListNavigation_PageNumberRecordList();

            result.InnerFromArray(array, converter);
            return(result);
        }
Пример #3
0
        /// <summary>
        /// Function <code>ActionPrivate_List_Navigation_GetPageNumbers</code> that represents the Service
        ///  Studio function <code>Private_List_Navigation_GetPageNumbers</code> <p> Description: </p>
        /// </summary>

        public static RLListNavigation_PageNumberRecordList ActionPrivate_List_Navigation_GetPageNumbers(HeContext heContext, int inParamStartIndex, int inParamLineCount, int inParamTotalRowCount, int inParamMaxPageNumbers)
        {
            RLListNavigation_PageNumberRecordList.EnsureInitialized();
            RLListNavigation_PageNumberRecordList outParamPageNumbers;

            Actions.ActionPrivate_List_Navigation_GetPageNumbers(heContext, inParamStartIndex, inParamLineCount, inParamTotalRowCount, inParamMaxPageNumbers, out outParamPageNumbers);
            return(outParamPageNumbers);
        }
Пример #4
0
 public WORLListNavigation_PageNumberRecordList(RLListNavigation_PageNumberRecordList rl)
 {
     rl    = (RLListNavigation_PageNumberRecordList)rl.Duplicate();
     Array = new WORCListNavigation_PageNumberRecord[rl.Length];
     while (!rl.Eof)
     {
         Array[rl.CurrentRowNumber] = new WORCListNavigation_PageNumberRecord(rl.CurrentRec);
         rl.Advance();
     }
 }
Пример #5
0
 public static T[] ToArray <T>(RLListNavigation_PageNumberRecordList recordlist, Func <RCListNavigation_PageNumberRecord, T> converter)
 {
     return(InnerToArray(recordlist, converter));
 }
Пример #6
0
        /// <summary>
        /// Action <code>ActionPrivate_List_Navigation_GetPageNumbers</code> that represents the Service Studio
        ///  user action <code>Private_List_Navigation_GetPageNumbers</code> <p> Description: </p>
        /// </summary>
        public static void ActionPrivate_List_Navigation_GetPageNumbers(HeContext heContext, int inParamStartIndex, int inParamLineCount, int inParamTotalRowCount, int inParamMaxPageNumbers, out RLListNavigation_PageNumberRecordList outParamPageNumbers)
        {
            lcoPrivate_List_Navigation_GetPageNumbers result    = new lcoPrivate_List_Navigation_GetPageNumbers();
            lcvPrivate_List_Navigation_GetPageNumbers localVars = new lcvPrivate_List_Navigation_GetPageNumbers(inParamStartIndex, inParamLineCount, inParamTotalRowCount, inParamMaxPageNumbers);

            if (heContext != null && heContext.RequestTracer != null)
            {
                heContext.RequestTracer.RegisterInternalCall("NU0efdNzk06AYlO38KWVbg", "Private_List_Navigation_GetPageNumbers", "X0RMeX3yYU+0eg2nFEDfaA", "ContactManager");
            }
            try {
                if ((((localVars.inParamMaxPageNumbers > 0) && (localVars.inParamLineCount > 0))))
                {
                    // Init
                    // CurrentPageNumberMinus1 = Trunc
                    localVars.varLcCurrentPageNumberMinus1 = (((int)BuiltInFunction.Trunc(((decimal)(((decimal)localVars.inParamStartIndex)) /
                                                                                           (decimal)(((decimal)localVars.inParamLineCount))))));
                    // LastPageNumber = Trunc + TextToInteger
                    localVars.varLcLastPageNumber = (((int)(BuiltInFunction.Trunc(((decimal)(((decimal)localVars.inParamTotalRowCount)) /
                                                                                   (decimal)(((decimal)localVars.inParamLineCount)))) + (((decimal)BuiltInFunction.TextToInteger(Convert.ToString(((((((decimal)0)) == BuiltInFunction.Mod((((decimal)localVars.inParamTotalRowCount)), (((decimal)localVars.inParamLineCount))))) ?(0):(1)))))))));
                    // MorePageNumber.ListNavigation_PageNumber.Number = "..."
                    localVars.varLcMorePageNumber.ssSTListNavigation_PageNumber.ssNumber = "...";
                    // Not enough page numbers?
                    if (((localVars.inParamMaxPageNumbers < localVars.varLcLastPageNumber)))
                    {
                        // Start at Current - MaxPageNumbers/2
                        // CurrentPageNumberMinus1 = Max
                        localVars.varLcCurrentPageNumberMinus1 = (((int)BuiltInFunction.Max((((decimal)0)), ((((decimal)localVars.varLcCurrentPageNumberMinus1)) - BuiltInFunction.Trunc(((decimal)(((decimal)localVars.inParamMaxPageNumbers)) /
                                                                                                                                                                                          (decimal)(((decimal)2))))))));
                        // AppendMoreAtBeginning?
                        if (((localVars.varLcCurrentPageNumberMinus1 != 0)))
                        {
                            // AppendMoreAtBeginning
                            ExtendedActions.ListAppend(heContext, result.outParamPageNumbers, localVars.varLcMorePageNumber);
                        }
                    }
                    else
                    {
                        // Start at beginning
                        // CurrentPageNumberMinus1 = 0
                        localVars.varLcCurrentPageNumberMinus1 = 0;
                    }

                    // CurrentPageFirstShownRowIndex = CurrentPageNumberMinus1 * LineCount
                    localVars.varLcCurrentPageFirstShownRowIndex = (localVars.varLcCurrentPageNumberMinus1 * localVars.inParamLineCount);
                    // LastShownPageNumber = Min
                    localVars.varLcLastShownPageNumber = (((int)BuiltInFunction.Min((((decimal)(localVars.varLcCurrentPageNumberMinus1 + localVars.inParamMaxPageNumbers))), (((decimal)localVars.varLcLastPageNumber)))));
                    // All numbers done?
                    while ((!(((localVars.varLcCurrentPageNumberMinus1 + 1) > localVars.varLcLastShownPageNumber))))
                    {
                        // PageNumber
                        // PageNumber.ListNavigation_PageNumber.Number = CurrentPageNumberMinus1 + 1
                        localVars.varLcPageNumber.ssSTListNavigation_PageNumber.ssNumber = Convert.ToString((localVars.varLcCurrentPageNumberMinus1 + 1));
                        // PageNumber.ListNavigation_PageNumber.Index = CurrentPageFirstShownRowIndex
                        localVars.varLcPageNumber.ssSTListNavigation_PageNumber.ssIndex = localVars.varLcCurrentPageFirstShownRowIndex;
                        // PageNumber.ListNavigation_PageNumber.IsCurrent = StartIndex = CurrentPageFirstShownRowIndex
                        localVars.varLcPageNumber.ssSTListNavigation_PageNumber.ssIsCurrent = (localVars.inParamStartIndex == localVars.varLcCurrentPageFirstShownRowIndex);
                        // CurrentPageFirstShownRowIndex = CurrentPageFirstShownRowIndex + LineCount
                        localVars.varLcCurrentPageFirstShownRowIndex = (localVars.varLcCurrentPageFirstShownRowIndex + localVars.inParamLineCount);
                        // CurrentPageNumberMinus1 = CurrentPageNumberMinus1 + 1
                        localVars.varLcCurrentPageNumberMinus1 = (localVars.varLcCurrentPageNumberMinus1 + 1);
                        // AppendPage
                        ExtendedActions.ListAppend(heContext, result.outParamPageNumbers, localVars.varLcPageNumber);
                    }

                    // AppendMoreAtEnd?
                    if (((localVars.varLcCurrentPageNumberMinus1 < localVars.varLcLastPageNumber)))
                    {
                        // AppendMoreAtEnd
                        ExtendedActions.ListAppend(heContext, result.outParamPageNumbers, localVars.varLcMorePageNumber);
                    }
                }
            }             // try

            finally {
                outParamPageNumbers = result.outParamPageNumbers;
            }
        }