public TENOR find(string tenorCode, BRContext db) { TENOR tenor = new TENOR(); TenorRepository ur = new TenorRepository(db); tenor = ur.select(tenorCode); return(tenor); }
public TENOR find(Guid tenorID, BRContext db) { TENOR tenor = new TENOR(); TenorRepository br = new TenorRepository(db); tenor = br.select(tenorID); return(tenor); }
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); } }