public List <MeansOfPayment> LoadMeansOfPayments(string whereClause) { List <MeansOfPayment> mopList = new List <MeansOfPayment>(); string sqlQuery = "SELECT * FROM " + MeansOfPayment._tableName; sqlQuery += ((whereClause != null && whereClause.Length > 0) ? " WHERE " + whereClause : ""); try { OleDbCommand sqlCommand = new OleDbCommand(sqlQuery, _accessConnection); OleDbDataReader reader = sqlCommand.ExecuteReader(); while (reader.Read()) { MeansOfPayment newMop = new MeansOfPayment(); newMop.Load(reader); mopList.Add(newMop); } } catch (Exception e) { } return(mopList); }
public void Delete(MeansOfPayment meansOfPayment) { meansOfPayment.Status = ItemStatus.Deleted; Update(meansOfPayment); }
public void Update(MeansOfPayment meansOfPayment) { _dbContext.Update(meansOfPayment); }
public void Add(MeansOfPayment meansOfPayment) { _dbContext.Add(meansOfPayment); }