Exemplo n.º 1
0
        public static EntityData GetAllRiskIndex()
        {
            EntityData data2;

            try
            {
                RiskIndexStrategyBuilder builder = new RiskIndexStrategyBuilder();
                builder.AddOrder("IndexLevel", true);
                string     queryString = builder.BuildMainQueryString();
                QueryAgent agent       = new QueryAgent();
                EntityData data        = agent.FillEntityData("RiskIndex", queryString);
                agent.Dispose();
                data2 = data;
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(data2);
        }
Exemplo n.º 2
0
        private void LoadData()
        {
            try
            {
                RiskIndexStrategyBuilder sb = new RiskIndexStrategyBuilder();

                sb.AddOrder("IndexLevel", true);

                string sql = sb.BuildMainQueryString();

                QueryAgent qa     = new QueryAgent();
                EntityData entity = qa.FillEntityData("RiskIndex", sql);
                qa.Dispose();

                dgList.DataSource = entity;
                dgList.DataBind();
                entity.Dispose();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "初始化页面出错:" + ex.Message));
            }
        }