コード例 #1
0
        public ActionResult ListVideo()
        {
            VideoDAO video = new VideoDAO();
            var      list  = video.ListOf();

            ViewBag.TatCaVideo = list;
            ViewBag.VideoHot   = list;
            return(View());
        }
コード例 #2
0
        public ActionResult PlayVideo(int id)
        {
            VideoDAO video   = new VideoDAO();
            var      VideoId = video.GetVideoById(id);

            ViewBag.TatCaVideo   = video.ListOf();
            Session["VideoById"] = VideoId;

            return(View(VideoId));
        }
コード例 #3
0
 public static bool XoaVideo(string maVideo)
 {
     if (VideoDAO.KTVideoTonTai(maVideo))
     {
         return(VideoDAO.XoaVideo(maVideo));;
     }
     else
     {
         return(false);
     }
 }
コード例 #4
0
 //Sửa video
 public static bool SuaVideo(VideoDTO maVideo)
 {
     if (VideoDAO.KTVideoTonTai(maVideo))
     {
         return(VideoDAO.SuaVideo(maVideo));
     }
     else
     {
         return(false);
     }
 }
コード例 #5
0
 //Thêm  video
 public static bool ThemVideo(VideoDTO vd)
 {
     if (VideoDAO.KTVideoTonTai(vd))
     {
         return(false);
     }
     else
     {
         return(VideoDAO.ThemVideo(vd));
     }
 }
コード例 #6
0
 public static VideoDTO LayThongTinVideo(string maVideo)
 {
     if (!VideoDAO.KTVideoTonTai(maVideo))
     {
         return(null);
     }
     else
     {
         return(VideoDAO.LayThongTinVideo(maVideo));
     }
 }
コード例 #7
0
        //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));
            }
        }
コード例 #8
0
        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);
        }
コード例 #9
0
ファイル: VideoService.cs プロジェクト: dalinhuang/loosoft
 private VideoService()
 {
     //_daoManager = ServiceConfig.GetInstance().DaoManager;
     _videoDao = new VideoDAO();
     //_daoManager.GetDao(typeof(IVideo)) as IVideo;
 }
コード例 #10
0
 //admin
 public static DataTable LaytatcaVideo()
 {
     return(VideoDAO.LayDSVideo());
 }