private void LoadData() { try { string FileExt = ""; string FileVideoSrc = ""; string FileVideoImage = ""; string Lang = Globals.GetLang(); OtherFunctions obj = new OtherFunctions(); if (_isAgentCat) { _agentCatID = Globals.AgentCatID; } DataSet ds = obj.GetFirstVideo("VideoProduct", _agentCatID, Lang); //DataRow dr = obj.GetRandomVideo("VideoProduct", Globals.AgentCatID, Lang); DataRow dr = ds.Tables[0].Rows[0]; if (dr != null && dr.Table.Rows.Count > 0) { FileExt = Convert.ToString(dr["FileExt"]); FileVideoSrc = Convert.ToString(dr["VideoSrc"]); FileVideoImage = Convert.ToString(dr["VideoImage"]); //if (FileExt.ToLower() == "wmv") //vì wmv dùng control khác nên chỉ ra file video wmv để play //MyVideo.FilePath = Globals.GetUploadsUrl() + FileVideoSrc; } if (FileExt == "flv") { divContent.InnerHtml = VideoHelper.LoadFlvVideo(FileVideoSrc, FileVideoImage, _widthBox, _heightBox); } } catch { } }
public void LoadVideoClip() { try { string FileExt = ""; string FileVideoSrc = ""; string FileVideoImage = ""; string Lang = Globals.GetLang(); OtherFunctions obj = new OtherFunctions(); if (_isAgentCat) { _agentCatID = Globals.AgentCatID; } DataSet ds = obj.GetFirstVideo("VideoProduct", _agentCatID, Lang); //DataRow dr = obj.GetRandomVideo("VideoProduct", Globals.AgentCatID, Lang); DataRow dr = ds.Tables[0].Rows[0]; if (dr != null && dr.Table.Rows.Count > 0) { FileExt = Convert.ToString(dr["FileExt"]); FileVideoSrc = Convert.ToString(dr["VideoSrc"]); FileVideoImage = Convert.ToString(dr["VideoImage"]); //if (FileExt.ToLower() == "wmv") //vì wmv dùng control khác nên chỉ ra file video wmv để play //MyVideo.FilePath = Globals.GetUploadsUrl() + FileVideoSrc; } //Response.Write("<div class=\"title_box\">" + _subject + "</div>"); //Response.Write("<div class=\"border_box\">"); if (FileExt == "flv") { Response.Write(VideoHelper.LoadFlvVideo(FileVideoSrc, FileVideoImage, _widthBox, _heightBox)); } //Response.Write("</div>"); } catch { } }