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);
        }
Exemplo n.º 2
0
 public void Delete(MeansOfPayment meansOfPayment)
 {
     meansOfPayment.Status = ItemStatus.Deleted;
     Update(meansOfPayment);
 }
Exemplo n.º 3
0
 public void Update(MeansOfPayment meansOfPayment)
 {
     _dbContext.Update(meansOfPayment);
 }
Exemplo n.º 4
0
 public void Add(MeansOfPayment meansOfPayment)
 {
     _dbContext.Add(meansOfPayment);
 }