示例#1
0
        public override void Undo(object p_args)
        {
            InsertTblGrpCmdArgs args = (InsertTblGrpCmdArgs)p_args;

            args.Table.Groups.Remove(args.Grp);
            args.Table.CalcRowSpan();
            args.Table.Update(true);
        }
示例#2
0
        public override object Execute(object p_args)
        {
            InsertTblGrpCmdArgs args  = (InsertTblGrpCmdArgs)p_args;
            RptTable            table = args.Table;

            if (table.Groups == null)
            {
                table.Groups = new List <RptTblGroup>();
            }
            RptTblPartRow row = new RptTblPartRow(args.Grp.Header);

            InsertTableCmd.BuildCells(row, table.ColSpan);
            args.Grp.Header.Rows.Add(row);
            RptTblPartRow r = new RptTblPartRow(args.Grp.Footer);

            InsertTableCmd.BuildCells(r, table.ColSpan);
            args.Grp.Footer.Rows.Add(r);
            args.Table.Groups.Add(args.Grp);
            args.Table.CalcRowSpan();
            args.Table.Update(false);
            return(null);
        }