Esempio n. 1
0
        public ServiceResultMsg RequestPageData(Dictionary <string, string> dss, string currPageNum, string perPageRowCount)
        {
            ServiceResultMsg srm = new ServiceResultMsg();

            srm.RetCode = "00";
            srm.Obj     =
                new Dictionary <string, object> {
                { "Obj", new List <Dictionary <string, string> > {
                      new Dictionary <string, string> {
                          { ServiceResultMsg.RecordCountName, "0" },
                          { ServiceResultMsg.PageCountName, "0" },
                          { ServiceResultMsg.CurrentPageName, currPageNum }
                      }
                  } },
                { "Objj", new List <Dictionary <string, string> > {
                      new Dictionary <string, string> {
                          { "A", "here is A1" + currPageNum },
                          { "B", "here is B1" + currPageNum }
                      }, new Dictionary <string, string> {
                          { "A", "here is A2" + currPageNum },
                          { "B", "here is B2" + currPageNum }
                      }, new Dictionary <string, string> {
                          { "A", "here is A3" + currPageNum },
                          { "B", "here is B3" + currPageNum }
                      }, new Dictionary <string, string> {
                          { "A", "here is A4" + currPageNum },
                          { "B", "here is B4" + currPageNum }
                      }, new Dictionary <string, string> {
                          { "A", "here is A5" + currPageNum },
                          { "B", "here is B5" + currPageNum }
                      }
                  } }
            };
            #region trigger After PageDataRequest event
            EventArgsForAfterPageDataRequest eventArgsForAfterPageDataRequest = new EventArgsForAfterPageDataRequest(srm: srm, dss: dss, currPageNum: currPageNum, perPageRowCount: perPageRowCount);
            if (false == OnAfterPageDataRequest(eventArgsForAfterPageDataRequest))
            {
                return(srm);
            }
            else
            {
            }
            #endregion
            return(srm);
        }
Esempio n. 2
0
        /// <summary>
        /// the bridge to trigger AfterPageDataRequestEvent
        /// </summary>
        /// <param name="e">EventArgsForAfterPageDataRequest</param>
        /// <returns></returns>
        public Boolean OnAfterPageDataRequest(EventArgsForAfterPageDataRequest e)
        {
            Boolean result = true;

            try
            {
                if (BeforePageChange != null)
                {
                    result = AfterPageDataRequest(this, e);
                }
                else
                {
                }
            }
            catch (Exception ex)
            {
                result = false;
            }
            return(result);
        }