public string GetParentFormName(string formId)
        {
            string parentFormName = null;
            var    formDigest     = FormDigests.SingleOrDefault(d => d.FormId == formId);

            if (formDigest != null && formDigest.IsChildForm)
            {
                var parentFormDigest = GetFormDigest(formDigest.ParentFormId);
                parentFormName = parentFormDigest != null ? parentFormDigest.FormName : null;
            }
            return(parentFormName);
        }
        public string GetRootFormName(string formId)
        {
            string rootFormName = null;
            var    formDigest   = FormDigests.SingleOrDefault(d => d.FormId == formId);

            if (formDigest != null)
            {
                if (formDigest.IsRootForm)
                {
                    rootFormName = formDigest.FormName;
                }
                else
                {
                    var rootFormDigest = GetFormDigest(formDigest.RootFormId);
                    rootFormName = rootFormDigest != null ? rootFormDigest.FormName : null;
                }
            }
            return(rootFormName);
        }
 public FormDigest GetFormDigestByFormName(string formName)
 {
     formName = formName.ToLower();
     return(FormDigests.SingleOrDefault(f => f.FormName.ToLower() == formName));
 }
 public FormDigest GetFormDigest(string formId)
 {
     return(FormDigests.SingleOrDefault(f => f.FormId == formId));
 }
        public string GetFormName(string formId)
        {
            var formDigest = FormDigests.SingleOrDefault(d => d.FormId == formId);

            return(formDigest != null ? formDigest.FormName : null);
        }
        public string GetParentFormId(string formId)
        {
            var formDigest = FormDigests.SingleOrDefault(d => d.FormId == formId);

            return(formDigest != null ? formDigest.ParentFormId : null);
        }
        public string GetParentFormIdByViewId(int viewId)
        {
            var formDigest = FormDigests.SingleOrDefault(d => d.ViewId == viewId);

            return(formDigest != null ? formDigest.ParentFormId : null);
        }