Ejemplo n.º 1
0
        public CellSet ExecuteCellSet()
        {
            if (_command != null)
            {
                _command.Parameters.Clear();
                foreach (AdomdParameter param in Parameters)
                {
                    _command.Parameters.Add(new Microsoft.AnalysisServices.AdomdClient.AdomdParameter(param.Name, param.Value));
                }
                return(new CellSet(_command.ExecuteCellSet()));
            }
            else
            {
                CellSet f()
                {
                    _objExcel.Parameters.Clear();
                    foreach (AdomdParameter param in Parameters)
                    {
                        _objExcel.Parameters.Add(new ExcelAdomdClientReference::Microsoft.AnalysisServices.AdomdClient.AdomdParameter(param.Name, param.Value));
                    }
                    return(new CellSet(_objExcel.ExecuteCellSet()));
                }

                return(f());
            }
        }
Ejemplo n.º 2
0
 public CellSet ExecuteCellSet()
 {
     if (_obj != null)
     {
         _obj.Parameters.Clear();
         foreach (AdomdParameter param in _parameters)
         {
             _obj.Parameters.Add(new Microsoft.AnalysisServices.AdomdClient.AdomdParameter(param.Name, param.Value));
         }
         return(new CellSet(_obj.ExecuteCellSet()));
     }
     else
     {
         ExcelAdoMdConnections.ReturnDelegate <CellSet> f = delegate
         {
             _objExcel.Parameters.Clear();
             foreach (AdomdParameter param in _parameters)
             {
                 _objExcel.Parameters.Add(new ExcelAdomdClientReference::Microsoft.AnalysisServices.AdomdClient.AdomdParameter(param.Name, param.Value));
             }
             return(new CellSet(_objExcel.ExecuteCellSet()));
         };
         return(f());
     }
 }