public void GetRelateModel()
        {
            RelateModel objRelateModel = new RelateModel();
            int         numberOfPublicPropertiesofRelateModel = objRelateModel.GetType().GetProperties().Count();

            Assert.AreEqual(numberOfPublicPropertiesofRelateModel, RelateModelPropertyCount, "RelateModel properties has been changed");
        }
Esempio n. 2
0
        public static List <RelateModel> ToRelateModel(this SurveyAnswerDTO surveyAnswerDTO)
        {
            List <RelateModel> List        = new List <RelateModel>();
            RelateModel        RelateModel = new RelateModel();

            RelateModel.RootFormId   = surveyAnswerDTO.RootFormId;
            RelateModel.FormId       = surveyAnswerDTO.FormId;
            RelateModel.ViewId       = surveyAnswerDTO.ViewId;
            RelateModel.IsSqlProject = true;
            RelateModel.IsRoot       = surveyAnswerDTO.IsRootResponse;
            RelateModel.ResponseIds.Add(surveyAnswerDTO.ToSurveyAnswerModel());
            List.Add(RelateModel);
            return(List);
        }
Esempio n. 3
0
        public static List <RelateModel> ToRelateModel(this List <FormsHierarchyDTO> formsHierarchyDTOList, string FormId)
        {
            List <RelateModel> List = new List <RelateModel>();

            // Common.DTO.FormsHierarchyDTO FormsHierarchyDTO = FormsHierarchy.Single(X => X.FormId == FormId);
            foreach (var formsHierarchyDTO in formsHierarchyDTOList)
            {
                RelateModel RelateModel = new RelateModel();
                RelateModel.RootFormId   = formsHierarchyDTO.RootFormId;
                RelateModel.FormId       = formsHierarchyDTO.FormId;
                RelateModel.ViewId       = formsHierarchyDTO.ViewId;
                RelateModel.IsSqlProject = formsHierarchyDTO.IsSqlProject;
                RelateModel.IsRoot       = formsHierarchyDTO.IsRoot;
                RelateModel.ResponseIds  = formsHierarchyDTO.ResponseIds.ToSurveyAnswerModel();
                List.Add(RelateModel);
            }
            return(List);
        }
Esempio n. 4
0
        public IActionResult Relate(RelateModel param)
        {
            var result = _menuActionService.SetMenuAction(param.MenuId, param.MenuActionId);

            return(Json(result));
        }