Ejemplo n.º 1
0
        private void SetupPanel()
        {
            if (m_hgai == null)
            {
                return;
            }
            m_lbl_albumname.Text  = String.IsNullOrEmpty(m_hgai.AlbumName) ? "未知编辑" : m_hgai.AlbumName;
            m_lbl_albumlabel.Text = "标签:"; // TODO: + m_hgai.AlbumName ?
            m_lbl_cat.Text        = "分类:" + m_hgai.AlbumCategoryName;
            m_lbl_albumintro.Text = "简介:"; // TODO: + m_hgai.Al
            //TODO:
            if ((ContentPublishPanel.AlbumType)m_hgai.AlbumType == ContentPublishPanel.AlbumType.AudioAlbum)
            {
                m_bte_upload.Text = "上传音频";
            }
            else
            {
                m_bte_upload.Text = "上传视频";
            }

            // TODO: hgpp's isCheck and materialRecycleStatus doens't make sence and can't be retreived by m_hgai
            HGProgramParams hgpp = new HGProgramParams(m_hgai.AlbumId, 2, 1, 5, 1);

            if (Helpers.DebugHelper.getInstance().SamplePrograms)
            {
                hgpp = new HGProgramParams("190323013156596558242", 2, 1, 5, 1);
            }
            m_hg_program = HGRestfulAPI.getInstance().getHGProgram(hgpp);
            LoadPrograms(true);
        }
Ejemplo n.º 2
0
        public HGProgram getHGProgram(HGProgramParams hgpp)
        {
            String resturl = "/platform/material";

            if (hgpp == null)
            {
                throw new Exception("查询节目传递的参数为空");
            }
            string json_params = JsonConvert.SerializeObject(hgpp);

            Console.WriteLine(json_params);
            String    res       = HttpHelper.HttpPostJsonData(BaseUrl + resturl, json_params, buildHeaderParams(null));
            HGProgram hgprogram = parseHGData <HGProgram>(res);

            return(hgprogram);
        }