コード例 #1
0
    public string GetApplicationConfig(string applicationID)
    {
        if (!header.VerifyCredentials(header.UserName, header.Password, header.Type))
        {
            return(string.Empty);
        }

        Guid gApplicationID = (Guid)XmlSerializer.Deserialize(applicationID);

        DataSet ds = new DataSet();

        DataTable dt = ApplicationsPublicHelper.GetApplicationConfig(gApplicationID);

        ds.Tables.Add(dt);

        MemoryStream ms = new MemoryStream();

        ds.WriteXml(ms);

        ms.Seek(0, SeekOrigin.Begin);

        StreamReader sr = new StreamReader(ms);

        return(sr.ReadToEnd());
    }
コード例 #2
0
    public string GetPublicConfig(string key)
    {
        if (!header.VerifyCredentials(header.UserName, header.Password, header.Type))
        {
            return(string.Empty);
        }

        return(ApplicationsPublicHelper.GetPublicConfig(key));
    }
コード例 #3
0
    public string GetApplicationConfigByKey(string applicationID, string key)
    {
        if (!header.VerifyCredentials(header.UserName, header.Password, header.Type))
        {
            return(string.Empty);
        }

        Guid gApplicationID = (Guid)XmlSerializer.Deserialize(applicationID);

        return(ApplicationsPublicHelper.GetApplicationConfig(gApplicationID, key));
    }
コード例 #4
0
    public string SearchLogs(string applicationID, string conditionXml)
    {
        if (!header.VerifyCredentials(header.UserName, header.Password, header.Type))
        {
            return(string.Empty);
        }

        Guid gApplicationID = (Guid)XmlSerializer.Deserialize(applicationID);

        return(XmlSerializer.Serialize(ApplicationsPublicHelper.SearchLogsByApplication(gApplicationID, conditionXml)));
    }
コード例 #5
0
    public string GetApplicationInfoListByProductID(string productID)
    {
        if (!header.VerifyCredentials(header.UserName, header.Password, header.Type))
        {
            return(string.Empty);
        }

        Guid gProductID = (Guid)XmlSerializer.Deserialize(productID);

        return(XmlSerializer.Serialize(ApplicationsPublicHelper.GetApplicationInfoListByProductID(gProductID)));
    }
コード例 #6
0
    public bool CheckApplication(string applicationID)
    {
        if (!header.VerifyCredentials(header.UserName, header.Password, header.Type))
        {
            return(false);
        }

        Guid gApplicationID = (Guid)XmlSerializer.Deserialize(applicationID);

        return(ApplicationsPublicHelper.CheckApplication(gApplicationID));
    }
コード例 #7
0
    public string GetEventInfoListByApplication(string applicationID, DateTime beginTime, DateTime endTime)
    {
        if (!header.VerifyCredentials(header.UserName, header.Password, header.Type))
        {
            return(string.Empty);
        }

        Guid gApplicationID = (Guid)XmlSerializer.Deserialize(applicationID);

        return(XmlSerializer.Serialize(ApplicationsPublicHelper.GetEventInfoListByApplication(gApplicationID, beginTime, endTime)));
    }
コード例 #8
0
    public string GetServiceInfoListByApplication(string applicationID)
    {
        if (!header.VerifyCredentials(header.UserName, header.Password, header.Type))
        {
            return(string.Empty);
        }

        Guid gApplicationID = (Guid)XmlSerializer.Deserialize(applicationID);

        return(XmlSerializer.Serialize(ApplicationsPublicHelper.GetServiceInfoListByApplication(gApplicationID)));
    }
コード例 #9
0
    public string SendEvent(string applicationID, string eventDefinitionID, string eventData)
    {
        if (!header.VerifyCredentials(header.UserName, header.Password, header.Type))
        {
            return(string.Empty);
        }

        Guid gApplicationID = (Guid)XmlSerializer.Deserialize(applicationID);

        Guid gEventDefinitionID = (Guid)XmlSerializer.Deserialize(eventDefinitionID);

        return(ApplicationsPublicHelper.SendEvent(gApplicationID, gEventDefinitionID, eventData).ToString());
    }
コード例 #10
0
    public bool WriteLog(string applicationID, DateTime createTime, string eventData, string userID,
                         string userName, int eventID, string category, string type)
    {
        if (!header.VerifyCredentials(header.UserName, header.Password, header.Type))
        {
            return(false);
        }

        Guid gApplicationID = (Guid)XmlSerializer.Deserialize(applicationID);

        Guid gUserID = (Guid)XmlSerializer.Deserialize(userID);

        return(ApplicationsPublicHelper.WriteLog(gApplicationID, createTime, eventData, gUserID,
                                                 userName, eventID, category, type));
    }