public static List<BaselineIndexModel> GetModels(object cell)
        {
            List<BaselineIndexModel> ret = new List<BaselineIndexModel>();

            using (var ctx = new Entities())
            {
                int parent = ctx.GetCellID(cell);
                var list = ctx.GetBaselineList(parent).ToList();
                list.ForEach(i => ret.Add(new BaselineIndexModel(i)));
            }

            return ret;
        }
Beispiel #2
0
 /// <summary>
 /// Get cell ID from its tag.
 /// </summary>
 /// <param name="cell"></param>
 /// <returns></returns>
 public static int GetCellID(this object cell)
 {
     using (var ctx = new Entities())
     {
         return ctx.GetCellID(cell);
     }
 }
        public static List<RequirementsIndexModel> GetModels(object cell)
        {
            List<RequirementsIndexModel> ret = new List<RequirementsIndexModel>();

            using (var ctx = new Entities())
            {
                int parent = ctx.GetCellID(cell);
                var list = ctx.GetRequirementsIndex(parent, RequirementTypes.Requirement, null).ToList();
                list.ForEach(i => ret.Add(new RequirementsIndexModel(i)));
            }

            return ret;
        }