public override void FetchParamsMeta(IServiceClient ServiceClient, IRedisClient redis, EbControl[] Allctrls, Service service) { EbChartVisualization ChartVisualization = EbFormHelper.GetEbObject <EbChartVisualization>(TVRefId, ServiceClient, redis, service); if (string.IsNullOrEmpty(ChartVisualization.DataSourceRefId)) { throw new FormException($"Missing Data Reader of Chart control view that is connected to {this.Label}."); } EbDataReader DrObj = EbFormHelper.GetEbObject <EbDataReader>(ChartVisualization.DataSourceRefId, ServiceClient, redis, service); this.ParamsList = DrObj.GetParams(redis as RedisClient); }
public string GetSql(Service service)// duplicate { EbDataReader dr = EbFormHelper.GetEbObject <EbDataReader>(this.DataSourceId, null, service.Redis, service); string Sql = dr.Sql.Trim(); if (Sql.LastIndexOf(";") == Sql.Length - 1) { Sql = Sql.Substring(0, Sql.Length - 1); } return(Sql); }
public void InitFromDataBase(JsonServiceClient ServiceClient, IRedisClient redis) { EbChartVisualization ChartVisualization = EbFormHelper.GetEbObject <EbChartVisualization>(TVRefId, ServiceClient, redis, null); this.ChartVisualizationJson = EbSerializers.Json_Serialize(ChartVisualization); }