Esempio n. 1
0
        public static EntityData GetGroundWorkByWBSCode(string WBSCode)
        {
            EntityData data2;

            try
            {
                GroundWorkStrategyBuilder builder = new GroundWorkStrategyBuilder();
                builder.AddStrategy(new Strategy(GroundWorkStrategyName.WBSCode, WBSCode));
                string     queryString = builder.BuildQueryViewString();
                QueryAgent agent       = new QueryAgent();
                EntityData data        = agent.FillEntityData("GroundWork", queryString);
                agent.Dispose();
                data2 = data;
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(data2);
        }
Esempio n. 2
0
        public static EntityData GetGroundWorkRootByProjectCode(string ProjectCode)
        {
            EntityData data2;

            try
            {
                GroundWorkStrategyBuilder builder = new GroundWorkStrategyBuilder();
                builder.AddStrategy(new Strategy(GroundWorkStrategyName.ProjectCode, ProjectCode));
                builder.AddStrategy(new Strategy(GroundWorkStrategyName.ParentCode, ""));
                builder.AddOrder("TaskName", true);
                string     queryString = builder.BuildQueryViewString();
                QueryAgent agent       = new QueryAgent();
                EntityData data        = agent.FillEntityData("GroundWork", queryString);
                agent.Dispose();
                data2 = data;
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(data2);
        }