示例#1
0
        private Video ReceiveHtml()
        {
            ConfigBSO configBSO = new ConfigBSO();
            Config config = configBSO.GetAllConfig(Language.lang);
            int thumb_w = Convert.ToInt32(config.Product_large_w);
            int thumb_h = Convert.ToInt32(config.Product_large_h);


            string path = Request.PhysicalApplicationPath.Replace(@"\", "/") + "/Upload/Video/";
            commonBSO commonBSO = new commonBSO();
            string icon = commonBSO.UploadImage(file_icon, path, thumb_w, thumb_h);

            string pathvideo = Request.PhysicalApplicationPath.Replace(@"\", "/") + "/Upload/Video/Files/";
            string file_upload = commonBSO.UploadVideo(txtFileName, pathvideo, 18000000000000);


            Video video = new Video();
            video.VideoID = (hddVideoID.Value != "") ? Convert.ToInt32(hddVideoID.Value) : 0;
            video.VideoName = txtVideoName.Text;
            video.VideoUrl = "";
            video.VideoEmbed = txtVideoUrl.Text;            
            video.Image = (icon != "") ? icon : hddIcon.Value;
            video.FileName = (file_upload != "") ? file_upload : hddFileName.Value;

            video.ShortDescribe = txtShortDescribe.Text;
            video.PostDate = txtRadDate.SelectedDate.Value;
            video.IsHome = Convert.ToBoolean(rdbIsHome.SelectedValue);
            video.VideoType = Convert.ToBoolean(rdbType.SelectedValue);
            video.Language = NgonNgu.SelectedValue;
            return video;
        }