示例#1
0
 /// <summary>
 /// 初始化数据库表
 /// </summary>
 /// <returns></returns>
 private async Task InitDBTableAsync()
 {
     //如果不存在sqlite数据库,则创建
     //TODO 其他数据源...
     if (driverDelegateType.Equals(typeof(SQLiteDelegate).AssemblyQualifiedName) ||
         driverDelegateType.Equals(typeof(MySQLDelegate).AssemblyQualifiedName) ||
         driverDelegateType.Equals(typeof(PostgreSQLDelegate).AssemblyQualifiedName))
     {
         IRepositorie repositorie = RepositorieFactory.CreateRepositorie(driverDelegateType, dbProvider);
         await repositorie?.InitTable();
     }
 }
示例#2
0
        /// <summary>
        /// 移除异常信息
        /// 因为只能在IJob持久化操作JobDataMap,所有这里直接暴力操作数据库。
        /// </summary>
        /// <param name="jobGroup"></param>
        /// <param name="jobName"></param>
        /// <returns></returns>
        public async Task <bool> RemoveErrLog(string jobGroup, string jobName)
        {
            IRepositorie logRepositorie = RepositorieFactory.CreateRepositorie(driverDelegateType, dbProvider);

            if (logRepositorie == null)
            {
                return(false);
            }

            await logRepositorie.RemoveErrLogAsync(jobGroup, jobName);

            var jobKey    = new JobKey(jobName, jobGroup);
            var jobDetail = await scheduler.GetJobDetail(jobKey);

            jobDetail.JobDataMap[Constant.EXCEPTION] = string.Empty;

            return(true);
        }
示例#3
0
文件: Service.cs 项目: anil713022/IMS
 public Services(IRepositorie iRepositorie)
 {
     _iRepositorie = iRepositorie;
 }
 public PanierService(IRepositorie <Panier> panier)
 {
     this.PanierRepos = panier;
 }
示例#5
0
 public ProduitService(IRepositorie <PRODUIT> prodService)
 {
     this.prodService = prodService;
 }
示例#6
0
 public CommandeService(IRepositorie <COMMANDE> commandeService)
 {
     this.commandeService = commandeService;
 }
 public ClientService(IRepositorie <Utilisateur> cr)
 {
     this.ClientsRepos = cr;
 }
 public CommandeService(IRepositorie <Commande> cmd)
 {
     this.CommandeRepos = cmd;
 }
示例#9
0
        public ProductController(ILogger <ProductController> logger, IRepositorie Repositorie)
        {
            _logger = logger;

            _ProductRepositories1 = Repositorie;
        }
示例#10
0
 public Quantité_produitService(IRepositorie <Quantité_produit> qp)
 {
     this.QPRepos = qp;
 }
示例#11
0
 public UtilisateurService(IRepositorie <USERS> UserService)
 {
     this.UserService = UserService;
 }
示例#12
0
 public AdminService(IRepositorie <Admin> admin)
 {
     this.AdminRepos = admin;
 }
示例#13
0
 public StockServicecs(IRepositorie <STOCK> stockService)
 {
     this.stockService = stockService;
 }
示例#14
0
 public CategorieService(IRepositorie <Cataloge> cata)
 {
     this.CategorieRepos = cata;
 }
示例#15
0
 public VenteService(IRepositorie <VENTE> VentService)
 {
     this.VentService = VentService;
 }
示例#16
0
 public LaboratoireService(IRepositorie <LABORATOIRE> laboService)
 {
     this.laboService = laboService;
 }