public DataTable DisplayRateHistory(string bankCode)
 {
     using (BRContext db = new BRContext())
     {
         return(DisplayRateHistory(db, bankCode));
     }
 }
 public List <BANK> findAll()
 {
     logger.Info("findAll");
     using (BRContext db = new BRContext())
     {
         return(findAll(db));
     }
 }
示例#3
0
 public List <TENOR> findLike(string tenorCode)
 {
     logger.Info("findLike: " + tenorCode);
     using (BRContext db = new BRContext())
     {
         return(findLike(tenorCode, db));
     }
 }
示例#4
0
 public List <RATE_HISTORY> findAll()
 {
     logger.Info("findAll");
     using (BRContext db = new BRContext())
     {
         return(findAll(db));
     }
 }
 public List <BANK> findLike(string bankCode)
 {
     logger.Info("findLike: " + bankCode);
     using (BRContext db = new BRContext())
     {
         return(findLike(bankCode, db));
     }
 }
示例#6
0
        public RATE_HISTORY get(string bankCode, string tenorCode, BRContext db)
        {
            RATE_HISTORY          rateHistory = new RATE_HISTORY();
            RateHistoryRepository ur          = new RateHistoryRepository(db);

            rateHistory = ur.Get(bankCode, tenorCode);

            return(rateHistory);
        }
示例#7
0
        public TENOR find(string tenorCode, BRContext db)
        {
            TENOR           tenor = new TENOR();
            TenorRepository ur    = new TenorRepository(db);

            tenor = ur.select(tenorCode);

            return(tenor);
        }
        public BANK_RULES find(string bankCode, string tenorCode, BRContext db)
        {
            BANK_RULES         bankRule = new BANK_RULES();
            BankRuleRepository ur       = new BankRuleRepository(db);

            bankRule = ur.select(bankCode, tenorCode);

            return(bankRule);
        }
示例#9
0
        public RATE_HISTORY find(string bankCode, BRContext db)
        {
            RATE_HISTORY          rateHistory = new RATE_HISTORY();
            RateHistoryRepository ur          = new RateHistoryRepository(db);

            rateHistory = ur.select(bankCode);

            return(rateHistory);
        }
        public BANK find(string bankCode, BRContext db)
        {
            BANK           bank = new BANK();
            BankRepository ur   = new BankRepository(db);

            bank = ur.select(bankCode);

            return(bank);
        }
 public void deleteBankRule(BANK_RULES bankRule)
 {
     logger.Info("deleteBankRule:  bankCode " + bankRule.BankCode + " tenorCode: " + bankRule.TenorCode + " start!!!");
     using (BRContext db = new BRContext())
     {
         deleteBankRule(bankRule, db);
         saveChanges(db);
     }
     logger.Info("deleteBankRule:  bankCode " + bankRule.BankCode + " tenorCode: " + bankRule.TenorCode + " end!!!");
 }
 public void addBankRule(BANK_RULES bankRule)
 {
     logger.Info("addBankRule: BankCode " + bankRule.BankCode + " TenorCode " + bankRule.TenorCode + " start!!!");
     using (BRContext db = new BRContext())
     {
         addBankRule(bankRule, db);
         saveChanges(db);
     }
     logger.Info("addBankRule: BankCode " + bankRule.BankCode + " TenorCode " + bankRule.TenorCode + " end!!!");
 }
 public void addErrorLog(ERROR_LOG errorLog)
 {
     logger.Info("addErrorLog: " + errorLog.ID + " start!!!");
     using (BRContext db = new BRContext())
     {
         addErrorLog(errorLog, db);
         saveChanges(db);
     }
     logger.Info("addBank: " + errorLog.ID + " end!!!");
 }
示例#14
0
 public void deleteTenor(TENOR tenor)
 {
     logger.Info("deleteTenor: " + tenor.TenorCode + " start!!!");
     using (BRContext db = new BRContext())
     {
         deleteTenor(tenor, db);
         saveChanges(db);
     }
     logger.Info("deleteTenor: " + tenor.TenorCode + " end!!!");
 }
        public BANK find(Guid bankID, BRContext db)
        {
            BANK bank = new BANK();

            BankRepository br = new BankRepository(db);

            bank = br.select(bankID);

            return(bank);
        }
示例#16
0
 public void deleteTenor(RATE_HISTORY rateHistory)
 {
     logger.Info("deleteRateHistory: " + rateHistory.BankCode + " start!!!");
     using (BRContext db = new BRContext())
     {
         deleteRateHistory(rateHistory, db);
         saveChanges(db);
     }
     logger.Info("deleteRateHistory: " + rateHistory.BankCode + " end!!!");
 }
 public void deleteBank(BANK bank)
 {
     logger.Info("deleteBank: " + bank.BankCode + " start!!!");
     using (BRContext db = new BRContext())
     {
         deleteBank(bank, db);
         saveChanges(db);
     }
     logger.Info("deleteBank: " + bank.BankCode + " end!!!");
 }
示例#18
0
        public TENOR find(Guid tenorID, BRContext db)
        {
            TENOR tenor = new TENOR();

            TenorRepository br = new TenorRepository(db);

            tenor = br.select(tenorID);

            return(tenor);
        }
 public void saveChanges(BRContext db)
 {
     try
     {
         db.SaveChanges();
     }
     catch (Exception e)
     {
         logger.Error("saveChanges", e);
         throw new InvalidOperationException(MessageConstantLogic.ERROR_MODEL_DB_CONTEXT);
     }
 }
示例#20
0
        public RATE_HISTORY get(string bankCode, string tenorCode)
        {
            logger.Info("get: " + bankCode);
            RATE_HISTORY rateHistory = new RATE_HISTORY();

            using (BRContext db = new BRContext())
            {
                rateHistory = get(bankCode, tenorCode, db);
            }

            return(rateHistory);
        }
        public BANK find(string bankCode)
        {
            logger.Info("find: " + bankCode);
            BANK bank = new BANK();

            using (BRContext db = new BRContext())
            {
                bank = find(bankCode, db);
            }

            return(bank);
        }
示例#22
0
        public RATE_HISTORY find(string bankCode)
        {
            logger.Info("find: " + bankCode);
            RATE_HISTORY rateHistory = new RATE_HISTORY();

            using (BRContext db = new BRContext())
            {
                rateHistory = find(bankCode, db);
            }

            return(rateHistory);
        }
示例#23
0
        public TENOR find(Guid TenorID)
        {
            logger.Info("find: " + TenorID);
            TENOR tenor = new TENOR();

            using (BRContext db = new BRContext())
            {
                tenor = find(TenorID, db);
            }

            return(tenor);
        }
        public BANK find(Guid bankID)
        {
            logger.Info("find: " + bankID);
            BANK bank = new BANK();

            using (BRContext db = new BRContext())
            {
                bank = find(bankID, db);
            }

            return(bank);
        }
        public BANK_RULES find(string bankCode, string tenorCode)
        {
            logger.Info("find: bankCode " + bankCode + " tenorCode " + tenorCode);
            BANK_RULES bankRule = new BANK_RULES();

            using (BRContext db = new BRContext())
            {
                bankRule = find(bankCode, tenorCode, db);
            }

            return(bankRule);
        }
示例#26
0
        public TENOR find(string tenorCode)
        {
            logger.Info("find: " + tenorCode);
            TENOR tenor = new TENOR();

            using (BRContext db = new BRContext())
            {
                tenor = find(tenorCode, db);
            }

            return(tenor);
        }
        public BankRuleView findBankRuleView(string bankCode, string tenorCode)
        {
            logger.Info("find: bankCode " + bankCode + " tenorCode " + tenorCode);
            BANK_RULES   bankRule     = new BANK_RULES();
            BankRuleView bankRuleView = new BankRuleView();

            using (BRContext db = new BRContext())
            {
                bankRuleView = convertToModelView(find(bankCode, tenorCode, db));
            }

            return(bankRuleView);
        }
        public void addBankRule(BANK_RULES bankRule, BRContext db)
        {
            BankRuleRepository ur = new BankRuleRepository(db);

            if (ur.select(bankRule.BankCode, bankRule.TenorCode) == null)
            {
                ur.insert(bankRule);
            }
            else
            {
                logger.Warn("addBankRule: " + MessageConstantLogic.ERROR_RECORD_ALREADY_EXISTED + ":  BankCode " + bankRule.BankCode + " TenorCode " + bankRule.TenorCode);
                throw new ArgumentException(MessageConstantLogic.ERROR_RECORD_ALREADY_EXISTED + ":  BankCode " + bankRule.BankCode + " TenorCode " + bankRule.TenorCode);
            }
        }
示例#29
0
        public void addTenor(TENOR tenor, BRContext db)
        {
            TenorRepository ur = new TenorRepository(db);

            if (ur.select(tenor.TenorCode) == null)
            {
                ur.insert(tenor);
            }
            else
            {
                logger.Warn("addTenor: " + MessageConstantLogic.ERROR_RECORD_ALREADY_EXISTED + ": " + tenor.TenorCode);
                throw new ArgumentException(MessageConstantLogic.ERROR_RECORD_ALREADY_EXISTED + ": " + tenor.TenorCode);
            }
        }
        public void addBank(BANK bank, BRContext db)
        {
            BankRepository ur = new BankRepository(db);

            if (ur.select(bank.BankCode) == null)
            {
                ur.insert(bank);
            }
            else
            {
                logger.Warn("addBank: " + MessageConstantLogic.ERROR_RECORD_ALREADY_EXISTED + ": " + bank.BankCode);
                throw new ArgumentException(MessageConstantLogic.ERROR_RECORD_ALREADY_EXISTED + ": " + bank.BankCode);
            }
        }