public void UpsertAgreement(FeeAgreement feeAgreement) { using (WiseDBContext db = new WiseDBContext()) { var repo = new WiseRepository(db); repo.UpsertAgreement(feeAgreement); } }
public void BulkUpsertAgreements(List <FeeAgreement> feeAgreements) { using (WiseDBContext db = new WiseDBContext()) { var repo = new WiseRepository(db); foreach (var feeAgreement in feeAgreements) { repo.UpsertAgreement(feeAgreement); } } }
public JsonResult SearchTopWiseAccounts(TopAccount data) { using (WiseDBContext db = new WiseDBContext()) { var repo = new WiseRepository(db); return(new JsonResult() { Data = repo.SearchWiseAccounts(data.Account).Take(data.TopResults).ToList(), JsonRequestBehavior = JsonRequestBehavior.AllowGet, }); } }
public JsonResult SearchWiseAccounts(Account account) { using (WiseDBContext db = new WiseDBContext()) { var repo = new WiseRepository(db); return(new JsonResult() { Data = repo.SearchWiseAccounts(account).ToList(), JsonRequestBehavior = JsonRequestBehavior.AllowGet, }); } }
public JsonResult GetAccountAndAgentNamesForProduct(int productId) { using (WiseDBContext db = new WiseDBContext()) { var repo = new WiseRepository(db); return(new JsonResult() { Data = repo.GetAccountAndAgentNamesForProduct(productId).ToList(), JsonRequestBehavior = JsonRequestBehavior.AllowGet, }); } }
public JsonResult GetFeesForAgentAndAccount(int agentId, int accountId) { using (WiseDBContext db = new WiseDBContext()) { var repo = new WiseRepository(db); return(new JsonResult() { Data = repo.GetFeesForAgentAndAccount(agentId, accountId).ToList(), JsonRequestBehavior = JsonRequestBehavior.AllowGet, }); } }