Exemplo n.º 1
0
 private void LoadData()
 {
     try
     {
         var agentResource = monitorDb.GetAgentResource(
             Convert.ToInt32(ddlAgents.SelectedValue));
         if (agentResource != null)
         {
             treeView1.Visible    = (agentResource != null);
             lblEmptyData.Visible = (agentResource == null);
             if (agentResource != null)
             {
                 LoadJsonToTreeView(treeView1, agentResource.StableDeviceJson);
             }
             treeView1.ExpandAll();
             litDate.Text = $"Last Updated: {agentResource.LastUpdatedDate} UTC";
         }
         else
         {
             treeView1.Visible = false;
             lblError.Visible  = true;
             lblError.Text     = "Unable to get the server Data";
         }
     }
     catch (Exception ex)
     {
         throw new Exception($"Expception:{ex.Message}");
     }
 }
Exemplo n.º 2
0
        private void LoadData()
        {
            var agentResource = monitorDb.GetAgentResource(
                Convert.ToInt32(ddlAgents.SelectedValue));

            grdSoftware.Visible  = (agentResource != null);
            lblEmptyData.Visible = (agentResource == null);
            if (agentResource != null)
            {
                grdSoftware.DataSource = Softwares(agentResource.StableDeviceJson);
                grdSoftware.DataBind();
                litDate.Text = $"Last Updated: {agentResource.LastUpdatedDate} UTC";
            }
        }