A multi-user Windows desktop application built for Krishi Vigyan Kendra Dhalai, Salema, Tripura - a digital stock book with role-based domains, a full record of who changed what, protected backups and print-ready statements.
Every office keeps a stock book to track the commodities that come in and go out. Krishi Vigyan Kendra Dhalai (KVK Dhalai) is a district level Farm Science Centre under the Indian Council of Agricultural Research, and its stock book needed to be quick to keep and easy to trace - every entry tied to the person who made it and the time they made it.
Core ask: Build a stock book that saves paper and makes tracking easy - with user login, separate access domains, a record of every change and who made it, safe database backup and restore, and printable statements for any commodity.
Stock Book Pro was one of three applications I built for KVK Dhalai during my third year MCA internship (Internship Program II, CA660) at ICFAI University, Tripura, from January to June 2014, under the guidance of Mr. Subrata Shib (Programme Coordinator, KVK Dhalai). The other two are Cash Book Pro and Estimate Pro.
Built as a Windows Forms desktop application in VB.NET, with a local SQL Server Express database attached from the application folder. Stock statements are produced with Microsoft Reporting (an RDLC report) so the printed output matches what the screen shows.
The model is built around critical inputs - the commodities the office tracks. Each critical input has a name, a unit and opening and closing stock balances; every stock detail entry records a receipt (memo details and quantity), a disposal (distribution details, quantity and remarks), or both, and carries the identity of the user who created it.
An Administrator domain holds the higher privileges - changing login details, backup and restore, creating and deleting user domains. Other domains get standard access.
Every successful and unsuccessful login is saved, so unauthorised access attempts can be checked later.
When a user creates, modifies or deletes a stock record, their details and the time of the operation are saved against it.
Administrators can back up and restore the database on demand, with the user and path recorded. A scheduled backup also runs every seven days of use, kept off the Windows drive.
A user can log out and leave work unsaved; the software status stays unchanged until the next login.
Periodic statements for all critical inputs, or only selected ones, can be generated and printed.
Entry rules by design: entries must be made in sequence - no entry can be made before an existing one. To correct an earlier entry, the later entries after it must be deleted first. Any domain member can create a stock record, but only the Administrator domain can delete one. Every one of these operations is logged, so there is no route to unauthorised modification.
After login, the start menu groups everything the office needs day to day: critical inputs, stock details (update, edit, delete), the stockbook statement, current status, transactions and system tools.
The use case diagram shows the full function map of the application for a logged-in user: Login; the KVK Stockbook group (Critical Input with New and Delete, Stock Details with Update, Edit and Delete, and Stockbook Statement); Current Status; Transaction; System Tool (database tasks and user account tasks); About; Logout; and Exit.
Audit records are kept in dedicated tables by event class, so each stream can be queried and reported on its own. The Transactions screen lets any authorised user pick an event type and see every matching record: who did it (domain and user), when, what type of operation, and whether it succeeded.
Data loss is the main risk for a record that is audited. Backup works in layers. An administrator can take a manual backup and restore one on demand; the user, the path and the outcome of each are written to the database audit table. On top of that, a scheduled backup copy is made every seven days of use, and a separate failsafe copy of the database is refreshed each time the application starts - so a restore can be checked against the state of the last use. The backups are kept off the Windows drive so that a Windows crash does not take the data with it.
Only a member of the Administrator domain can create a new user ID, create or delete a domain, or create and delete critical inputs. Any user can change their own login details.
Seven tables cover the data model: the stock record itself, the list of tracked commodities, the user accounts, and four audit tables of identical shape. Column names and lengths below are read from the repository's dataset definition and queries.
| Column | Type | Description |
|---|---|---|
| tidsb | decimal | Transaction ID - unique per stock entry |
| ci | string(50) | Critical input (commodity) name |
| unit | string(20) | Unit of measure |
| date | datetime | Date of entry |
| srmd | string(250) | Stock receive memo details |
| srqty | decimal | Stock receive quantity |
| sddetail | string(250) | Stock disposal / distribution details |
| sdqty | decimal | Stock disposal quantity |
| sdrem | string(250) | Stock disposal remarks |
| osb / csb | decimal | Opening / closing stock balance |
| rui | string | Record entry user info - who created the entry |
| Column | Type | Description |
|---|---|---|
| criticalInput | string | Commodity name |
| ciUnit | string | Unit of measure |
| osb / csb | decimal | Opening / closing stock balance for the commodity |
| domain | string | Access domain of the user (e.g. Administrator) |
| userid | string | User ID |
| pass | string | Password |
| Column | Type | Description |
|---|---|---|
| tid | id | Transaction ID |
| doe | datetime | Date of entry |
| dom | text | Domain of the user at the time of operation |
| userInfo | text | User identity at the time of operation |
| type | text | Operation type (e.g. Login Status, Password Change, Backup Database, Stock Detail Update) |
| rem | text | Outcome / remarks (e.g. Successful, Unsuccessful) |
TTABLELOGIN records login attempts, TTABLEDATABASE records backup, scheduled backup and restore, TTABLENEWDETAILS records new users, domains and critical inputs, and TTABLESTOCKBOOK records stock detail update, edit and delete. The four tables share one schema so the audit pattern stays uniform and each stream can be reported on independently.
The stockbook statement can be produced for all critical inputs or selected ones over a chosen date range. Each row carries the commodity, unit, date, receipt memo details and quantity, disposal details, remarks and quantity, and the opening and closing balances; the report footer names the application and the print time, with space for Prepared By and Approved By.
The full source code - VB.NET forms, report definition, database files and design diagrams - is available on GitHub.