Esempio n. 1
0
        public bool IsReference(int branchId)
        {
            var amountOfReferences = _dataBaseSqlServerOrmLite.Count <BranchDealer>(branchDealer => branchDealer.BranchId == branchId);

            amountOfReferences += _dataBaseSqlServerOrmLite.Count <Worker>(worker => worker.BranchId == branchId && worker.IsActive);
            return(amountOfReferences.IsNotZero());
        }
Esempio n. 2
0
        public bool IsReference(int roleId)
        {
            var amountOfReferences = _dataBaseSqlServerOrmLite.Count <User>(user => user.RoleId == roleId && user.IsActive);

            amountOfReferences += _dataBaseSqlServerOrmLite.Count <Worker>(worker => worker.RoleId == roleId && worker.IsActive);
            amountOfReferences += _dataBaseSqlServerOrmLite.Count <RoleConfiguration>(roleConfiguration => roleConfiguration.RoleId == roleId);
            return(amountOfReferences.IsNotZero());
        }
        public bool IsReference(int saucerId)
        {
            var amountOfReferences = _dataBaseSqlServerOrmLite.Count <SaucerConfiguration>(saucerConfiguration => saucerConfiguration.SaucerId == saucerId && saucerConfiguration.IsActive);

            amountOfReferences += _dataBaseSqlServerOrmLite.Count <SaucerMultimedia>(saucerMultimedia => saucerMultimedia.SaucerId == saucerId && saucerMultimedia.IsActive);
            amountOfReferences += _dataBaseSqlServerOrmLite.Count <DealerSaucer>(dealerSaucer => dealerSaucer.SaucerId == saucerId);
            amountOfReferences += _dataBaseSqlServerOrmLite.Count <Menu>(menu => menu.SaucerId == saucerId && menu.IsActive);
            amountOfReferences += _dataBaseSqlServerOrmLite.Count <Reservation>(reservation => reservation.SaucerId == saucerId && reservation.IsActive);
            return(amountOfReferences.IsNotZero());
        }
Esempio n. 4
0
        public bool IsReference(int dealerId)
        {
            var amountOfReferences = _dataBaseSqlServerOrmLite.Count <BranchDealer>(branchDealer => branchDealer.DealerId == dealerId);

            amountOfReferences += _dataBaseSqlServerOrmLite.Count <User>(user => user.DealerId == dealerId && user.IsActive);
            amountOfReferences += _dataBaseSqlServerOrmLite.Count <DealerSaucer>(dealerSaucer => dealerSaucer.DealerId == dealerId);
            amountOfReferences += _dataBaseSqlServerOrmLite.Count <Menu>(menu => menu.DealerId == dealerId && menu.IsActive);
            amountOfReferences += _dataBaseSqlServerOrmLite.Count <Reservation>(reservation => reservation.DealerId == dealerId && reservation.IsActive);
            return(amountOfReferences.IsNotZero());
        }
        public bool IsReference(int diseaseId)
        {
            var amountOfReferences = _dataBaseSqlServerOrmLite.Count <Warning>(warning => warning.DiseaseId == diseaseId && warning.IsActive);

            return(amountOfReferences.IsNotZero());
        }
 public int TotalRecords()
 {
     return(_dataBaseSqlServerOrmLite.Count(_query));
 }
        public bool IsReference(int companyId)
        {
            var amountOfReferences = _dataBaseSqlServerOrmLite.Count <Branch>(branch => branch.CompanyId == companyId && branch.IsActive);

            return(amountOfReferences.IsNotZero());
        }
        public bool IsReference(int departmentId)
        {
            var amountOfReferences = _dataBaseSqlServerOrmLite.Count <Worker>(worker => worker.DepartmentId == departmentId && worker.IsActive);

            return(amountOfReferences.IsNotZero());
        }
        public bool IsReference(int regionId)
        {
            var amountOfReferences = _dataBaseSqlServerOrmLite.Count <Company>(company => company.RegionId == regionId && company.IsActive);

            return(amountOfReferences.IsNotZero());
        }
        public bool IsReference(int workerId)
        {
            var amountOfReferences = _dataBaseSqlServerOrmLite.Count <Reservation>(reservation => reservation.WorkerId == workerId && reservation.IsActive);

            return(amountOfReferences.IsNotZero());
        }
        public bool IsReference(int ingredientId)
        {
            var amountOfReferences = _dataBaseSqlServerOrmLite.Count <SaucerConfiguration>(saucerConfiguration => saucerConfiguration.IngredientId == ingredientId && saucerConfiguration.IsActive);

            return(amountOfReferences.IsNotZero());
        }
Esempio n. 12
0
        public bool IsReference(int ingredientGroupId)
        {
            var amountOfReferences = _dataBaseSqlServerOrmLite.Count <Ingredient>(ingredient => ingredient.IngredientGroupId == ingredientGroupId && ingredient.IsActive);

            return(amountOfReferences.IsNotZero());
        }