public static Video Insert(Video video)
 {
     VideoDSTableAdapters.TblVideoTableAdapter adapter = new VideoDSTableAdapters.TblVideoTableAdapter();
     VideoDS.TblVideoDataTable table = adapter.InsertVideo(video.CanalID, video.Nombre, video.Descripcion, video.FechaCreacion, video.NombreArchivo, video.FormatoArchivo);
     Video objVideo = RowToDto(table[0]);
     if (table.Count() == 0)
     {
         return null;
     }
     return CargarInformacionCompleta(objVideo);
 }
 public static List<Video> SelectByCanalID(int? canalID)
 {
     VideoDSTableAdapters.TblVideoTableAdapter adapter = new VideoDSTableAdapters.TblVideoTableAdapter();
     VideoDS.TblVideoDataTable table = adapter.SelectByCanalID(canalID);
     List<Video> listaVideos = new List<Video>();
     foreach (VideoDS.TblVideoRow row in table)
     {
         Video objVideo = RowToDto(row);
         listaVideos.Add(CargarInformacionCompleta(objVideo));
     }
     return listaVideos;
 }
    public static Video SelectRandomVideo()
    {
        VideoDSTableAdapters.TblVideoTableAdapter adapter = new VideoDSTableAdapters.TblVideoTableAdapter();
        VideoDS.TblVideoDataTable table = adapter.SelectRandomVideo();
        if (table.Count() == 0)
        {
            return null;
        }

        Video objVideo = RowToDto(table[0]);

        return CargarInformacionCompleta(objVideo);
    }
 public static void Delete(int id)
 {
     VideoDSTableAdapters.TblVideoTableAdapter adapter = new VideoDSTableAdapters.TblVideoTableAdapter();
     adapter.Delete(id);
 }
 public static void Update(Video video)
 {
     VideoDSTableAdapters.TblVideoTableAdapter adapter = new VideoDSTableAdapters.TblVideoTableAdapter();
     adapter.Update(video.CanalID, video.Nombre, video.Descripcion, video.FechaCreacion, video.NombreArchivo, video.FormatoArchivo, video.Id);
 }