Ejemplo n.º 1
0
        public void UpdateParameters(PBIAPIClient powerBiAPI, PBIDatasetParameters parameters)
        {
            if (powerBiAPI == null)
            {
                if (ParentPowerBIAPI == null)
                {
                    throw new Exception("No PowerBI API Object was supplied!");
                }
                else
                {
                    powerBiAPI = ParentPowerBIAPI;
                }
            }

            try
            {
                using (HttpWebResponse response = powerBiAPI.SendPOSTRequest(ApiURL + "/Default.UpdateParameters", PBIJsonHelper.SerializeObject(parameters)))
                {
                    string result = response.ResponseToString();
                }
            }
            catch (Exception e)
            {
                if (!e.Message.Contains("DMTS_MonikerHasNoDatasourcesToBindError"))
                {
                    throw e;
                }
            }
        }
Ejemplo n.º 2
0
 public void UpdateParameters(PBIDatasetParameters parameters)
 {
     UpdateParameters(null, parameters);
 }