예제 #1
0
        public GridViewSummary RegisterSummary(string column, string formatString, SummaryOperation operation, string groupName)
        {
            if (operation == SummaryOperation.Custom)
            {
                throw new Exception(USE_ADEQUATE_METHOD_TO_REGISTER_THE_SUMMARY);
            }

            GridViewGroup group = mGroups[groupName];

            if (group == null)
            {
                throw new Exception(String.Format(GROUP_NOT_FOUND, groupName));
            }

            // TO DO: Perform column validation...
            GridViewSummary s = new GridViewSummary(column, formatString, operation, group);

            group.AddSummary(s);

            return(s);
        }
예제 #2
0
        public GridViewSummary RegisterSummary(GridViewSummary s)
        {
            if (!s.Validate())
            {
                throw new Exception(INVALID_SUMMARY);
            }

            if (s.Group == null)
            {
                // if general summaries are displayed in the footer, it must be set to visible
                if (useFooter)
                {
                    mGrid.ShowFooter = true;
                }

                mGeneralSummaries.Add(s);
            }
            else if (!s.Group.ContainsSummary(s))
            {
                s.Group.AddSummary(s);
            }

            return(s);
        }
예제 #3
0
 public bool ContainsSummary(GridViewSummary s)
 {
     return(mSummaries.Contains(s));
 }
예제 #4
0
        public void AddSummary(GridViewSummary s)
        {
            if (this.ContainsSummary(s))
            {
                throw new Exception("Summary already exists in this group.");
            }

            if (!s.Validate())
            {
                throw new Exception("Invalid summary.");
            }

            ///s._group = this;
            s.SetGroup(this);
            this.mSummaries.Add(s);
        }
예제 #5
0
 public bool ContainsSummary(GridViewSummary s)
 {
     return mSummaries.Contains(s);
 }
예제 #6
0
        public GridViewSummary RegisterSummary(GridViewSummary s)
        {
            if (!s.Validate())
            {
                throw new Exception(INVALID_SUMMARY);
            }

            if (s.Group == null)
            {
                // if general summaries are displayed in the footer, it must be set to visible
                if (useFooter) mGrid.ShowFooter = true;

                mGeneralSummaries.Add(s);
            }
            else if (!s.Group.ContainsSummary(s))
            {
                s.Group.AddSummary(s);
            }

            return s;
        }
예제 #7
0
        public GridViewSummary RegisterSummary(string column, string formatString, CustomSummaryOperation operation, SummaryResultMethod getResult, string groupName)
        {
            GridViewGroup group = mGroups[groupName];
            if (group == null)
            {
                throw new Exception(String.Format(GROUP_NOT_FOUND, groupName));
            }

            // TO DO: Perform column validation...
            GridViewSummary s = new GridViewSummary(column, formatString, operation, getResult, group);
            group.AddSummary(s);

            return s;
        }
예제 #8
0
        public GridViewSummary RegisterSummary(string column, string formatString, CustomSummaryOperation operation, SummaryResultMethod getResult)
        {
            // TO DO: Perform column validation...
            GridViewSummary s = new GridViewSummary(column, formatString, operation, getResult, null);
            mGeneralSummaries.Add(s);

            // if general summaries are displayed in the footer, it must be set to visible
            if (useFooter) mGrid.ShowFooter = true;

            return s;
        }
예제 #9
0
        public GridViewSummary RegisterSummary(string column, string formatString, SummaryOperation operation, string groupName)
        {
            if (operation == SummaryOperation.Custom)
            {
                throw new Exception(USE_ADEQUATE_METHOD_TO_REGISTER_THE_SUMMARY);
            }

            GridViewGroup group = mGroups[groupName];
            if (group == null)
            {
                throw new Exception(String.Format(GROUP_NOT_FOUND, groupName));
            }

            // TO DO: Perform column validation...
            GridViewSummary s = new GridViewSummary(column, formatString, operation, group);
            group.AddSummary(s);

            return s;
        }
예제 #10
0
        public GridViewSummary RegisterSummary(string column, string formatString, SummaryOperation operation)
        {
            if (operation == SummaryOperation.Custom)
            {
                throw new Exception(USE_ADEQUATE_METHOD_TO_REGISTER_THE_SUMMARY);
            }

            // TO DO: Perform column validation...
            GridViewSummary s = new GridViewSummary(column, formatString, operation, null);
            mGeneralSummaries.Add(s);

            // if general summaries are displayed in the footer, it must be set to visible
            if (useFooter) mGrid.ShowFooter = true;

            return s;
        }