Exemplo n.º 1
0
 internal ModelBase(Table table, string apiName, string apiRootDirectory, GeneratedSqlType generatedSqlType)
 {
     this._table            = table;
     this._apiName          = apiName;
     this._apiRootDirectory = apiRootDirectory + MyConstants.DirectoryModelBase;
     this._generatedSqlType = generatedSqlType;
     this.Generate();
 }
Exemplo n.º 2
0
 internal ProjectJson(string webAppName, string apiName, string webApiName, string fullFileNamePath, bool isUseWebApi, ProjectFileType projectFileType, GeneratedSqlType generatedSqlType)
 {
     this._webAppName       = webAppName;
     this._apiName          = apiName;
     this._webApiName       = webApiName;
     this._fullFileNamePath = fullFileNamePath;
     this._isUseWebApi      = isUseWebApi;
     this._projectFileType  = projectFileType;
     this._generatedSqlType = generatedSqlType;
     this.Generate();
     if (projectFileType != ProjectFileType.WebAPI || !isUseWebApi)
     {
         return;
     }
     this.ReplaceTextForWebAPI();
 }
Exemplo n.º 3
0
 internal ProjectFile(string fullFileNamePath, ProjectFileType projectFileType, string webAppName, string apiName, string webApiName, bool isUseWebApi, GeneratedSqlType generatedSqlType, bool isUseLogging, bool isUseSecurity, bool isUseCaching, bool isUseAuditLogging, bool isEmailNotification)
 {
     this._fullFileNamePath    = fullFileNamePath;
     this._projectFileType     = projectFileType;
     this._webAppName          = webAppName;
     this._apiName             = apiName;
     this._webApiName          = webApiName;
     this._isUseWebApi         = isUseWebApi;
     this._generatedSqlType    = generatedSqlType;
     this._isUseLogging        = isUseLogging;
     this._isUseSecurity       = isUseSecurity;
     this._isUseCaching        = isUseCaching;
     this._isUseAuditLogging   = isUseAuditLogging;
     this._isEmailNotification = isEmailNotification;
     this.Generate();
 }
 internal FunctionsHelper(Table table, Tables selectedTables, string webAppName, string apiName, string webAppRootDirectory, bool isUseWebApi, bool isUseAuditLogging, GeneratedSqlType generatedSqlType, bool isEmailNotification)
 {
     this._table                  = table;
     this._selectedTables         = selectedTables;
     this._webAppRootDirectory    = webAppRootDirectory + "Pages\\";
     this._webAppName             = webAppName;
     this._apiName                = apiName;
     this._isUseWebApi            = isUseWebApi;
     this._isUseAuditLogging      = isUseAuditLogging;
     this._commaDelimitedColNames = new StringBuilder();
     this._directory              = webAppRootDirectory + "Helper\\";
     this._businessObjectName     = Functions.GetFullyQualifiedTableName(this._table, this._selectedTables, Language.CSharp, this._table.NameFullyQualifiedBusinessObject, apiName);
     this._generatedSqlType       = generatedSqlType;
     this._isEmailNotification    = isEmailNotification;
     this._controllerBaseType     = !isUseWebApi ? ControllerBaseType.ControllerBase : ControllerBaseType.ApiControllerBase;
     this.Generate();
 }
Exemplo n.º 5
0
        internal ProjectJsonLock(string webAppName, string apiName, string webApiName, string fullFileNamePath, bool isUseWebApi, ProjectFileType projectFileType, GeneratedSqlType generatedSqlType, string fileExtension)
        {
            this._webAppName       = webAppName;
            this._apiName          = apiName;
            this._webApiName       = webApiName;
            this._fullFileNamePath = fullFileNamePath;
            this._isUseWebApi      = isUseWebApi;
            this._generatedSqlType = generatedSqlType;
            this._fileExtension    = fileExtension;
            switch (projectFileType)
            {
            case ProjectFileType.WebApp:
                this.ReplaceTextForWebApp();
                break;

            case ProjectFileType.WebAPI:
                if (!isUseWebApi)
                {
                    break;
                }
                this.ReplaceTextForWebAPI();
                break;
            }
        }
Exemplo n.º 6
0
 internal AssignWorkflowStepsModel(MVCGridViewType listViewType, Table table, Tables selectedTables,
                                   string webAppName, string apiName, string webApiName, string webAppRootDirectory, string apiNameDirectory,
                                   string webApiNameDirectory, bool isUseStoredProcedure, bool isSqlVersion2012OrHigher, IsCheckedView isCheckedView,
                                   DatabaseObjectToGenerateFrom generateFrom, ApplicationVersion appVersion,
                                   GeneratedSqlType generatedSqlType, bool isUseLogging, bool isUseCaching, bool isUseAuditLogging, bool isEmailNotification, string connectionString,
                                   ControllerBaseType controllerBaseType = ControllerBaseType.ControllerBase, bool isUseWebApi = false)
 {
     this._table                = table;
     this._selectedTables       = selectedTables;
     this._webAppName           = webAppName;
     this._apiName              = apiName;
     this._webApiName           = webApiName;
     this._webAppRootDirectory  = webAppRootDirectory + "Pages\\";
     this._apiNameDirectory     = apiNameDirectory;
     this._webApiNameDirectory  = webApiNameDirectory;
     this._isUseStoredProcedure = isUseStoredProcedure;
     this._isCheckedView        = isCheckedView;
     this._generateFrom         = generateFrom;
     this._appVersion           = appVersion;
     //this._referencedTables = referencedTables;
     this._colModelNames            = new StringBuilder();
     this._controllerBaseType       = controllerBaseType;
     this._isUseWebApi              = isUseWebApi;
     this._generatedSqlType         = generatedSqlType;
     this._viewType                 = listViewType;
     this._modelName                = Functions.GetFullyQualifiedModelName(table, selectedTables, apiName);
     this._businessObjectName       = Functions.GetFullyQualifiedTableName(this._table, this._selectedTables, Language.CSharp, this._table.NameFullyQualifiedBusinessObject, apiName);
     this._isSqlVersion2012OrHigher = isSqlVersion2012OrHigher;
     this._directory                = webAppRootDirectory + MyConstants.DirectoryControllerBase;
     this._isUseLogging             = isUseLogging;
     this._isUseCaching             = isUseCaching;
     this._isUseAuditLogging        = isUseAuditLogging;
     this._isEmailNotification      = isEmailNotification;
     this._connectionString         = connectionString;
     this.Generate(null, null);
 }
Exemplo n.º 7
0
 internal AssignWorklowStepsPage(MVCGridViewType listViewType, Table table, Tables selectedTables, string webAppRootDirectory, string webAppName, string apiName, ViewNames viewNames, string viewName, string jqueryUITheme, GeneratedSqlType generatedSqlType, AppendAddEditRecordContentType appendAddEditRecordContentType, ApplicationVersion appVersion = ApplicationVersion.ProfessionalPlus, bool isUseWebApi = false, bool isUseAuditLogging = false, string webApiBaseAddress = "")
 {
     this._table                          = table;
     this._selectedTables                 = selectedTables;
     this._webAppRootDirectory            = webAppRootDirectory + "Pages\\";
     this._webAppName                     = webAppName;
     this._apiName                        = apiName;
     this._viewName                       = viewName.Trim();
     this._directory                      = webAppRootDirectory + MyConstants.DirectoryRazorPage + this._table.Name + "\\";
     this._appendAddEditRecordContentType = appendAddEditRecordContentType;
     this._appVersion                     = appVersion;
     this.Generate();
 }