private AttributeEditViewModel DataAttribute(int id)
        {
            AttributePermission();
            var model = _viewModelMapperHelper.GetAttributeEdit(id).AttributeEdit;

            ViewBag.Mode = model.AttributeId > 0 ? EDIT : NEW;
            ViewBag.ID   = id;
            ViewBag.SerializedViewModel = PageSerializationHelper.SerializeObject(model);
            var sectionList      = _catalogService.GetListMultiMasterData(MasterType.ATTR_SECTIONS);
            var operationList    = _catalogService.GetListMultiMasterData(MasterType.OPERATION_TYPE, onlyCode: true);
            var relationshipList = _catalogService.GetListMultiMasterData(MasterType.RELATIONSHIP_TYPE, onlyCode: true);

            if (model.AttributeId > 0)
            {
                ViewBag.Section = sectionList
                                  .Where(s => model.SectionListName.Contains(s.Value))
                                  .Select(s => s.Text)
                                  .ToList();

                ViewBag.SectionMulti = sectionList
                                       .Select(s => new MultiSelectListItem
                {
                    Text     = s.Text,
                    Value    = s.Value,
                    Selected = model.Section.Contains(int.Parse(s.Value))
                }).ToList();
                ViewBag.OperationType      = operationList.Where(op => model.OperationListName.Contains(op.Value)).Select(op => op.Text).ToList();
                ViewBag.OperationTypeMulti = operationList
                                             .Select(op => new MultiSelectListItem
                {
                    Text     = op.Text,
                    Value    = op.Value,
                    Selected = model.OperationType.Contains(int.Parse(op.Value))
                }).ToList();
                ViewBag.RelationshipType      = relationshipList.Where(rt => model.RelationListName.Contains(rt.Value)).Select(rt => rt.Text).ToList();
                ViewBag.RelationshipTypeMulti = relationshipList
                                                .Select(rt => new MultiSelectListItem
                {
                    Text     = rt.Text,
                    Value    = rt.Value,
                    Selected = model.RelationshipType.Contains(int.Parse(rt.Value))
                })
                                                .ToList();
            }
            else
            {
                ViewBag.Section               = sectionList;
                ViewBag.SectionMulti          = sectionList;
                ViewBag.OperationType         = operationList;
                ViewBag.OperationTypeMulti    = operationList;
                ViewBag.RelationshipType      = relationshipList;
                ViewBag.RelationshipTypeMulti = relationshipList;
            }

            var types = _catalogService.GetListMasterData(MasterType.ATTR_CONTROL_TYPES);

            var textArea = _catalogService.GetConvergenceMasterDataIdByCode(
                MasterData.ATTR_TEXTAREA, MasterType.ATTR_CONTROL_TYPES);

            ViewBag.IdTextarea = textArea.IsValid ? textArea.Id.ToString() : string.Empty;

            var textBox = _catalogService.GetConvergenceMasterDataIdByCode(
                MasterData.ATTR_TEXTBOX, MasterType.ATTR_CONTROL_TYPES);

            ViewBag.IdTextbox = textBox.IsValid ? textBox.Id.ToString() : string.Empty;

            ViewBag.Type         = types;
            ViewBag.Length       = _viewModelMapperHelper.GetLenghtList();
            ViewBag.VisibilityBr = _viewModelMapperHelper.GetBreRuleList();

            var validations = _catalogService.GetListMasterData(MasterType.ATTR_VALIDATION_TYPES);

            var businessRule = _catalogService.GetConvergenceMasterDataIdByCode(
                MasterData.ATTR_BUSINESS_RULE, MasterType.ATTR_VALIDATION_TYPES);

            ViewBag.IdBusinessRule = businessRule.IsValid ? businessRule.Id.ToString() : string.Empty;

            ViewBag.Validation       = validations;
            ViewBag.Order            = _viewModelMapperHelper.GetColumnSize(1, 99);
            ViewBag.ColumnSize       = _viewModelMapperHelper.GetColumnSize(1, 4);
            ViewBag.ValidationBrName = _viewModelMapperHelper.GetBreRuleList();
            ViewBag.ReferenceList    = _viewModelMapperHelper.GetMasterTypes(REFERENCE).ListResponse;
            ViewBag.EffectiveDate    = DateTime.Now;

            return(model);
        }