public HomeController(DncZeusDbContext dbContext, IMapper mapper,
                       DictionaryService dictionaryService)
 {
     _dbContext         = dbContext;
     _mapper            = mapper;
     _dictionaryService = dictionaryService;
 }
예제 #2
0
        public static IQueryable <object> Set(this DncZeusDbContext _context, string name)
        {
            var assembly   = Assembly.Load("DncZeus.Api");
            var implements = assembly.GetTypes().Where(w => w.IsClass);
            var t          = implements.FirstOrDefault(i => i.Name == name);

            return((IQueryable <object>)_context.GetType().GetMethod("Set").MakeGenericMethod(t).Invoke(_context, null));
        }
예제 #3
0
 public ReceiverController(DncZeusDbContext dbContext, IMapper mapper,
                           DictionaryService dictionaryService, TelegramService telegramService)
 {
     _dbContext         = dbContext;
     _mapper            = mapper;
     _dictionaryService = dictionaryService;
     _telegramService   = telegramService;
 }
 public LogerController(
     DncZeusDbContext dbContext,
     IMapper mapper,
     ILogger <LogerController> logger)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
     _logger    = logger;
 }
예제 #5
0
 public OauthController(
     IOptions <AppAuthenticationSettings> appSettings,
     DncZeusDbContext dbContext,
     RSAHelper rSaHelper)
 {
     _appSettings = appSettings.Value;
     _dbContext   = dbContext;
     _rSaHelper   = rSaHelper;
 }
예제 #6
0
        /// <summary>
        /// 系统数据初始化
        /// </summary>
        /// <param name="context"></param>
        public static void Initialize(DncZeusDbContext context)
        {
            if (context.DncUser.Any())
            {
                return; //数据已经初始化过了
            }

            // 添加一个系统超级管理员
            context.DncUser.Add(new DncUser
            {
                Avatar            = "https://file.iviewui.com/dist/a0e88e83800f138b94d2414621bd9704.png",
                CreatedOn         = DateTime.Now,
                CreatedByUserId   = 1,
                CreatedByUserName = "******",
                DisplayName       = "系统管理员",
                Guid               = new Guid("20263da4-aed4-4aba-a6cc-b985c016858e"),
                LoginName          = "administrator",
                ModifiedByUserId   = 1,
                ModifiedByUserName = "******",
                Password           = "******", // 明文密码,生产环境请自行加密处理
                UserType           = UserType.SuperAdministator
            });
            context.SaveChanges();
        }
예제 #7
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 public AccountController(DncZeusDbContext dbContext)
 {
     _dbContext = dbContext;
 }
 public DepartmentController(DncZeusDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
예제 #9
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 /// <param name="mapper"></param>
 public StatisticsReportController(DncZeusDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
예제 #10
0
 public TaskListController(DncZeusDbContext dbContext)
 {
     _dbContext = dbContext;
 }
예제 #11
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="appSettings"></param>
 public OauthController(IOptions <AppAuthenticationSettings> appSettings, DncZeusDbContext dbContext)
 {
     _appSettings = appSettings.Value;
     _dbContext   = dbContext;
 }
예제 #12
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 /// <param name="mapper"></param>
 public UserController(DncZeusDbContext dbContext, IMapper mapper, IOptions <AppAuthenticationSettings> appSettings)
 {
     _dbContext   = dbContext;
     _mapper      = mapper;
     _appSettings = appSettings.Value;
 }
예제 #13
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 /// <param name="mapper"></param>
 public ECUTableController(DncZeusDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
예제 #14
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 /// <param name="mapper"></param>
 public InstallationPositionController(DncZeusDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 /// <param name="mapper"></param>
 public EquipmentInstallationController(DncZeusDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
예제 #16
0
 public TemplateController(DncZeusDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
 public WageInfoController(DncZeusDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
예제 #18
0
 public CacheData(DncZeusDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
예제 #19
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 /// <param name="mapper"></param>
 public PermissionController(DncZeusDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
예제 #20
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 /// <param name="mapper"></param>
 public DeviceInformationController(DncZeusDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
예제 #21
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 /// <param name="mapper"></param>
 public AfterViewController(DncZeusDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
예제 #22
0
 public UserController(DncZeusDbContext dbContext)
 {
     _dbContext = dbContext;
 }
예제 #23
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 /// <param name="mapper"></param>
 public MenuController(DncZeusDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
예제 #24
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 /// <param name="mapper"></param>
 /// <param name="rSaHelper"></param>
 public UserController(DncZeusDbContext dbContext, IMapper mapper, RSAHelper rSaHelper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
     _rSaHelper = rSaHelper;
 }
예제 #25
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 /// <param name="mapper"></param>
 public TaskListController(DncZeusDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
예제 #26
0
 public WorkTaskController(DncZeusDbContext dbContext)
 {
     _dbContext = dbContext;
 }