コード例 #1
0
ファイル: GridViewHelper.cs プロジェクト: Avaruz/Artemisa2
        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;
        }
コード例 #2
0
ファイル: GridViewHelper.cs プロジェクト: Avaruz/Artemisa2
        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
ファイル: GridViewHelper.cs プロジェクト: Avaruz/Artemisa2
        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;
        }
コード例 #4
0
ファイル: GridViewHelper.cs プロジェクト: Avaruz/Artemisa2
        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;
        }
コード例 #5
0
ファイル: GridViewHelper.cs プロジェクト: Avaruz/Artemisa2
        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;
        }
コード例 #6
0
ファイル: GridViewGroup.cs プロジェクト: Avaruz/Artemisa2
 public bool ContainsSummary(GridViewSummary s)
 {
     return mSummaries.Contains(s);
 }
コード例 #7
0
ファイル: GridViewGroup.cs プロジェクト: Avaruz/Artemisa2
        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);
        }