コード例 #1
0
        private void btn_AddProductGroup_Click(object sender, EventArgs e)
        {
            var request = new ProductGroupRequest();

            request.Id            = 0;
            request.MemberInfo_Id = memberInfo_Id;
            request.LanguageEnum  = languageEnum;
            request.Parent_Id     = 0L;     //
            request.Name          = "分类名称"; //

            request.FilePath   = "";        //分类主图
            request.ImagePath2 = "";        //分类悬停图

            request.SeoTitle       = "";
            request.SeoKeyWords    = "";
            request.SeoDescription = "";
            request.Summary        = ""; //检测
            request.SubTitle       = ""; //副标题
            request.Content        = ""; //内容


            var jsonResult = proxyHelper.SaveProductGroup(request);

            msg(jsonResult);
        }
コード例 #2
0
ファイル: ProxyHelper.cs プロジェクト: fy65/CMSApiSDK
        /// <summary>
        /// 保存产品分类
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public string SaveProductGroup(ProductGroupRequest request)
        {
            var json = request.ToJson();
            var url  = $"{apiDomain}/api/Proxy/SaveProductGroup";
            Dictionary <String, string> postParameters = new Dictionary <string, string>();

            postParameters.Add("jsonParam", request.ToJson());
            var postData = SignatureHelper.ConvertSignString(postParameters, AccessKeyId, AccessKeySecret);

            var result = httpHelper.GetHtml(new HttpItem()
            {
                URL         = url,
                Method      = "POST",
                ContentType = "application/x-www-form-urlencoded",
                //PostDataType = PostDataType.Byte,
                Postdata = postData,
            });

            return(result.Html);
        }
コード例 #3
0
        public IActionResult UpdateProductGroup(Guid id, [FromBody] ProductGroupRequest productgroup)
        {
            var toBeUpdatenProductGroup = ProductgroupService.UpdateProductGroep(id, (Productgroep)productgroup);

            return(Ok((ProductgroupReponse)toBeUpdatenProductGroup));
        }
コード例 #4
0
        public IActionResult CreateProductGroup([FromBody] ProductGroupRequest productGroup)
        {
            var newProductGroup = ProductgroupService.CreateProductGroup((Productgroep)productGroup);

            return(Ok((ProductgroupReponse)newProductGroup));
        }