public ActionResult ListVideo() { VideoDAO video = new VideoDAO(); var list = video.ListOf(); ViewBag.TatCaVideo = list; ViewBag.VideoHot = list; return(View()); }
public ActionResult PlayVideo(int id) { VideoDAO video = new VideoDAO(); var VideoId = video.GetVideoById(id); ViewBag.TatCaVideo = video.ListOf(); Session["VideoById"] = VideoId; return(View(VideoId)); }
public static bool XoaVideo(string maVideo) { if (VideoDAO.KTVideoTonTai(maVideo)) { return(VideoDAO.XoaVideo(maVideo));; } else { return(false); } }
//Sửa video public static bool SuaVideo(VideoDTO maVideo) { if (VideoDAO.KTVideoTonTai(maVideo)) { return(VideoDAO.SuaVideo(maVideo)); } else { return(false); } }
//Thêm video public static bool ThemVideo(VideoDTO vd) { if (VideoDAO.KTVideoTonTai(vd)) { return(false); } else { return(VideoDAO.ThemVideo(vd)); } }
public static VideoDTO LayThongTinVideo(string maVideo) { if (!VideoDAO.KTVideoTonTai(maVideo)) { return(null); } else { return(VideoDAO.LayThongTinVideo(maVideo)); } }
//public static List<VideoDTO> LayVideoTheoLoai(string maLoaiVideo) //{ // return LoaiVideoDAO.LayLoaiVideo(maLoaiVideo); //} public static DataRow LayVideo(VideoDTO maVideo) { if (!VideoDAO.KTVideoTonTai(maVideo)) { return(null); } else { return(VideoDAO.LayTenVideo(maVideo)); } }
public static VideoModel VideoDomainToApi(VideoDAO video) { VideoModel ret = new VideoModel() { Category = video.Category, DateAdded = video.DateAdded, Char1 = video.Char1, Char2 = video.Char2, Description = video.Description, Player1Id = video.Player1Id, Player2Id = video.Player2Id, Source = video.Source, SubmitContact = video.SubmitContact, SubmitName = video.SubmitName, Title = video.Title, TournamentId = video.TournamentId, URL = video.URL, VideoId = video.VideoId }; return(ret); }
private VideoService() { //_daoManager = ServiceConfig.GetInstance().DaoManager; _videoDao = new VideoDAO(); //_daoManager.GetDao(typeof(IVideo)) as IVideo; }
//admin public static DataTable LaytatcaVideo() { return(VideoDAO.LayDSVideo()); }