public virtual string GroupComponetTransformTagModal(Info info, ConfigExecutetemplate configExecutetemplate)
        {
            if (info.GroupComponents.IsNotAny())
            {
                return(string.Empty);
            }

            var modais = string.Empty;

            foreach (var GroupComponent in info.GroupComponents)
            {
                var template = "field.component.group.tpl";
                if (GroupComponent.Modal == GroupComponent.EModal.Basic)
                {
                    template = "field.component.group.basic.tpl";
                }


                var pathTemplateComponentGroup = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, this._defineTemplateFolder.Define(configExecutetemplate.TableInfo), template);
                var textTemplateComponentGroup = Read.AllText(configExecutetemplate.TableInfo, pathTemplateComponentGroup, this._defineTemplateFolder);


                modais += textTemplateComponentGroup
                          .Replace("<#componentId#>", GroupComponent.ComponentSelector.Replace("-", ""))
                          .Replace("<#componentTitle#>", GroupComponent.Name)
                          .Replace("<#componentTag#>", GroupComponent.ComponentTag);
            }

            return(modais);
        }
        public virtual string GroupComponetTransformTagLink(Info info, ConfigExecutetemplate configExecutetemplate)
        {
            if (info.GroupComponents.IsNotAny())
            {
                return(string.Empty);
            }

            var pathTemplateComponentGroup = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, this._defineTemplateFolder.Define(configExecutetemplate.TableInfo), "field.component.group.tpl");
            var textTemplateComponentGroup = Read.AllText(configExecutetemplate.TableInfo, pathTemplateComponentGroup, this._defineTemplateFolder);

            var component = string.Empty;

            foreach (var GroupComponent in info.GroupComponents)
            {
                var showConditional = string.Empty;
                if (GroupComponent.ShowAfterSelectedItem)
                {
                    showConditional = string.Format("*ngIf=\"vm.model.{0}\"", GroupComponent.ParentIdField);
                }
                else
                {
                    showConditional = string.Format("*ngIf=\"!vm.model.{0}\"", GroupComponent.ParentIdField);
                }


                component += string.Format("<a {3} class=\"m-1\" href=\"#\" data-toggle=\"modal\" (click)=\"$event.preventDefault();{0}Modal.show();show" + GroupComponent.ParentIdField + "Modal" + GroupComponent.LabelModalFieldKeyGenralInfo + "=true;\" title=\"{1}\"><i class=\"{2}\"></i></a>", GroupComponent.ComponentSelector.Replace("-", ""), "{{vm.generalInfo." + GroupComponent.LabelModalFieldKeyGenralInfo + ".label}}", GroupComponent.Icon, showConditional);
            }

            return(component);
        }
        public override string TransformFieldUpload(ConfigExecutetemplate configExecutetemplate, Info info, string propertyName, string textTemplate)
        {
            if (configExecutetemplate.ConfigContext.Arquiteture == ArquitetureType.TransactionScript)
            {
                return(this._transaction.TransformFieldUpload(configExecutetemplate, info, propertyName, textTemplate));
            }

            return(this._ddd.TransformFieldUpload(configExecutetemplate, info, propertyName, textTemplate));
        }
Beispiel #4
0
 public override string TransformFieldTextTag(ConfigExecutetemplate configExecutetemplate, Info info, string propertyName, string textTemplate)
 {
     throw new NotImplementedException();
 }
Beispiel #5
0
 public override string TransformFieldDateTime(ConfigExecutetemplate configExecutetemplate, Info info, string propertyName, string textTemplate, bool onlyDate = false)
 {
     throw new NotImplementedException();
 }