Пример #1
0
 public CheckInRoom()
 {
     dbInfo          = BLL.ServiceModules.IoC.Get <IDbInfo>();
     dbCrud          = BLL.ServiceModules.IoC.Get <IDbCrud>();
     completeCheckIn = IoC.Get <ICompleteCheckIn>();
     Clear();
 }
Пример #2
0
 public Migration(IFileSystem fileSystem)
 {
     _fileSystem    = fileSystem;
     _dbContextInfo = new DbContextInfo();
     _dbInfo        = new DbInfo();
     _table         = new Table();
 }
Пример #3
0
 /// <summary>
 /// Creates an instance of Database.
 /// </summary>
 /// <param name="dbInfo"></param>
 public Database(IDbInfo dbInfo)
 {
     if (dbInfo == null)
     {
         throw new ArgumentNullException("dbInfo");
     }
     DbInfo = dbInfo;
 }
Пример #4
0
 public CompleteCheckIn()
 {
     checkInService = BLL.ServiceModules.IoC.Get <ICheckInService>();
     dbInfo         = BLL.ServiceModules.IoC.Get <IDbInfo>();
     dbCrud         = BLL.ServiceModules.IoC.Get <IDbCrud>();
     checkIn        = new CheckInModel();
     guests         = new List <GuestModel>();
     services       = new List <ServiceData>();
     guestDocuments = new List <GuestDocuments>();
 }
Пример #5
0
 public EmployeeProperties()
 {
     dbInfo          = BLL.ServiceModules.IoC.Get <IDbInfo>();
     checkInService  = BLL.ServiceModules.IoC.Get <ICheckInService>();
     completeCheckIn = IoC.Get <ICompleteCheckIn>();
     checkInRoom     = IoC.Get <ICheckInRoom>();
     checkInGuest    = IoC.Get <ICheckInGuest>();
     Periods         = new List <Period>();
     Periods.Add(new Period(0, "Текущие заселения"));
     Periods.Add(new Period(1, "Предстоящие заселения"));
     Periods.Add(new Period(-1, "Прошедшие заселения"));
     CurrentPeriodIndex = 0;
 }
Пример #6
0
        public void Remove_AllPathExist_PathDeleted(
            [Frozen] IDbInfo dbInfo,
            Migration sut)
        {
            var fileSystem = new MockFileSystem(new Dictionary <string, MockFileData> {
                { @"C:\temp", new MockFileData("Test") },
                { @"C:\temp\Migrations", new MockFileData("Test") },
            });

            _ = dbInfo.Parse("test").Returns(new DbInfo());

            Action act = () => sut.Remove(@"C:\temp", @"C:\temp\Migrations");

            fileSystem.Directory.Exists(@"C:\temp\Migrations").Should().BeFalse();
        }
Пример #7
0
        public void Remove(string projectPath, string migrationsPath)
        {
            if (!_fileSystem.Directory.Exists(projectPath))
            {
                throw new DirectoryNotFoundException(nameof(projectPath));
            }

            _dbInfo = _dbInfo.Parse(_dbContextInfo.GetInfo(projectPath));

            _table.Drop($"Data Source={Path.Combine(projectPath, _dbInfo.DataSource)}");

            if (!_fileSystem.Directory.Exists(migrationsPath))
            {
                throw new DirectoryNotFoundException(nameof(migrationsPath));
            }

            _fileSystem.Directory.Delete(migrationsPath, true);
        }
Пример #8
0
 public CheckInGuest()
 {
     completeCheckIn = IoC.Get <ICompleteCheckIn>();
     dbInfo          = BLL.ServiceModules.IoC.Get <IDbInfo>();
     Clear();
 }
Пример #9
0
 public UserController(IUserDb userDb, IDbInfo dbInfo)
 {
     _userDb = userDb;
     _dbInfo = dbInfo;
 }
Пример #10
0
 public DbService(IDbInfo dbInfo)
 {
     _dbInfo = dbInfo;
 }
Пример #11
0
 public Director()
 {
     Clear();
     dbInfo = BLL.ServiceModules.IoC.Get <IDbInfo>();
 }