Пример #1
0
        private void Fill()
        {
            Clients  = FillClientsList();
            Deposits = FillDeposits();
            Credits  = FillCredits();

            SimpleDepartament = new Departament(this, "SimpleDepartament");
            EntityDepartament = new LegalDepartament(this, "EntityDepartament");
            VipDepartament    = new VIPDepartament(this, "VipDepartament");

            Employees = GetEmployees();

            Logs = new ObservableCollection <Log>();
        }
Пример #2
0
        private void DbFillEmployees(SqlConnectionStringBuilder connectionStringBuilder)
        {
            SimpleDepartament = new Departament(this, "SimpleDepartament");
            EntityDepartament = new LegalDepartament(this, "EntityDepartament");
            VipDepartament    = new VIPDepartament(this, "VipDepartament");

            using (var connector = new SqlConnector(connectionStringBuilder))
            {
                // 1 - Simple Departament
                DbFillEmployees(connector, SimpleDepartament, 1);

                // 2 - VipDepartametn
                DbFillEmployees(connector, VipDepartament, 2);

                // 3 - Entity Departametn
                DbFillEmployees(connector, EntityDepartament, 3);
            }
        }