Esempio n. 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);
        }
Esempio n. 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);
        }