Exemple #1
0
    public string EP_Add(string EP_TypeId, string EP_UserDefined_Alias, string EP_ProductId, string HCCU_Id, string EP_MAC_Id, string PROPFORMAT, string SK)
    {
        string[,] p = new string[2, 6];
        p[0, 0] = "EP_TypeId";
        p[1, 0] = EP_TypeId;
        p[0, 1] = "EP_UserDefined_Alias";
        p[1, 1] = EP_UserDefined_Alias;
        p[0, 2] = "EP_ProductId";
        p[1, 2] = EP_ProductId;
        p[0, 3] = "HCCU_Id";
        p[1, 3] = HCCU_Id;
        p[0, 4] = "EP_MAC_Id";
        p[1, 4] = EP_MAC_Id;
        p[0, 5] = "PROPFORMAT";
        p[1, 5] = PROPFORMAT;

        if (!COS_SECURITY_TOOL.SECURITY_RequestDecrypt(p, SK)) return  COS_SECURITY_TOOL.SECURITY_ContentEncrypt("-4");

        EP_TypeId = COS_SECURITY_TOOL.SECURITY_ContentDecrypt(EP_TypeId);
        EP_UserDefined_Alias = COS_SECURITY_TOOL.SECURITY_ContentDecrypt(EP_UserDefined_Alias);
        EP_ProductId = COS_SECURITY_TOOL.SECURITY_ContentDecrypt(EP_ProductId);
        HCCU_Id = COS_SECURITY_TOOL.SECURITY_ContentDecrypt(HCCU_Id);
        EP_MAC_Id = COS_SECURITY_TOOL.SECURITY_ContentDecrypt(EP_MAC_Id);

        COS_WEBSERVICE_EP cos_w_e = new COS_WEBSERVICE_EP();
        int[] ret = cos_w_e.EP_Add(EP_TypeId, EP_UserDefined_Alias, EP_ProductId, HCCU_Id, EP_MAC_Id, PROPFORMAT);

        string ret2 = "";
        if (ret[0] > 0) {
            COS_WEBSERVICE_PROD cos_w_p = new COS_WEBSERVICE_PROD();
            ret2 = cos_w_p.GET_PROD_ByEPID(ret[0].ToString());
        }

        return COS_SECURITY_TOOL.SECURITY_ContentEncrypt(ret[0].ToString() + "," + ret[1].ToString() + "," + ret[2].ToString() + "|" + ret2);
    }
Exemple #2
0
    public string PROD_Add(string EP_PRODUCT_NAME, string EP_PRODUCT_DESCRIPTION, string DEV_ID,string SK)
    {
        string[,] p = new string[2, 3];
        p[0, 0] = "EP_PRODUCT_NAME";
        p[1, 0] = EP_PRODUCT_NAME;
        p[0, 1] = "EP_PRODUCT_DESCRIPTION";
        p[1, 1] = EP_PRODUCT_DESCRIPTION;
        p[0, 2] = "DEV_ID";
        p[1, 2] = DEV_ID;

        if (!COS_SECURITY_TOOL.SECURITY_RequestDecrypt(p, SK)) return  COS_SECURITY_TOOL.SECURITY_ContentEncrypt("-4,-4");

        EP_PRODUCT_NAME = COS_SECURITY_TOOL.SECURITY_ContentDecrypt(EP_PRODUCT_NAME);
        EP_PRODUCT_DESCRIPTION = COS_SECURITY_TOOL.SECURITY_ContentDecrypt(EP_PRODUCT_DESCRIPTION);
        DEV_ID = COS_SECURITY_TOOL.SECURITY_ContentDecrypt(DEV_ID);


        COS_WEBSERVICE_PROD cos_w_prod = new COS_WEBSERVICE_PROD();
        int[] s = new int[2];
        s = cos_w_prod.PROD_Add(EP_PRODUCT_NAME, EP_PRODUCT_DESCRIPTION, DEV_ID);
        return  COS_SECURITY_TOOL.SECURITY_ContentEncrypt(s[0].ToString() + "," + s[1].ToString());
    }
Exemple #3
0
    public string PROD_Delete(string EP_PRODUCT_ID,string SK)
    {
        string[,] p = new string[2, 1];
        p[0, 0] = "EP_PRODUCT_ID";
        p[1, 0] = EP_PRODUCT_ID;

        if (!COS_SECURITY_TOOL.SECURITY_RequestDecrypt(p, SK)) return  COS_SECURITY_TOOL.SECURITY_ContentEncrypt("-4");

        EP_PRODUCT_ID = COS_SECURITY_TOOL.SECURITY_ContentDecrypt(EP_PRODUCT_ID);

        COS_WEBSERVICE_PROD cos_w_prod = new COS_WEBSERVICE_PROD();
        return  COS_SECURITY_TOOL.SECURITY_ContentEncrypt(cos_w_prod.PROD_Delete(EP_PRODUCT_ID).ToString());  
    }