private List <Transaction> GetInternal(int status) { var db = new TransactionDB(connectionString); return((from t in db.Transaction where t.Status == status select t).ToList()); }
private List <Transaction> GetInternal(string code) { var db = new TransactionDB(connectionString); return((from t in db.Transaction where t.Code.Equals(code) select t).ToList()); }
private List <Transaction> GetInternal(DateTime start, DateTime end) { var db = new TransactionDB(connectionString); return((from t in db.Transaction where t.Date >= start.Date && t.Date <= end.Date select t).ToList()); }
private void Add(List <Transaction> items) { var db = new TransactionDB(connectionString); foreach (var item in items) { db.Transaction.InsertOnSubmit(item); } try { db.SubmitChanges(); } catch (SqlException) { // todo: perform log } }