public override void Init(Guid subscriberId)
        {
            if (CategorySearchRepository.Any(subscriberId))
            {
                return;
            }
            IEnumerable <SalaryCategoryEntity> categories = new List <SalaryCategoryEntity> {
                new SalaryCategoryEntity {
                    Name         = "工资",
                    SubscriberId = subscriberId
                },
                new SalaryCategoryEntity {
                    Name         = "奖金",
                    SubscriberId = subscriberId
                },
                new SalaryCategoryEntity {
                    Name         = "报销",
                    SubscriberId = subscriberId
                },
                new SalaryCategoryEntity {
                    Name         = "补贴",
                    SubscriberId = subscriberId
                }
            };

            CategoryAddRepository.AddEntities(categories);
        }
Esempio n. 2
0
        public override void Init(Guid subscriberId)
        {
            if (CategorySearchRepository.Any(subscriberId))
            {
                return;
            }
            IEnumerable <PurchaseCategoryEntity> categories = new List <PurchaseCategoryEntity> {
                new PurchaseCategoryEntity {
                    Name         = "默认",
                    SubscriberId = subscriberId
                }
            };

            CategoryAddRepository.AddEntities(categories);
        }
        public override void Init(Guid subscriberId)
        {
            if (CategorySearchRepository.Any(subscriberId))
            {
                return;
            }
            IEnumerable <EmployeeCategoryEntity> categories = new List <EmployeeCategoryEntity> {
                new EmployeeCategoryEntity {
                    Name         = "正式员工",
                    SubscriberId = subscriberId
                },
                new EmployeeCategoryEntity {
                    Name         = "临时工",
                    SubscriberId = subscriberId
                }
            };

            CategoryAddRepository.AddEntities(categories);
        }
        public override void Init(Guid subscriberId)
        {
            if (CategorySearchRepository.Any(subscriberId))
            {
                return;
            }
            IEnumerable <AttendanceCategoryEntity> categories = new List <AttendanceCategoryEntity> {
                new AttendanceCategoryEntity {
                    Name         = "出勤",
                    SubscriberId = subscriberId
                },
                new AttendanceCategoryEntity {
                    Name         = "请假",
                    SubscriberId = subscriberId
                }
            };

            CategoryAddRepository.AddEntities(categories);
        }
Esempio n. 5
0
        public override void Init(Guid subscriberId)
        {
            if (CategorySearchRepository.Any(subscriberId))
            {
                return;
            }
            IEnumerable <GoodsCategoryEntity> categories = new List <GoodsCategoryEntity> {
                new GoodsCategoryEntity {
                    Name         = "产品",
                    SubscriberId = subscriberId,
                    Saleable     = true,
                    Purchaseable = false
                },
                new GoodsCategoryEntity {
                    Name         = "原料",
                    SubscriberId = subscriberId,
                    Saleable     = false,
                    Purchaseable = true
                }
            };

            CategoryAddRepository.AddEntities(categories);
        }
Esempio n. 6
0
        public override void Init(Guid subscriberId)
        {
            if (CategorySearchRepository.Any(subscriberId))
            {
                return;
            }
            IEnumerable <StockCategoryEntity> categories = new List <StockCategoryEntity> {
                new StockCategoryEntity {
                    Name         = "当前库存",
                    SubscriberId = subscriberId
                },
                new StockCategoryEntity {
                    Name         = "出库记录",
                    SubscriberId = subscriberId
                },
                new StockCategoryEntity {
                    Name         = "入库记录",
                    SubscriberId = subscriberId
                },
            };

            CategoryAddRepository.AddEntities(categories);
        }
Esempio n. 7
0
        protected virtual bool Exist(string name)
        {
            var subscriberId = UserContext.Current.SubscriberId;

            return(CategorySearchRepository.Any(subscriberId, name));
        }