public override object Execute(object p_args) { ContainHeadOrFootCmdArgs args = (ContainHeadOrFootCmdArgs)p_args; RptTblPart part = null; if (args.Flag == "Header") { part = new RptTblHeader(args.Table); } else { part = new RptTblFooter(args.Table); } RptTblPartRow row = new RptTblPartRow(part); InsertTableCmd.BuildCells(row, args.Table.ColSpan); 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); return(null); }
public override void Undo(object p_args) { ContainHeadOrFootCmdArgs args = (ContainHeadOrFootCmdArgs)p_args; if (args.Flag == "Header") { args.Table.Header = null; } else { args.Table.Footer = null; } args.Table.CalcRowSpan(); args.Table.Update(true); }