예제 #1
0
        public ModulesGetPageDTO Modules_GetPage(string pageid, string dataRowId = "")
        {
            ModulesGetPageDTO dto = new ModulesGetPageDTO();

            postData.Clear();
            postData.Add("apiid", ModulesSystem_apiid);
            postData.Add("apikey", ModulesSystem_apikey);
            try
            {
                postData.Add("pageid", pageid);

                if (!string.IsNullOrWhiteSpace(dataRowId))
                {
                    postData.Add("dataRowId", dataRowId);
                }

                string strResponseJsonData = AOCC_ApiHelper.SendPostRequest(Modules_GetPageURL, postData);

                dto = JsonConvert.DeserializeObject <ModulesGetPageDTO>(strResponseJsonData);
            }
            catch (Exception ex)
            {
                oLogService.InsertExternalApiErrorLog(MethodBase.GetCurrentMethod().Name, Modules_GetPageURL, postData, dto, ex.Message);
            }
            return(dto);
        }
예제 #2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        //tagtype 搜尋模式 ( 0 = TAG搜尋 , 1 = 含該TAG的同義字 , 2 = 含該TAG的翻譯字 , 3 = 含該TAG的同義字+翻譯字 )
        public RogSpecFiltersApiRootObj RogSpecFiltersAPI(int website, string tagid, string productline, string tagtype = "3")
        {
            RogSpecFiltersApiRootObj dto = new RogSpecFiltersApiRootObj();

            postData.Clear();
            postData.Add("apiid", RogSpecFiltersApi_apiid);
            postData.Add("apikey", RogSpecFiltersApi_apikey);
            try
            {
                postData.Add("website", website);
                postData.Add("tagid", tagid);
                postData.Add("productline", productline);
                postData.Add("tagtype", tagtype);

                string strJsonData = AOCC_ApiHelper.SendPostRequest(RogSpecFiltersApi_Url, postData);
                dto = JsonConvert.DeserializeObject <RogSpecFiltersApiRootObj>(strJsonData);
            }
            catch (Exception ex)
            {
                oLogService.InsertExternalApiErrorLog(MethodBase.GetCurrentMethod().Name, RogSpecFiltersApi_Url, postData, dto, ex.Message);
            }
            return(dto);
        }