Exemple #1
0
        public static EntityData GetLastVisualProgress(string ProgressType)
        {
            EntityData data2;

            try
            {
                VisualProgressStrategyBuilder builder = new VisualProgressStrategyBuilder();
                if (ProgressType != "")
                {
                    builder.AddStrategy(new Strategy(VisualProgressStrategyName.ProgressType, ProgressType.ToString()));
                }
                builder.AddOrder("SortID", false);
                string     queryString = builder.BuildMainQueryString();
                QueryAgent agent       = new QueryAgent();
                agent.SetTopNumber(1);
                EntityData data = agent.FillEntityData("VisualProgress", queryString);
                agent.Dispose();
                data2 = data;
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(data2);
        }
Exemple #2
0
        public static EntityData GetVisualProgressByProgressType(int ProgressType)
        {
            EntityData data2;

            try
            {
                VisualProgressStrategyBuilder builder = new VisualProgressStrategyBuilder();
                builder.AddStrategy(new Strategy(VisualProgressStrategyName.ProgressType, ProgressType.ToString()));
                builder.AddOrder("SortID", true);
                string     queryString = builder.BuildMainQueryString();
                QueryAgent agent       = new QueryAgent();
                EntityData data        = agent.FillEntityData("VisualProgress", queryString);
                agent.Dispose();
                data2 = data;
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(data2);
        }
Exemple #3
0
        private void LoadData()
        {
            try
            {
                VisualProgressStrategyBuilder sb = new VisualProgressStrategyBuilder();

                sb.AddOrder("SortID", true);

                string sql = sb.BuildQueryViewString();

                QueryAgent qa     = new QueryAgent();
                EntityData entity = qa.FillEntityData("VisualProgress", 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));
            }
        }