Beispiel #1
0
        public override void Undo(object p_args)
        {
            RemoveHeadOrFootCmdArgs args = (RemoveHeadOrFootCmdArgs)p_args;
            RptTblPart part = null;

            if (args.Flag == "Header")
            {
                part = new RptTblHeader(args.Table);
            }
            else
            {
                part = new RptTblFooter(args.Table);
            }
            foreach (RptTblPartRow row in args.Rows)
            {
                part.Rows.Add(row);
            }
            if (args.Flag == "Header")
            {
                args.Table.Header = (RptTblHeader)part;
            }
            else
            {
                args.Table.Footer = (RptTblFooter)part;
            }
            args.Table.CalcRowSpan();
            args.Table.Update(false);
        }
Beispiel #2
0
        public override object Execute(object p_args)
        {
            RemoveHeadOrFootCmdArgs args = (RemoveHeadOrFootCmdArgs)p_args;

            if (args.Flag == "Header")
            {
                args.Table.Header = null;
            }
            else
            {
                args.Table.Footer = null;
            }
            args.Table.CalcRowSpan();
            args.Table.Update(true);
            return(null);
        }