/// <summary>
    /// Handle search button click
    /// Get results from webservice and display certain properties
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        RgWsBasStoixEpitRtUser result = ServiceInvoker.InvokeggpsService2(txtAfm.Text.Trim());

        lblResultsOnomasia.Text     = result.onomasia;
        lblResultsOnomasia.Text     = result.onomasia;
        lblResultsActLongDescr.Text = result.actLongDescr;
    }
Пример #2
0
    public static string GetAfmInfo(string afm)
    {
        RgWsBasStoixEpitRtUser result = ServiceInvoker.InvokeggpsService2(afm.Trim());

        JavaScriptSerializer jss = new JavaScriptSerializer();
        string json = jss.Serialize(result);

        //fix date serialization in Json
        json = json.Replace("\"\\/Date(", "new Date(").Replace(")\\/\"", ")");

        return(json);
    }
Пример #3
0
    /// <summary>
    /// Call the gsis web service and returns info about a legal entity (ver2 call)
    /// </summary>
    /// <param name="afm">string : a valid vat number for a legal entity</param>
    /// <returns>RgWsBasStoixEpitRtUser : record with the entity info</returns>
    public static RgWsBasStoixEpitRtUser InvokeggpsService2(string afm)
    {
        decimal transid = 0;

        RgWsBasStoixNClient    client   = new RgWsBasStoixNClient();
        RgWsBasStoixEpitRtUser res      = new RgWsBasStoixEpitRtUser();
        GenWsErrorRtUser       reserror = new GenWsErrorRtUser();

        //Invoke service client
        client.rgWsBasStoixEpit(afm, ref res, ref transid, ref reserror);


        //TODO : check error status
        if (reserror != null && !string.IsNullOrEmpty(reserror.errorCode))
        {
            //handle error code

            //reserror.errorCode
            //reserror.errorDescr
        }

        return(res);
    }
    /// <summary>
    /// Call the gsis web service and returns info about a legal entity (ver2 call)
    /// </summary>
    /// <param name="afm">string : a valid vat number for a legal entity</param>
    /// <returns>RgWsBasStoixEpitRtUser : record with the entity info</returns>
    public static RgWsBasStoixEpitRtUser InvokeggpsService2(string afm)
    {
        decimal transid = 0;

        RgWsBasStoixNClient client = new RgWsBasStoixNClient();
        RgWsBasStoixEpitRtUser res = new RgWsBasStoixEpitRtUser();
        GenWsErrorRtUser reserror = new GenWsErrorRtUser();

        //Invoke service client
        client.rgWsBasStoixEpit(afm, ref res, ref transid, ref reserror);

        //TODO : check error status
        if (reserror != null && !string.IsNullOrEmpty(reserror.errorCode))
        {
            //handle error code

            //reserror.errorCode
            //reserror.errorDescr

        }

        return res;
    }