private string MakeSaveClassBuilder(TableInfo tableInfo, Context configContext, UniqueListInfo infos, string textTemplate) { var classBuilder = GenericTagsTransformer(tableInfo, configContext, textTemplate); var classBuilderForm = string.Empty; if (infos.IsAny()) { foreach (var item in infos) { if (Audit.IsAuditField(item.PropertyName)) { continue; } var itemForm = string.Empty; var pathTemplateField = string.Empty; var textTemplateField = string.Empty; var fieldInBlackListCreate = FieldInBlackListSave(tableInfo, item.PropertyName); if (fieldInBlackListCreate) { continue; } if (item.IsKey == 1 && !IsPropertyNavigationTypeInstance(tableInfo, item.PropertyName)) { pathTemplateField = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, this._defineTemplateFolder.Define(tableInfo), DefineTemplateNameAngular.AngularFieldHidden(tableInfo)); textTemplateField = Read.AllText(tableInfo, pathTemplateField, this._defineTemplateFolder); } else if (item.Type == "string") { pathTemplateField = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, this._defineTemplateFolder.Define(tableInfo), DefineTemplateNameAngular.AngularFieldInput(tableInfo)); textTemplateField = Read.AllText(tableInfo, pathTemplateField, this._defineTemplateFolder); } else if (item.Type == "DateTime" || item.Type == "DateTime?") { pathTemplateField = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, this._defineTemplateFolder.Define(tableInfo), DefineTemplateNameAngular.AngularFieldDate(tableInfo)); textTemplateField = Read.AllText(tableInfo, pathTemplateField, this._defineTemplateFolder); } else if (item.Type == "bool") { pathTemplateField = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, this._defineTemplateFolder.Define(tableInfo), DefineTemplateNameAngular.AngularFieldCheckbox(tableInfo)); textTemplateField = Read.AllText(tableInfo, pathTemplateField, this._defineTemplateFolder); } else if (item.Type == "bool?") { pathTemplateField = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, this._defineTemplateFolder.Define(tableInfo), DefineTemplateNameAngular.AngularFieldRadio(tableInfo)); textTemplateField = Read.AllText(tableInfo, pathTemplateField, this._defineTemplateFolder); } else { if (IsPropertyNavigationTypeInstance(tableInfo, item.PropertyName)) { pathTemplateField = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, this._defineTemplateFolder.Define(tableInfo), DefineTemplateNameAngular.AngularFieldSelect(tableInfo)); textTemplateField = Read.AllText(tableInfo, pathTemplateField, this._defineTemplateFolder); } else { pathTemplateField = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, this._defineTemplateFolder.Define(tableInfo), DefineTemplateNameAngular.AngularFieldInput(tableInfo)); textTemplateField = Read.AllText(tableInfo, pathTemplateField, this._defineTemplateFolder); } } itemForm = FormFieldReplace(configContext, tableInfo, item, textTemplateField); itemForm = itemForm .Replace("<#formType#>", "save") .Replace("<#propertyName#>", item.PropertyName) .Replace("<#className#>", tableInfo.ClassName) .Replace("<#isRequired#>", item.IsNullable == 0 ? "required" : "") .Replace("<#ReletedClass#>", PropertyNavigationTypeInstance(tableInfo, item.PropertyName)); classBuilderForm += string.Format("{0}{1}", itemForm, System.Environment.NewLine); } } classBuilder = classBuilder.Replace("<#formFields#>", classBuilderForm); return(classBuilder); }