Name spaces folosite in general intr-un control din EP2009

Lasă un comentariu

28 Mai 2009 de liviustoica55


using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Globalization;
using Microsoft.Dynamics.Framework.Data.Ax;
using Microsoft.Dynamics.Framework.Metadata.Ax;
using Microsoft.Dynamics.Framework.Portal.UI;
using Microsoft.Dynamics.Framework.Portal.UI.WebControls;
using Microsoft.Dynamics.Framework.Portal.UI.WebControls.WebParts;
using Microsoft.Dynamics.Framework.BusinessConnector;
using Proxy = Microsoft.Dynamics.Framework.BusinessConnector.Proxy;
using ApplicationProxy = Microsoft.Dynamics.Portal.Application.Proxy;
using Microsoft.Dynamics.Framework.BusinessConnector.Session;
using Microsoft.Dynamics.Framework.BusinessConnector.Adapter;

un exemplu de infolog

public partial class AxDemo2 : System.Web.UI.UserControl
{

    #region Ax Helper Methods
    ISession AxSession
    {
        get
        {
            AxBaseWebPart webpart = AxBaseWebPart.GetWebpart(this);
            return webpart == null ? null : webpart.Session;
        }
    }
    private void Infolog(Proxy.Exception ex, string s)
    {
        string method;
        switch (ex)
        {
            case Proxy.Exception.Info:
                method = "info";
                break;
            case Proxy.Exception.Warning:
                method = "warning";
                break;
            case Proxy.Exception.Error:
            default:
                method = "error";
                break;
        }
        this.AxSession.AxaptaAdapter.CallStaticClassMethod("Global", method, s);
    }
    #endregion

    protected void Page_Load(object sender, EventArgs e)
    {
        this.Infolog(Proxy.Exception.Error, Labels.GetLabel("@SYS113365"));

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        this.Infolog(Proxy.Exception.Info, "test");
    }
}

Lasă un răspuns

Completează mai jos detaliile despre tine sau dă clic pe un icon pentru autentificare:

Logo WordPress.com

Comentezi folosind contul tău WordPress.com. Dezautentificare / Schimbă )

Poză Twitter

Comentezi folosind contul tău Twitter. Dezautentificare / Schimbă )

Fotografie Facebook

Comentezi folosind contul tău Facebook. Dezautentificare / Schimbă )

Fotografie Google+

Comentezi folosind contul tău Google+. Dezautentificare / Schimbă )

Conectare la %s

%d blogeri au apreciat asta: