public bool AddBatch(Batch batch) { db.Batches.Add(batch); return(db.SaveChanges() > 0); }
public Batch GetById(int id) { Batch batch = db.Batches.Find(id); return(batch); }
//Update Batches public bool Update(Batch batch) { db.Entry(batch).State = EntityState.Modified; return(db.SaveChanges() > 0); }
public async Task <IList <ESRTransaction> > GetBatchTransactions(Batch batch) { string Command = SelectBase().Append($@"WHERE BatchID = '{batch.ID}' ORDER BY Member ASC;").ToString(); return(await GetTransactionsAsync(Command)); }
public void AddToBatch(Batch batch) { UpdateText = $@"UPDATE ESRTransactions SET BatchID = '{batch.ID}' WHERE ID = '{ID}';"; new Database(this).UpdateEntry(this); }
public void CompleteBatchTransactions(Batch batch) { UpdateText = $@"UPDATE ESRTransactions SET Complete = 'True' WHERE BatchID = '{batch.ID}';"; new Database(this).UpdateEntry(this); }
public async Task <IList <Comment> > GetBatchComments(Batch batch) { string cmd = $@"SELECT CreatedBy, CreatedOn, CommentText, TransactionID, BatchID FROM Comments WHERE BatchID = '{batch.ID}' ORDER BY CreatedOn ASC;"; return(await GetComments(cmd)); }