void CompanyTest(MySqlConnection connection)
    {
        List <Company> companies = new List <Company>();

        companies.Add(new Company(2, "DigiSoft", 2.5, 4, 20.50M));

        CompanyDAO.InsertCompanies(connection, companies);

        List <Company> companies2 = CompanyDAO.GetCompanies(connection);

        companies2[1].Title = "Dan";

        CompanyDAO.UpdateCompanies(connection, companies2);

        companies2 = CompanyDAO.GetCompanies(connection);

        CompanyDAO.DeleteCompanies(connection, companies);

        companies2 = CompanyDAO.GetCompanies(connection);
    }
Ejemplo n.º 2
0
 /// <summary>
 /// GetCompanies
 /// </summary>
 /// <param name="whereClause"></param>
 /// <param name="dataTable"></param>
 /// <returns></returns>
 public List <CompanyDTO> GetCompanies(Dictionary <string, string> whereClause, ref DataTable dataTable)
 {
     return(companyDao.GetCompanies(whereClause, ref dataTable));
 }