private void BindTreviewData() { try { List <OoyalaData.Labels.Item> labels = OoyalaMediaUtils.GetAllLabels(SecretKey, APIKey); trvView.Nodes.Clear(); TreeNode tn = new TreeNode(); AddLevel(ref tn, labels, null); //trvView.ExpandAll(); trvView.CollapseAll(); } catch (Exception e) { lblResults.Text = e.Message; } }
private void BindLabelsTreviewData() { try { List <OoyalaData.Labels.Item> labels = OoyalaMediaUtils.GetAllLabels(SecretKey, APIKey); trvAsset.Nodes.Clear(); TreeNode nd = new TreeNode(); nd.SelectAction = TreeNodeSelectAction.None; //trvAsset.Nodes.Add(nd); AddLevel(ref nd, labels, null); trvAsset.CollapseAll(); //trvAsset.ExpandAll(); } catch (Exception e) { lblResults.Text = e.Message; } }
private void EditMediaAsset(int NewEditIndex) { //if (!(ShowLabels && ShowCustomMetadata)) return; string APIKey, SecretKey; try { string id = (string)dtgAssets.DataKeys[NewEditIndex].Value; APIKey = txtAPIKey.Text; SecretKey = txtSecretKey.Text; if (ShowLabels) { TreeView trvAsset = (TreeView)dtgAssets.Rows[NewEditIndex].FindControl("trvAsset"); List <OoyalaData.Labels.Item> allLabels = OoyalaMediaUtils.GetAllLabels(SecretKey, APIKey); List <OoyalaData.Labels.Item> checkedSource = OoyalaMediaUtils.GetAssetLabels(SecretKey, APIKey, id); TreeNode nd = new TreeNode(); AddLevel(ref trvAsset, ref nd, allLabels, checkedSource, null); //trvAsset.ExpandAll(); trvAsset.CollapseAll(); } if (ShowCustomMetadata) { GridView dtgMetadata = (GridView)dtgAssets.Rows[NewEditIndex].FindControl("dtgMetadata"); Hashtable hsMD = OoyalaMediaUtils.GetAssetCustomMetadata(SecretKey, APIKey, id); DataTable tbl = CreateMetadataTable(hsMD); dtgMetadata.DataSource = tbl; dtgMetadata.DataBind(); } } catch (Exception e) { lblResults.Text = e.Message; } }