Ejemplo n.º 1
0
        public async Task EditVideo(VideoListAdminDTO vid)
        {
            Video = await AdminRep.GetVideoByIdAsync(vid.Id);

            Video.DatabaseCategories = await AdminRep.GetCategoriesAsync();

            Video.IsEdited = true;
        }
Ejemplo n.º 2
0
 public HomeController()
 {
     adminRep      = new AdminRep();
     usersrep      = new UsersRep();
     adRep         = new AdRep();
     interestedRep = new InterestedRep();
     governRep     = new GovernRep();
     val           = 1;
 }
Ejemplo n.º 3
0
 public async Task AddCategory()
 {
     if (await Video.AddCategoryToDatabase(CurrentUser))
     {
         Video.NewCategory.Name    = "";
         Video.NewCategory.Name_en = "";
         Video.DatabaseCategories  = await AdminRep.GetCategoriesAsync();
     }
 }
Ejemplo n.º 4
0
        public async Task CreateCustomVideo()
        {
            if (Video.DatabaseCategories.Count() == 0)
            {
                Video.DatabaseCategories = await AdminRep.GetCategoriesAsync();
            }
            Video.IsCustom = true;
            List <CategoryDTO> list = new List <CategoryDTO>();

            for (int i = 0; i < 3; i++)
            {
                CategoryDTO cat = new CategoryDTO();
                list.Add(cat);
            }
            Video.Categories = list;
        }
Ejemplo n.º 5
0
 public async Task OpenModal(VideoListAdminDTO vid)
 {
     Video.Duration = vid.Duration;
     Video.HD       = vid.HD;
     Video.Img      = vid.Img;
     Video.Preview  = vid.Preview;
     Video.Title    = vid.Title;
     Video.Title_en = vid.Title_en;
     Video.Url      = vid.Url;
     Video.Id       = vid.Id;
     if (SelectedWebCategory == "gay")
     {
         Video.AllowMain       = false;
         Video.CheckBoxEnabled = false;
     }
     if (Video.DatabaseCategories.Count() == 0)
     {
         Video.DatabaseCategories = await AdminRep.GetCategoriesAsync();
     }
     if (SwitchWebsite == 0)
     {
         SpiderRep.GetCategoriesRedTube(Video);
     }
     else if (SwitchWebsite == 1)
     {
         SpiderRep.GetCategoriesXhamster(Video);
     }
     else if (SwitchWebsite == 2)
     {
         SpiderRep.GetCategoriesDrTuber(Video);
     }
     else if (SwitchWebsite == 3)
     {
         SpiderRep.GetCategoriesPornHub(Video);
     }
 }
Ejemplo n.º 6
0
 public override Task PreRender()
 {
     Videos.OnLoadingData = option => AdminRep.GetAllVideos(option, CurrentUser);
     return(base.PreRender());
 }
 public HomeController()
 {
     adminRep = new AdminRep();
     usersrep = new UsersRep();
     adRep    = new AdRep();
 }