Beispiel #1
0
    private string GetArticle(Guid pageID, int id, PXLabel label, PXPanel statPanel)
    {
        DateTime date    = DateTime.MinValue;
        string   article = GetArticle(pageID, id, ref date);

        label.Text        = date.ToString("g", System.Threading.Thread.CurrentThread.CurrentCulture);
        statPanel.Caption = label.Text;
        return(article);
    }
Beispiel #2
0
	private void DrawCaption(HtmlGenericControl place, AuditInfo info)
	{
		PXPanel panel = new PXPanel();
		panel.ContentLayout.Layout = LayoutType.Stack;
		panel.ContentLayout.Orientation = PX.Web.UI.Orientation.Horizontal;
		panel.RenderStyle = FieldsetStyle.Simple;
		panel.ContentLayout.InnerSpacing = true;
		panel.ContentLayout.SpacingSize = SpacingSize.Medium;
		panel.ContentLayout.OuterSpacing = SpacingDirection.Around;

		IParserAccessor pa = (IParserAccessor)panel;
		foreach (AuditValue value in info.Keys)
		{
			DrawItem(pa, value.DisplayName + ":", value.NewValue.ToString());
		}
		place.Controls.Add(panel);
	}
Beispiel #3
0
    private void DrawCaption(HtmlGenericControl place, AuditInfo info)
    {
        PXPanel panel = new PXPanel();

        panel.ContentLayout.Layout      = LayoutType.Stack;
        panel.ContentLayout.Orientation = PX.Web.UI.Orientation.Horizontal;
        panel.RenderStyle = FieldsetStyle.Simple;
        panel.ContentLayout.InnerSpacing = true;
        panel.ContentLayout.SpacingSize  = SpacingSize.Medium;
        panel.ContentLayout.OuterSpacing = SpacingDirection.Around;

        IParserAccessor pa = (IParserAccessor)panel;

        foreach (AuditValue value in info.Keys)
        {
            DrawItem(pa, value.DisplayName + ":", value.NewValue.ToString());
        }
        place.Controls.Add(panel);
    }
        protected void DrawCaptionDiv(TableCell cell, AuditEntry entry)
        {
            PXPanel panel = new PXPanel();

            panel.ContentLayout.Layout      = LayoutType.Stack;
            panel.ContentLayout.Orientation = UI.Orientation.Horizontal;
            panel.RenderStyle = FieldsetStyle.Simple;

            IParserAccessor pa = (IParserAccessor)panel;

            Label tableLabel = new Label();

            tableLabel.Font.Bold = true;
            tableLabel.Text      = entry.Table;
            pa.AddParsedSubObject(tableLabel);

            Label operationLabel = new Label();

            operationLabel.Text = entry.OperationTitle;
            pa.AddParsedSubObject(operationLabel);

            cell.Controls.Add(panel);
        }
	private string GetArticle(Guid pageID, int id, PXLabel label, PXPanel statPanel)
	{
		DateTime date = DateTime.MinValue;
		string article = GetArticle(pageID, id, ref date);
		label.Text = date.ToString("g", System.Threading.Thread.CurrentThread.CurrentCulture);
		statPanel.Caption = label.Text;
		return article;
	}
		protected void DrawCaptionDiv(TableCell cell, AuditEntry entry)
		{
			PXPanel panel = new PXPanel();
			panel.ContentLayout.Layout = LayoutType.Stack;
			panel.ContentLayout.Orientation = UI.Orientation.Horizontal;
			panel.RenderStyle = FieldsetStyle.Simple;

			IParserAccessor pa = (IParserAccessor)panel;

			Label tableLabel = new Label();
			tableLabel.Font.Bold = true;
			tableLabel.Text = entry.Table;
			pa.AddParsedSubObject(tableLabel);

			Label operationLabel = new Label();
			operationLabel.Text = entry.OperationTitle;
			pa.AddParsedSubObject(operationLabel);

			cell.Controls.Add(panel);
		}
		protected void DrawChangesDiv(TableCell cell, AuditEntry entry)
		{
			PXPanel panel = new PXPanel();
			panel.ContentLayout.Layout = LayoutType.Stack;
			panel.ContentLayout.Orientation = UI.Orientation.Horizontal;
			panel.RenderStyle = FieldsetStyle.Simple;
			panel.ContentLayout.InnerSpacing = false;

			IParserAccessor pa = (IParserAccessor)panel;
			foreach (AuditValue value in entry.Values)
			{
				Table table = new Table();
				table.BorderStyle = BorderStyle.Solid;
				table.BorderWidth = Unit.Pixel(1);
				table.BorderColor = System.Drawing.SystemColors.ControlLight;
				table.Attributes.Add("bordercolor", "ControlLight");
				table.GridLines = GridLines.Both;
				table.Height = Unit.Percentage(100);

				TableRow fieldRow = new TableRow();
				TableCell fieldCell = new TableCell();
				fieldCell.Font.Bold = true;
				fieldCell.Style[HtmlTextWriterStyle.PaddingLeft] = "5px";
				fieldCell.Style[HtmlTextWriterStyle.PaddingRight] = "5px";
				fieldCell.ForeColor = System.Drawing.Color.DarkSlateGray;
				fieldCell.Text = value.DisplayName;
				fieldRow.Cells.Add(fieldCell);
				table.Rows.Add(fieldRow);

				if (entry.Operation == AuditOperation.Update)
				{
					TableRow oldValueRow = new TableRow();
					TableCell oldValueCell = new TableCell();
					oldValueCell.ForeColor = System.Drawing.Color.DarkRed;
					oldValueCell.Height = Unit.Percentage(100);
					SetValue(oldValueCell, value.OldValue, value.Format);
					oldValueRow.Cells.Add(oldValueCell);
					table.Rows.Add(oldValueRow);
				}

				TableRow newValueRow = new TableRow();
				TableCell newValueCell = new TableCell();
				newValueCell.ForeColor = System.Drawing.Color.DarkSlateGray;
				if (entry.Operation == AuditOperation.Insert || entry.Operation == AuditOperation.Update) newValueCell.ForeColor = System.Drawing.Color.DarkGreen;
				if (entry.Operation == AuditOperation.Delete) newValueCell.ForeColor = System.Drawing.Color.DarkRed;
				newValueCell.Height = Unit.Percentage(100);
				SetValue(newValueCell, value.NewValue, value.Format);
				newValueRow.Cells.Add(newValueCell);
				table.Rows.Add(newValueRow);

				pa.AddParsedSubObject(table);
			}
			cell.Controls.Add(panel);
		}
        protected void DrawChangesDiv(TableCell cell, AuditEntry entry)
        {
            PXPanel panel = new PXPanel();

            panel.ContentLayout.Layout      = LayoutType.Stack;
            panel.ContentLayout.Orientation = UI.Orientation.Horizontal;
            panel.RenderStyle = FieldsetStyle.Simple;
            panel.ContentLayout.InnerSpacing = false;

            IParserAccessor pa = (IParserAccessor)panel;

            foreach (AuditValue value in entry.Values)
            {
                Table table = new Table();
                table.BorderStyle = BorderStyle.Solid;
                table.BorderWidth = Unit.Pixel(1);
                table.BorderColor = System.Drawing.SystemColors.ControlLight;
                table.Attributes.Add("bordercolor", "ControlLight");
                table.GridLines = GridLines.Both;
                table.Height    = Unit.Percentage(100);

                TableRow  fieldRow  = new TableRow();
                TableCell fieldCell = new TableCell();
                fieldCell.Font.Bold = true;
                fieldCell.Style[HtmlTextWriterStyle.PaddingLeft]  = "5px";
                fieldCell.Style[HtmlTextWriterStyle.PaddingRight] = "5px";
                fieldCell.ForeColor = System.Drawing.Color.DarkSlateGray;
                fieldCell.Text      = value.DisplayName;
                fieldRow.Cells.Add(fieldCell);
                table.Rows.Add(fieldRow);

                if (entry.Operation == AuditOperation.Update)
                {
                    TableRow  oldValueRow  = new TableRow();
                    TableCell oldValueCell = new TableCell();
                    oldValueCell.ForeColor = System.Drawing.Color.DarkRed;
                    oldValueCell.Height    = Unit.Percentage(100);
                    SetValue(oldValueCell, value.OldValue, value.Format);
                    oldValueRow.Cells.Add(oldValueCell);
                    table.Rows.Add(oldValueRow);
                }

                TableRow  newValueRow  = new TableRow();
                TableCell newValueCell = new TableCell();
                newValueCell.ForeColor = System.Drawing.Color.DarkSlateGray;
                if (entry.Operation == AuditOperation.Insert || entry.Operation == AuditOperation.Update)
                {
                    newValueCell.ForeColor = System.Drawing.Color.DarkGreen;
                }
                if (entry.Operation == AuditOperation.Delete)
                {
                    newValueCell.ForeColor = System.Drawing.Color.DarkRed;
                }
                newValueCell.Height = Unit.Percentage(100);
                SetValue(newValueCell, value.NewValue, value.Format);
                newValueRow.Cells.Add(newValueCell);
                table.Rows.Add(newValueRow);

                pa.AddParsedSubObject(table);
            }
            cell.Controls.Add(panel);
        }