Evgeny Pokhilko's Weblog

Programmer's den

Contact database with web interface – EVPO Members

I am opening the source of a small project that I made for a charity organisation http://evpomembers.codeplex.com.

This is a web based contact database. The database stores information on individual members with their contact details, general information and how they are connected to each other. The list of features includes:

  • Editable look-ups for most fields
  • Multiple contacts per one address
  • Convenient search for contact names and addresses
  • Log-in support to prevent unauthorized access
  • Customisable export to Excel compatible XML

Minimal Software requirements:

  • Microsoft SQL 2005
  • .NET Framework 3.5


  • AJAXControlToolkit


EVPO Members Copyright © 2012 Evgeny Pokhilko
evpomail@gmail.com http://www.evpo.net

EVPO Members is free software: you can redistribute it and/or modify

it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

EVPO Members is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with EVPO Members. If not, see http://www.gnu.org/licenses.


  1. Download the source from the SVN repository.
  2. Create ContactData database in SQL and restore empty.bak
  3. Run apsnet_regsql from Visual Studio command line and install aspnetdb. Leave default settings mostly in the wizard.
  4. Create a SQL log-in (ContactDataUser for example with password 1).
  5. Grant access to the log-in to the ContactData and aspnetdb databases.
  6. Download AjaxControlToolkit (http://ajaxcontroltoolkit.codeplex.com/,go to All Downloads and download the package for .NET 3.5 !!!) for .NET 3.5 and unzip it to the AjaxControlToolkit directory.
  7. Open the solution and rebuild it.
  8. Open UI\web.config
  9. Update the two connection strings making them valid for the ContactData and aspnetdb databases respectively.
  10. In Visual Studio go to Project/ASP.NET Configuration
  11. On the opened web page go to Security/Create User
  12. Specify any user name and password so you can log in to the web app
  13. Ctrl+F5 in Visual Studio
  14. You should see the home page of the web app in your browser


1. Address



2. Contact Form



3. Export



4. Relationships



5. Summary



6. Lookups



February 11, 2012 Posted by | .NET, ASP.NET, SQL | , , | Leave a comment

EVPO DC project structure

Project in VS

The picture above is the solution in VS. The application contains three layers: Data Layer, Business Layer and UI.

Evpo.DocCirc.MySqlDL, Evpo.DocCirc.MySqlDL.Update

Data layer. All database access operations are in the MySqlDl project. The Update project contains the changes of the database schema have made from the first version. The MySqlDl project is only accessed by Evpo.DocCirc.Biz. According to the principles UI cannot access the data layer directly. The following picture shows the project files:

MySqlDl files

The Resources folder contains the scripts run during the installation. CreateDatabase creates a new database and all the schema objects. In addition it populates some tables. CreateUsers creates users needed for working with the database. It is run once at setup time as well.

The purpose of the files with Access suffix is to access the database and change its state or obtain business objects from it. In this application business objects are simple and their purpose is only to store data. They don’t do anything. Access suffixed classes work with them. They load and save them from the database. Besides, access objects run queries and change the database state. For example DocCardAccess loads and saves DocCardItem from the database. DocCardItem is the business object representing Document Card.


Common project files

This is the project that all other projects reference. Mostly it contains data storage classes like buisiness objects, global settings and so on. Most classes do not do anything, just store data. The project have common classes that all the layers operate with. For example, DocCardItem class mentioned above is loaded from the database in the data layer and can be processed in the business layer. Then DocCardItem objects are displayed in the UI.


Biz project files

The business layer. It contains all the business logic. It also serves as an intermediate layer between the Data Layer and UI because, as I said above, UI cannot access Data Layer directly. Classes with suffix Data are wrappers providing access to the data layer. An important class in this project is DocCardMovementController. It provides workflow control such as moves the document card to the next stage.


UI project files

The classes in this project comprise the UI layer. Originaly the code in the classes was extracted from asp.net web pages for unit testing, but now I think it is a good idea to move as much as possible from the web pages because they must be as thin as possible and they are not covered by the unit tests.


Messaging project files

As you see in the picture, it’s purpose is to compose and send notification messages such as Action Is Required or event notifications to the users. There are two ways of notification Email messages and instant messages. EmailMessanger and InstantMessanger are for those purposes accordingly. Note that InstantMessager doesn’t send notifications by itself. Instead, it accesses a web service specified in the configuration that sends the actual notification to the users. The web service is not included in this solution.


EDCWeb project files

It contains the web pages. The project references Common, Biz, UI and resources. “G” folder contains pictures that are used in the UI. The “Settings” folder stores configuration files e. g. evpodc.config.  The most important file in the project is AppCode\Global.asax.cs. Inside this file the action starts. It is worth starting from for developers who study the application.

Note that the web pages don’t contain language specific data. The words and sentences are stored in the satelite resource assemblies Evpo.DocCirc.Resources and Evpo.DocCirc.Resources.ru-RU. Their description follows.

Evpo.DocCirc.Resources, Evpo.DocCirc.Resources.RU-ru

Resource project files

Each web page file has a resource file in this project. There are two assemblies at the moment: english and russian. They are used depending on the culture of the project set in web.config. Other languages can be added.

Other projects

EvpoDCUTest – all the unit tests and mock objects live here

EvpoDocCircSetup – the project creating the setup package

May 9, 2009 Posted by | .NET, ASP.NET, Workflow | , , | 3 Comments