Ejemplo n.º 1
0
        public void GetTableData(TableCallback callback)
        {
            if (powerWebPartException != null)
            {
                return;
            }

            if (runspace == null)
            {
                Initialize();
            }

            if (functions.ContainsKey(PowerWebPartConstants.FunctionTableProvider))
            {
                EnsureChildControls();

                try
                {
                    Command cmd = new Command(PowerWebPartConstants.FunctionTableProvider);

                    Pipeline tmpPipe = CreatePipeline();
                    tmpPipe.Commands.Add(cmd);
                    Collection <PSObject> results = InvokePipeline(tmpPipe, false);

                    if (results.Count > 0)
                    {
                        callback.Invoke((ICollection)results);
                    }
                }
                catch (Exception ex)
                {
                    powerWebPartException = new PowerControlException(PowerWebPartConstants.FunctionTableProvider, ex);
                }
            }
        }
Ejemplo n.º 2
0
 public void GetTableData(TableCallback callback)
 {
     ChartTableData();
     if (_table != null)
     {
         callback(_table.Rows);
     }
 }
            void IWebPartTable.GetTableData(TableCallback callback)
            {
                DataTable dt = Part.Provide(ProviderPreference.Table) as DataTable;

                if ((dt != null) && (dt.Rows.Count > 0))
                {
                    callback(dt.Rows);
                }
            }
            void IWebPartTable.GetTableData(TableCallback callback)
            {
                DataTable table = this.Part.Provide(roxority_AdapterWebPart.ProviderPreference.Table) as DataTable;

                if ((table != null) && (table.Rows.Count > 0))
                {
                    callback(table.Rows);
                }
            }
Ejemplo n.º 5
0
        public void GetTableData(TableCallback callback)
        {
            if (callback != null)
            {
                EnsureChildControls();
                if (this.tree.SelectedNode != null)
                {
                    long recordId = 0;

                    if (long.TryParse(this.tree.SelectedValue, out recordId))
                    {
                        var profiles = this.OrganizationProfileManager
                                       .GetOrganizationProfile(recordId)
                                       .GetImmediateMembers();
                        callback(profiles);
                    }
                }
            }
        }
 public void GetTableData(TableCallback callback)
 {
     callback(_table.Rows);
 }