public FormDigest[] GetFormDigestsInRootFormHierarchy(string formId) { var formIdHierarchy = GetFormIdHierarchyByRootFormId(GetRootFormId(formId)); var formDigests = FormDigests.Where(fd => formIdHierarchy.Contains(fd.FormId)).ToArray(); return(formDigests); }
public List <SurveyInfoBO> GetChildInfoByParentId(string ParentFormId, int ViewId) { var surveyInfoBOs = FormDigests.Where(d => d.ParentFormId == ParentFormId && d.ViewId == ViewId).Select(d => d.ToSurveyInfoBO()).ToList(); //List<SurveyInfoBO> result = new List<SurveyInfoBO>(); //try //{ // Guid Id = new Guid(ParentFormId); // using (var Context = DataObjectFactory.CreateContext()) // { // result.Add(Mapper.Map(Context.SurveyMetaDatas.FirstOrDefault(x => x.ParentId == Id && x.ViewId == ViewId))); // } //} //catch (Exception ex) //{ // throw (ex); //} return(surveyInfoBOs); }