Publication Application Developed in C#

This Publication Software program is developed in C# and compiled using Visual Studio.Net (Final Release). This program requires SQL Server pubs database. The pubs database comes as a sample database when you install SQL Server. 

This program retrieves publishers, title and author information from the SQL Server pubs Database. It also generates XML output of author information. The application provides workflow through its ability to show and hide various controls depending on the user input. It also provides tips at the top of the Main Window. 

The program consists of Login Window (modal Dialog Box) and Main Window shown below in Fig 1 and Fig 2 respectively. The Source code and project files for this application, is available in zip format. 

Login Dialog connects this application to local or remote SQL Server Pubs Database using Windows NT authentication or by specifying username and password for the SQL Server Database.

PubAppDev1.jpg

Fig 1: Login Window for SQL Server Authentication 

PubAppDev2.jpg

Fig 2: Main Window with Publishers Names, Titles and Authors Information 

The application uses design patterns, which calls non-static methods and properties from static method. This was required to transfer SQLConnectionString from Login Window Class to Main Window class (refer to LoginForm.cs and MainForm.cs). Various .Net data components like SQLDataAdapter, and DataSet components helps in implementing database application real fast. The program uses SQLDataAdapter and DataSet for each table (publishers, titles, titleauthor and authors). 

The program uses SQL Server database, but it can be converted to work with any other database with minor changes. Since pubs database is available with SQL Server, I have implemented this application using SQLServer OleDB provider.

PubAppDev3.jpg

Fig 3: Main Window in stateless mode (Not connected to database) 

The program generates XML output. Simply click on the XML button, it pops up SaveFileDialog Box, specify the path and the filename where you want to save the XML document. Fig 4 displays the output generated by the program in XML. The program can be enhanced to make this application as WebService and provide different XSLT style-sheets, so user can view according to his/her preferences. FileStream class (of .Net Library) makes life simple in reading/writing to disk. The application menu items are shown in Fig 5.

PubApp6.jpg

Fig 4: XML Output of Authors Information

PubApp7.jpg

Fig 5: Menu-Items of the Pubs Application

Up Next
    Ebook Download
    View all
    Learn
    View all