Esempio n. 1
0
        private void CreateConstructor()
        {
            var constructor = new VBClassConstructor();

            constructor.Args.Add(new VBArgument($"SqlServerTable", $"table"));
            constructor.Statements.Add($"Me.table = table");
            this.Constructors.Add(constructor);
        }
Esempio n. 2
0
        private void CreateConstructor(DataTable dataTable)
        {
            var constructor = new VBClassConstructor("dbAccess");

            constructor.Args.Add(new VBArgument("SqlServerDbAccess", "dbAccess"));

            this.Constructors.Add(constructor);
            constructor.Statements.Add($"Query = new {dataTable.TableName}Query(Me)");
        }
Esempio n. 3
0
        private void CreateConstructor()
        {
            string connectionStringName = $"{Quotes}{dataset.DataSetName}ConnectionString{Quotes}";
            string parameter            = $"New ConnectionStringBuilder({connectionStringName})";
            var    constructor          = new VBClassConstructor(parameter);

            SetupConstructorStatements(constructor);

            this.Constructors.Add(constructor);
        }
Esempio n. 4
0
 private void SetupConstructorStatements(VBClassConstructor constructor)
 {
     foreach (DataTable table in dataset.Tables)
     {
         string tableName = table.TableName;
         if (table.Prefix.ToLower() == "v")
         {
             constructor.Statements.Add($"{tableName} = New {tableName}View(Me)");
             continue;
         }
         constructor.Statements.Add($"{tableName} = New {tableName}RepositoryPack(Me)");
     }
 }
Esempio n. 5
0
        private void CreateConstructor()
        {
            var constructor = new VBClassConstructor();

            this.Constructors.Add(constructor);
        }