INDEX
Sr. No
CONTENTS
Page No.
1
Preface
3
2
Acknowledgement
4
3
Introduction
5
4
Introduction of Visual Basic 2008
6
5
Introduction of Microsoft Access
15
6
Project Profile
28
7
Existing System
29
8
Problem Areas
30
9
Need For The New System
31
10
Proposed System
32
10.1
Objectives To Be Fulfilled
32
10.2
System Features
33
10.2.1
Inputs
33
10.2.2
Outputs
34
10.2.3
Time Line Chart
35
10.2.4
E-R Diagram
36
10.2.5
Data Dictionary
37
10.2.6
Data Entry Screens
43
10.2.7
Reports
114
10.2.8
Testing
144
11
Hardware Software Requirement
146
12
Conclusion
147
13
Bibliography
148
14
User Feedback
149
15
Project CD
150
1. PREFACE
I put my humble efforts to prepare project on “Personal Account Planner” as a part of BCA FINAL YEAR Course as curriculum of JAIPUR NATIONAL UNIVERSITY.
This project-work helped me to understand the Analysis & Designing of computerized automated system and the Database Concepts in developing the real life experience in industrial environment. It also helped me to learn programming fundamentals of latest technologies.
It is can be customized with the client requirements.
2. ACKNOWLEDGEMENT
For every successful expedition there is the commander and the squad to thank to. Fortunately, my journey was guided by many experienced captains and a skilled crew.
I am grateful to Mrs. Seema Kasliwal (DIRECTOR, INTERNATIONAL COLLEGE OF IT & MANAGEMENT) who provided me with a good environment at the college which played its part in my overall development.
I am thankful to Miss Lavi Kasliwal, my internal project guide, for providing their excellent support.
To carve a statue out of a stone one needs appropriate tools and the knowledge to use those tools effectively. My heartily thank to Mrs. Richa Kasliwal Jain, my project guide for their excellent support throughout the project development.
I shall equally thank all my friends and colleagues for helping me out whenever I needed it the most.
My thanks are extended to the Jaipur National University for providing us the platform to exercise my knowledge by including Software Development Project as a part of the course curriculum.
And last, but not the least, thanks to the Internet, World Wide Web, Google, stackoverflow, MSDN and other such resources for just being there, and to their providers for providing them.
With Sincere Regards,
Surendra Singh Rathore
3. INTRODUCTION
As a part of curricular requirement, we are required to undergo training at a project site, for duration of 16 weeks. The project is essential for the development of software after undertaking a proper system study. The major objective of this project is getting exposure to various technical and management practices of IT industry.
My project started in 1st Feb. 2010. Our Director assigned us to complete the project that we had to start from scratch. Not only had he given us an opportunity to go through complete Software Development Life Cycle (SDLC) but also to document our project according to certain standards. We started with Software requirements specification as part of SDLS. We also had meetings with internal guides and external guide as part of requirement gathering and understanding current business processes. We then went to follow the current trend’s modeling language i.e. Unified Modeling Language (UML).
The development phase started with division of modules. We developed our system within four months. Last phase we did was testing as per specification.
This overview of design and development of entire project is included in this report. The report is mainly divided into the following sections.
4. INTRODUCTION OF VISUAL BASIC 2008
Visual Basic .NET (VB.NET) is a multi-paradigm, high level programming language, implemented on the .NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visual Basic language. Along with Visual C#, it is one of the two main languages targeting the .NET framework.
Microsoft currently supplies two main editions of IDE for developing in VB.NET: Microsoft Visual Studio 2013, which is commercial software and Visual Studio Express Edition 2013, which is free of charge. The command-line compiler, VBC.EXE, is installed as part of the freeware .NET Framework SDK. Mono also includes a command-line VB.NET compiler.
Syntax
VB.NET has the following syntax:
Statements can terminate with keywords such as "End If", instead of using "{}"s to group statements.
Statements can also be terminated with a new line, instead of semicolons.
Variables are both assigned and compared using an equals sign.
Round brackets are used with arrays, both to declare them and to get a value at a given index in one of them.
Examples
The following is a very simple VB.NET program, a version of the classic "Hello world" example created as a console application:
Module Module1
Sub Main()
Console.WriteLine("Hello, world!")
End Sub
End Module
The effect is to write the text Hello, world! to the command line. Each line serves a specific purpose, as follows:
Module Module1
This is a module definition, a division of code similar to a class, although modules can contain classes. Modules serve as containers of code that can be referenced from other parts of a program.
It is common practice for a module and the code file, which contains it, to have the same name; however, this is not required, as a single code file may contain more than one module and/or class definition.
Sub Main()
This is the entry point where the program begins execution.[3] Sub is an abbreviation of "subroutine."
Console.WriteLine("Hello, world!")
This line performs the actual task of writing the output. Console is a system object, representing a command-line interface and granting programmatic access to the operating system's standard streams. The program calls the Console method WriteLine, which causes the string passed to it to be displayed on the console. Another common method is using MsgBox (a Message Box).[4]
This piece of code is a solution to Floyd's Triangle:
Imports System.Console
Module Program
Sub Main()
Dim rows As Integer
' Input validation.
Do Until Integer.TryParse(ReadLine("Enter a value for how many rows to be displayed: "),
rows) AndAlso rows >= 1
WriteLine("Allowed range is 1 and {0}", Integer.MaxValue)
Loop
' Output of Floyd's Triangle
Dim current = 1
For row = 1 To rows
For column = 1 To row
Write("{0,-2} ", current)
current += 1
Next
WriteLine()
Next
End Sub
''' <summary>
''' Shadows Console.ReadLine with a version which takes a prompt string.
''' </summary>
Function ReadLine(Optional prompt As String = Nothing) As String
If prompt IsNot Nothing Then
Write(prompt)
End If
Return Console.ReadLine()
End Function
End Module
Comparison with the classic Visual Basic
Main article: Comparison of Visual Basic and Visual Basic .NET
Whether Visual Basic .NET should be considered as just another version of Visual Basic or a completely different language is a topic of debate. There are new additions to support new features, such as structured exception handling and short-circuited expressions. Also, two important data-type changes occurred with the move to VB.NET: compared to VB6, the Integer data type has been doubled in length from 16 bits to 32 bits, and the Long data type has been doubled in length from 32 bits to 64 bits. This is true for all versions of VB.NET. A 16-bit integer in all versions of VB.NET is now known as a Short. Similarly, the Windows Forms GUI editor is very similar in style and function to the Visual Basic form editor.
The things that have changed significantly are the semantics—from those of an object-based programming language running on a deterministic, reference-counted engine based on COM to a fully object-oriented language backed by the .NET Framework, which consists of a combination of the Common Language Runtime (a virtual machine using generational garbage collection and a just-in-time compilation engine) and a far larger class library. The increased breadth of the latter is also a problem that VB developers have to deal with when coming to the language, although this is somewhat addressed by the My feature in Visual Studio 2005.
The changes have altered many underlying assumptions about the "right" thing to do with respect to performance and maintainability. Some functions and libraries no longer exist; others are available, but not as efficient as the "native" .NET alternatives. Even if they compile, most converted VB6 applications will require some level of refactoring to take full advantage of the new language. Documentation is available to cover changes in the syntax, debugging applications, deployment and terminology.
Comparative examples
The following simple examples compare VB and VB.NET syntax. Each example creates a "Hello, World" message box with an OK button.
VB6:
Private Sub Command1_Click()
MsgBox "Hello, World"
End Sub
VB.NET (MsgBox or MessageBox class can be used):
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MessageBox.Show("Hello, World")
End Sub
Both Visual Basic 6 and Visual Basic .NET automatically generate the Sub and End Sub statements when the corresponding button is clicked in design view. Visual Basic .NET will also generate the necessary Class and End Class statements. The developer need only add the statement to display the "Hello, World" message box.
All procedure calls must be made with parentheses in VB.NET, whereas in VB6 there were different conventions for functions (parentheses required) and subs (no parentheses allowed, unless called using the keyword Call).
The names Command1 and Button1 are not obligatory. However, these are default names for a command button in VB6 and VB.NET respectively.
In VB.NET, the Handles keyword is used to make the sub Button1_Click a handler for the Click event of the objectButton1. In VB6, event handler subs must have a specific name consisting of the object's name ("Command1"), an underscore ("_"), and the event's name ("Click", hence "Command1_Click").
There is a function called MsgBox in the Microsoft.VisualBasic namespace which can be used similarly to the corresponding function in VB6. There is a controversy about which function to use as a best practice (not only restricted to showing message boxes but also regarding other features of the Microsoft.VisualBasic namespace). Some programmers prefer to do things "the .NET way", since the Framework classes have more features and are less language-specific. Others argue that using language-specific features makes code more readable (for example, using int (C#) or Integer (VB.NET) instead of System.Int32).
In VB 2008, the inclusion of ByVal sender as Object, ByVal e as EventArgs has become optional.
The following example demonstrates a difference between VB6 and VB.NET. Both examples close the active window.
VB6:
Sub cmdClose_Click()
Unload Me
End Sub
VB.NET:
Sub btnClose_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnClose.Click
Me.Close()
End Sub
The 'cmd' prefix is replaced by the 'btn' prefix, conforming to the new convention previously mentioned.
Visual Basic 6 did not provide common operator shortcuts. The following are equivalent:
VB6:
Sub Timer1_Timer()
Me.Height = Me.Height - 1
End Sub
VB.NET:
Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick
Me.Height -= 1
End Sub
Versions
Succeeding the classic Visual Basic version 6.0, the first version of Visual Basic .NET debuted in 2002. As of 2014, seven versions of Visual Basic .NET are released.
2002 (VB 7.0)
The first version, Visual Basic .NET, relies on .NET Framework 1.0. The most important feature is managed code, which contrasts with the classic Visual Basic.
2003 (VB 7.1)
Visual Basic .NET 2003 was released with .NET Framework 1.1. New features included support for the .NET Compact Framework and a better VB upgrade wizard. Improvements were also made to the performance and reliability of .NET IDE (particularly the background compiler) and runtime. In addition, Visual Basic .NET 2003 was available in the Visual Studio.NET Academic Edition, distributed to a certain number of scholars from each country without cost.
2005 (VB 8.0)
After Visual Basic .NET 2003, Microsoft dropped ".NET" from the name of the product, calling the next version Visual Basic 2005.
For this release, Microsoft added many features intended to reinforce Visual Basic .NET's focus as a rapid application development platform and further differentiate it from C#., including:
Edit and Continue feature[further explanation needed]
Design-time expression evaluation[further explanation needed]
A pseudo-namespace called "My", which provides:
Easy access to certain areas of the .NET Framework that otherwise require significant code to access
Dynamically generated classes (e.g. My.Forms)[further explanation needed]
Improved VB-to-VB.NET converter
A "using" keyword, simplifying the use of objects that require the Dispose pattern to free resources
Just My Code feature, which hides (steps over) boilerplate code written by the Visual Studio .NET IDE and system library code during debugging
Data Source binding, easing database client/server development
To bridge the gaps between itself and other .NET languages, this version added:
Generics[9]
Partial classes, a method of defining some parts of a class in one file and then adding more definitions later; particularly useful for integrating user code with auto-generated code
Operator overloading and nullable types[10]
Support for unsigned integer data types commonly used in other languages
Visual Basic 2005 introduced the IsNot operator that makes 'If X IsNot Y' equivalent to 'If Not X Is Y'. It gained notoriety[11] when it was found to be the subject of a Microsoft patent application.
2008 (VB 9.0)
Visual Basic 9.0 was released along with .NET Framework 3.5 on 19 November 2007.
For this release, Microsoft added many features, including:
A true conditional operator, "If(condition as boolean, truepart, falsepart)", to replace the "IIf" function.
Anonymous types
Support for LINQ
Lambda expressions
XML Literals
Type Inference
Extension methods
2010 (VB 10.0)
In April 2010, Microsoft released Visual Basic 2010. Microsoft had planned to use Dynamic Language Runtime (DLR) for that release[14] but shifted to a co-evolution strategy between Visual Basic and sister language C# to bring both languages into closer parity with one another. Visual Basic's innate ability to interact dynamically with CLR and COM objects has been enhanced to work with dynamic languages built on the DLR such as IronPython and IronRuby.[15] The Visual Basic compiler was improved to infer line continuation in a set of common contexts, in many cases removing the need for the "_" line continuation character. Also, existing support of inline Functions was complemented with support for inline Subs as well as multi-line versions of both Sub and Function lambdas.
2012 (VB 11.0)
Visual Basic .NET 2012 was released along .NET Framework 4.5. Major features introduced in this version include:
Asynchronous programming with "async" and "await" statements
Iterators
Call hierarchy
Caller information
"Global" keyword in "namespace" statements
2013 (VB 12.0)
Visual Basic 2013 was released .NET Framework 4.5.1 and Visual Studio 2013 but did not include new language features.
Cross-platform and open-source development
The creation of open-source tools for VB.NET development has been slow compared to C#, although the Mono development platform provides an implementation of VB.NET-specific libraries and a VB.NET 8.0 compatible compiler written in VB.NET, as well as standard framework libraries such as Windows Forms GUI library.
SharpDevelop and MonoDevelop are open-source alternative IDEs.
5. Introduction Of Ms-Access
Microsoft Access, also known as Microsoft Office Access, is a database management system from Microsoft that combines the relational Microsoft Jet Database Engine with a graphical user interface and software-development tools. It is a member of the Microsoft Office suite of applications, included in the Professional and higher editions or sold separately.
Microsoft Access stores data in its own format based on the Access Jet Database Engine. It can also import or link directly to data stored in other applications and databases.
Software developers and data architects can use Microsoft Access to develop application software, and "power users" can use it to build software applications. Like other Office applications, Access is supported by Visual Basic for Applications, an object-oriented programming language that can reference a variety of objects including DAO (Data Access Objects), ActiveX Data Objects, and many other ActiveX components. Visual objects used in forms and reports expose their methods and properties in the VBA programming environment, and VBA code modules may declare and call Windows operating-system functions.
Uses
In addition to using its own database storage file, Microsoft Access also may be used as the 'front-end' of a program while other products act as the 'back-end' tables, such as Microsoft SQL Server and non-Microsoft products such as Oracle and Sybase. Multiple backend sources can be used by a Microsoft Access Jet Database (accdb and mdb formats). Similarly, some applications such as Visual Basic, ASP.NET, or Visual Studio .NET will use the Microsoft Access database format for its tables and queries. Microsoft Access may also be part of a more complex solution, where it may be integrated with other technologies such as Microsoft Excel, Microsoft Outlook, Microsoft Word, Microsoft PowerPoint and ActiveX Controls.
Access tables support a variety of standard field types, indices, and referential integrity including cascading updates and deletes. Access also includes a query interface, forms to display and enter data, and reports for printing. The underlying Jet database, which contains these objects, is multiuser-aware and handles record-locking.
Repetitive tasks can be automated through macros with point-and-click options. It is also easy to place a database on a network and have multiple users share and update data without overwriting each other's work. Data is locked at the record level which is significantly different from Excel which locks the entire spreadsheet.
There are template databases within the program and for download from their website. These options are available upon starting Access and allow users to enhance a database with predefined tables, queries, forms, reports, and macros. Database templates support VBA code but Microsoft's templates do not include VBA code.
Programmers can create solutions using the programming language Visual Basic for Applications (VBA), which is similar to Visual Basic 6.0 (VB6) and used throughout the Microsoft Office programs such as Excel, Word, Outlook and PowerPoint. Most VB6 code, including the use of Windows API calls, can be used in VBA. Power users and developers can extend basic end-user solutions to a professional solution with advanced automation, data validation, error trapping, and multi-user support.
The number of simultaneous users that can be supported depends on the amount of data, the tasks being performed, level of use, and application design. Generally accepted limits are solutions with 1 GB or less of data (Access supports up to 2 GB) and performs quite well with 100 or fewer simultaneous connections (255 concurrent users are supported). This capability is often a good fit for department solutions. If using an Access database solution in a multi-user scenario, the application should be "split". This means that the tables are in one file called the back end (typically stored on a shared network folder) and the application components (forms, reports, queries, code, macros, linked tables) are in another file called the front end. The linked tables in the front end point to the back end file. Each user of the Access application would then receive his or her own copy of the front end file.
Applications that run complex queries or analysis across large datasets would naturally require greater bandwidth and memory. Microsoft Access is designed to scale to support more data and users by linking to multiple Access databases or using a back-end database like Microsoft SQL Server. With the latter design, the amount of data and users can scale to enterprise-level solutions.
Microsoft Access's role in web development prior to version 2010 is limited. User interface features of Access, such as forms and reports, only work in Windows. In versions 2000 through 2003 an Access object type called Data Access Pages created publishable web pages. Data Access Pages are no longer supported. The Microsoft Jet Database Engine, core to Access, can be accessed through technologies such as ODBC or OLE DB. The data (i.e., tables and queries) can be accessed by web-based applications developed in ASP.NET, PHP, or Java. With the use of Microsoft's Terminal Services and Remote Desktop Application in Windows Server 2008 R2, organizations can host Access applications so they can be run over the web. This technique does not scale the way a web application would but is appropriate for a limited number of users depending on the configuration of the host.
Access 2010 allows databases to be published to SharePoint 2010 web sites running Access Services. These web-based forms and reports run in any modern web browser. The resulting web forms and reports, when accessed via a web browser, don't require any add-ins or extensions (e.g. ActiveX, Silverlight).
Access 2013 can create web applications directly in SharePoint 2013 sites running Access Services. Access 2013 web solutions store its data in an underlying SQL Server database which is much more scalable and robust than the Access 2010 version which used SharePoint lists to store its data.
A compiled version of an Access database (File extensions: .MDE /ACCDE or .ADE; ACCDE only works with Access 2007 or later) can be created to prevent user from accessing the design surfaces to modify module code, forms, and reports. An MDE/ACCDE file is a Microsoft Access database file with all modules compiled and all editable source code removed. An ADE file is an Access project file with all modules compiled and all editable source code removed. Both the .MDE/ACCDE and .ADE versions of an Access database are used when end-user modifications are not allowed or when the application’s source code should be kept confidential.
Microsoft also offers developer extensions for download to help distribute Access 2007 applications, create database templates, and integrate source code control with Microsoft Visual SourceSafe.
Features
Users can create tables, queries, forms and reports, and connect them together with macros. Advanced users can use VBA to write rich solutions with advanced data manipulation and user control. Access also has report creation features that can work with any data source that Access can "access".
The original concept of Access was for end users to be able to "access" data from any source. Other features include: the import and export of data to many formats including Excel, Outlook, ASCII, dBase, Paradox, FoxPro, SQL Server, Oracle, ODBC, etc. It also has the ability to link to data in its existing location and use it for viewing, querying, editing, and reporting. This allows the existing data to change while ensuring that Access uses the latest data. It can perform heterogeneous joins between data sets stored across different platforms. Access is often used by people downloading data from enterprise level databases for manipulation, analysis, and reporting locally.
There is also the Jet Database format (MDB or ACCDB in Access 2007) which can contain the application and data in one file. This makes it very convenient to distribute the entire application to another user, who can run it in disconnected environments.
One of the benefits of Access from a programmer's perspective is its relative compatibility with SQL (structured query language) — queries can be viewed graphically or edited as SQL statements, and SQL statements can be used directly in Macros and VBA Modules to manipulate Access tables. Users can mix and use both VBA and "Macros" for programming forms and logic and offers object-oriented possibilities. VBA can also be included in queries.
Microsoft Access offers parameterized queries. These queries and Access tables can be referenced from other programs like VB6 and .NET through DAO or ADO. From Microsoft Access, VBA can reference parameterized stored procedures via ADO.
The desktop editions of Microsoft SQL Server can be used with Access as an alternative to the Jet Database Engine. This support started with MSDE (Microsoft SQL Server Desktop Engine), a scaled down version of Microsoft SQL Server 2000, and continues with the SQL Server Express versions of SQL Server 2005 and 2008.
Microsoft Access is a file server-based database. Unlike client–server relational database management systems (RDBMS), Microsoft Access does not implement database triggers, stored procedures, or transaction logging. Access 2010 includes table-level triggers and stored procedures built into the ACE data engine. Thus a Client-server database system is not a requirement for using stored procedures or table triggers with Access 2010. Tables, queries, forms, reports and macros can now be developed specifically for web base application in Access 2010. Integration with Microsoft SharePoint 2010 is also highly improved.
Microsoft Access has been around for some time, yet people often still ask me what is Microsoft Access and what does it do? Microsoft Access is a part of the Microsoft Office Suite. It does not come with all versions of Microsoft Office, so if you specifically want Microsoft Access make sure the office suite you are purchasing has it.
Microsoft Access has the look and feel of other Microsoft Office products, including its layout and navigational aspects. That is where the similarity ends. Microsoft® Access is a database and, more specifically, a relational database. This will be explained in more detail later.
Access has an .mdb extension by default, whereas Microsoft® Word has the .doc extension. Although this has changed in Access 2007 where the extension is now an accdb extension. Early versions of Access cannot read accdb extensions but Microsoft Access 2007 can read and change earlier versions of Access. The above is a brief overview of what is Microsoft Access. Now lets look at it in a bit more detail.
What is Microsoft Access made up of?
The Microsoft® Access Database is made up of 7 major components:
Tables;
Relationships;
Queries;
Forms;
Reports;
Macros;
Modules.
The following gives a quick overview of each component.
Tables
The tables are the backbone and the storage container of the data entered into the database. If the tables are not set up correctly, with the correct relationships, then the database may be slow, give you the wrong results or not react the way you expect. So, take a bit of time when setting up your tables.
Queries, forms, etc. are usually based on a table.
The tables that contain data look a bit like a table in Microsoft® Word or a Microsoft® Excel Spreadsheet, when opened. They have columns and rows as does a table in Microsoft® Word and an Excel worksheet. Each of the columns will have a field name at the top and each of the rows will represent a record.
As an example:
Relationships
Relationships are the bonds you build between the tables. They join tables that have associated elements. To do this there is a field in each table, which is linked to each other, and have the same values.
Queries
Are the means of manipulating the data to display in a form or a report. Queries can sort, calculate, group, filter, join tables, update data, delete data, etc. Their power is immense. The Microsoft® Access database query language is SQL (Structured Query Language). The need to know SQL is not required in the early stages of learning Access. Microsoft® Access writes the SQL for you, after you tell it what you want, in the Design view of the queries window.
Forms
Forms are the primary interface through which the users of the database enter data. The person who enters the data will interact with forms regularly. The programmer can set the forms to show only the data required. By using queries, properties, macros and VBA (Visual Basic for Applications), the ability to add, edit and delete data can also be set. Forms can be set up and developed to reflect the use they will be required for.
Reports
Reports are the results of the manipulation of the data you have entered into the database. Unlike forms, they cannot be edited. Reports are intended to be used to output data to another device or application, i.e. printer, fax, Microsoft® Word or Microsoft® Excel.
Macros
Macros are an automatic way for Access to carry out a series of actions for the database. Access gives you a selection of actions that are carried out in the order you enter. Macros can open forms; run queries, change values of a field, run other Macros, etc. the list is almost endless.
Modules
Modules are the basis of the programming language that supports Microsoft® Access, The module window is where you can write and store Visual Basic for Applications (VBA). Advanced users of Microsoft® Access tend to use VBA instead of Macros. If you would like to learn VBA, I have a simple step by step lessons.
All of the above components are persistent; this means that changes are saved when you move from one component to another, not when the database is closed, as in a Microsoft® Word Document.
I hope the above give you a bit of an idea of what is Microsoft Access and what it includes.
Limitations
The total size of a database file (.MDB) is limited only by the storage capacity of your PC (Microsoft® quote the maximum database size of 2 Gigabyte (2000 Megabytes)). These figures are for pre 2007 versions of Microsoft Access.
Very few realistic limitations exist, though here are some parameters:
Maximum table size
1 GB
No. if fields in a record or table
255
No. of indexes in a table or a record
32
Ni. of fields in an index
10
No. of tables in a query
32
Maximum size of a form or report
22"
Characters in a memo field
64,000
MDB size
2 GB
Max Integer
2,147,483,648
Concurrent Users
255
No. of characters in object names
64
What is Microsoft Access as compared to a Relational Database
Now that you understand a bit of what is Microsoft Access. it is time to explain what a relational database is. The relational database was invented by E. F. Codd at IBM in 1970.The power of a relational database is the ability to bring a lot of information together quickly. I am not going into too much technical detail of what a relational database but hope to explain it in simple terms, so it is possibly not 100% technically accurate. To me these are the rules of a relational database:
No duplicate data (except linked fields - explained shortly)
Information is broken into categories
Data is broken down to the smallest useable bit. For example a persons name would be broken down into 4 sperate sections title, first name, middle name and last name.
Each record has a unique identifier, this distinguishes a particular record from any other record
To explain this I will give an example below:
For the purpose of this example, we will be looking at a Library data base from a relational database viewpoint. For a Library database we would want to collect the following information:
Information about the books;
Information about the borrowers;
Information about when a book was borrowed and by whom.
You may be tempted to include all this information within the one table. Once you start entering data the following occurs:
Entering data this way requires multiple entries (and duplicate data in some of the columns)
This can lead to the following problems:
Data entry errors (see bolded items);
The user having to enter the same information over and over;
The database would grow very big, very quickly, causing it to run slower.
Therefore, to meet the rules of a relational database we would first break this one large table into smaller tables of like information (categories). As an example:
Table One (tblBook) would contain information about the books;
Table Two (tblBorrower) would contain information about the borrowers; and
Table Three (tblLoan) would contain information about the borrowing of a book.
The next step is to list all the facts you think are required for each of these tables underneath them.
I have included the examples below for each of the tables for the library database. The primary key and foreign key fields will be explained a bit later.
Note:
The fields have been broken down in to their smallest logical part. As an example, a person’s name has been broken down to:
Surname;
First name;
Title.
The information is only recorded once, i.e. we do not include all the information about the customer in the tblLoan table.
Primary Key - Unique Identifier
An important part of determining the fields for each table is deciding which field (if any) is suitable as the primary key.
The power of a relational database is the ability to bring a lot of information together quickly. For this to work efficiently and effectively, Microsoft® Access needs to be able to identify unique records. For this reason, one field or a set of fields needs to be unique. This can be a unique identification number such as a Medicare number, Employee ID number, Pension number, etc.:
A primary key cannot contain duplicate values, e.g. a person’s last name is not suitable as a primary key as there is often more than one person with the same last name;
A primary key cannot contain null values, therefore a field such as a phone number is not suitable, as you may not know the person’s phone number when you first enter them into the database;
Also, if the information contained in the Primary Key is likely to be altered, then it is best to avoid this field as well.
If a unique identifier cannot be identified (which is more than likely), you can add a field, which will automatically increase sequentially by one, thus providing the record with a unique identifier.
Foreign Keys
The Foreign Key is the field that links a related table to the main table. As an example, in the library database, a borrower may appear many times in the ‘Loan’ table, as a borrower may borrow many books. A book may also occur many times in the ‘Loan’ table as a book can be borrowed many times. Therefore, the loan table would contain many links to a particular borrower and many links to a particular book, but each loan record would relate to only one book and one borrower. This is illustrated below:
The ‘tblBorrower’ table is linked to the ‘Loan’ table with the BorrowerID and BorrowerFK fields;
The ‘Book’ table is linked to the ‘Loan’ table with BookID and BookFK fields.
These fields are known as foreign keys (FK). Note: that only the ID field is kept in the loan table, no other information is needed from the borrower table or the book table. By setting up relationships between the tables, Microsoft Access knows which foreign key belongs to which primary key (unique identifier) and can pull the information from the relevant tables when needed.
6. PROJECT PROFILE
Personal Account Planner is the complete user interact system. It is integrated widows based total workflow automation system for any user.
Personal Account Planner seamlessly integrates the existing manual or semi-automated process, starting from user accounts, type of transactions, categories and the financial years and last transaction of account to account. It will automatically generate the report of the transactions of accounts and I will also generate chart too. It will useful to calculate your income and manage your expense.
7. EXISTING SYSTEM
Currently most of the schools or colleges are using manual system for maintaining student’s academic data.
Currently most of the people using manual system for maintaining their sources of income and the expense.
They have to do so many arithmetic and logical expressions to get the results of their account.
And they can’t generate reports which will show the result of the investments and the expenses through the selected period of the annually.
Existing system have all the things done manually like:
Maintaining balance enquiry
Financial yearly data managements
Account Creation
Entry of their income places.
Report generation
8. PROBLEM AREAS
Manual system always suffers from lots of problems. Like manage their accounts and the report of these transactions.
Some FoxPro based systems are having hard GUI experience. Not technical person has to take the training to operate the system.
Some Desktop applications are available but they have limitation of usage, e.g. they cannot generate charts.
The technology working behind the Desktop systems are very old so that it can’t give the newer technologies extra functionalities.
9. NEED FOR NEW SYSTEM
The problem areas of the existing system described in the previous section generates lots of time consuming and lower functionalities & hard to learn, which therefore puts a demand for a new system to eliminate the problems which are faced by peoples using the current system.
The following factors were responsible for the development of the new system.
System should be flexible for customizing it for all the user of home and professional.
Widow base system that provides mobility to users
To Provide easy representation by charting facility
Low cost product
10. Proposed System
10.1 Objectives To Be Fulfilled
The inputs to the system can be bifurcated according to the user types as follows.
In this system all the objectives are fulfilled which are requiring, and they are as below.
In this system I have give the right to the user to create a categories as type (income & expense)
And the user also create the child categories from parent categories it is very useful to describe all the category.
You can do the transactions on the account you have in the categories which user had created.
The system has the ability to generate the reports annually , monthly & custom by which he will get the information of his/her income sources and the expenses.
In this system the user will also provide charts facility the chart will represent reports in very good manner.
10.2 System Features
10.2.1. INPUTS
Login
Create Account
Account Balance
Create Parent Categories
Create Child Categories
Transactions By Account
10.2.2. OUTPUTS
Accounts Current Balance
Category List
Transaction Detail
Transaction Report
Chart of the Transactions
10.2.3.Time Line Chart
10.2.4. E-R Diagram
10.2.5 DATA DICTIONARY
Table : tblUser
Description: It stores Login information of system’s end users.
Sr. No
Field Name
Data Type (size)
Constraints
Description
1.
ID
Long Integer
P.K.
Auto Increment
2.
Username
Text
Unique/Not Null
Login ID
3.
Password
Text
Not Null
4.
Password Hint
Text
5.
First Name
Text
Not Null
6.
Last Name
Text
7.
Created
Date Time
Not Null
System Date
8.
Update
Date Time
Not Null
System Date
9.
Phone No
Number
10.
Pan No
Text
Not Null
Table : tblAccount
Description: It stores Account Names.
Sr. No
Field Name
Data Type (size)
Constraints
Description
1.
ID
Number
P.K.
Auto Increment
2.
Account Name
Text
Not Null
3.
Initial Balance
Number
Not Null
Float
4.
Current Balance
Number
Not Null
Float
5.
Created
Date Time
Not Null
System Date
6.
Update
Date Time
Not Null
System Date
7.
User Id
Number
F.K./ Not Null
From tblUser
Table: tblCategory
Description: It stores list of categories Created
Sr. No
Field Name
Data Type(size)
Constraints
Description
1.
ID
Number
P.K.
Auto Increment
2.
Category Name
Text
Not Null
3.
Type Id
Number
F.K./Not Null
From tblType
4.
Parent Category Id
Number
F.K./Not Null
From tblCategory
5.
Created
Date Time
Not Null
System Date
6.
Update
Date Time
Not Null
System Date
7.
User Id
Number
F.K./ Not Null
From User
Table: tblType
Description: It stores type names.
Sr. No
Field Name
Data Type(size)
Constraints
Description
1.
ID
Number
P.K.
Auto Increment
2.
Type Name
Text
Not Null
3.
Created
Date Time
Not Null
System Date
4.
Update
Date Time
Not Null
System Date
5.
User Id
Number
F.K./Not Null
From tblUser
Table: tblFinancial Year
Description: It stores detail of financial Year.
Sr. No
Field Name
Data Type(size)
Constraints
Description
1.
ID
Number
P.K.
Auto Increment
2.
Start Date
Date Time
Not Null
3.
End Date
Date Time
Not Null
4.
User Id
Number
F.K./Not Null
From tblUser
Table: tblTransaction
Description: It stores transaction detail.
Sr. No
Field Name
Data Type(size)
Constraints
Description
1.
ID
Number
P.K.
Auto Increment
2.
Transaction Date
Date Time
Not Null
Manually
3.
From Account Id
Number
F.K./Not Null
From tblAccount
4.
Type Id
Number
F.K./Not Null
From tblType
5.
Category Id
Number
F.K./Not Null
From tblCategory
6.
Amount
Number
Not Null
Float
7.
Create
Date Time
Not Null
System Date
8.
Update
Date Time
Not Null
System Date
9.
User Id
Number
F.K./Not Null
TblUser
10.2.6 Data Entry Screens
Main Form
Imports System.Windows.Forms
Imports PersonalTaxPlanner.DataSetTable
Imports PersonalTaxPlanner.dsAccountTableAdapters
Imports PersonalTaxPlanner.dsCategoryTableAdapters
Imports PersonalTaxPlanner.dsTransactionTableAdapters
Public Class Main
Dim objconn As New clsConnection
Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs)
Dim ChildForm As New System.Windows.Forms.Form
ChildForm.MdiParent = Me
m_ChildFormNumber += 1
ChildForm.Text = "Window " & m_ChildFormNumber
ChildForm.Show()
End Sub
Private Sub OpenFile(ByVal sender As Object, ByVal e As EventArgs)
Dim OpenFileDialog As New OpenFileDialog
OpenFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments
OpenFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"
If (OpenFileDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK) Then
Dim FileName As String = OpenFileDialog.FileName
End If
End Sub
Private Sub SaveAsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim SaveFileDialog As New SaveFileDialog
SaveFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments
SaveFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"
If (SaveFileDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK) Then
Dim FileName As String = SaveFileDialog.FileName
End If
End Sub
Private Sub ExitToolsStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
Me.Close()
End Sub
Private Sub CutToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Private Sub CopyToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Private Sub PasteToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Private Sub CascadeToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
Me.LayoutMdi(MdiLayout.Cascade)
End Sub
Private Sub TileVerticalToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
Me.LayoutMdi(MdiLayout.TileVertical)
End Sub
Private Sub TileHorizontalToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
Me.LayoutMdi(MdiLayout.TileHorizontal)
End Sub
Private Sub ArrangeIconsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
Me.LayoutMdi(MdiLayout.ArrangeIcons)
End Sub
Private Sub CloseAllToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
For Each ChildForm As Form In Me.MdiChildren
ChildForm.Close()
Next
End Sub
Private m_ChildFormNumber As Integer
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
End
End Sub
Private Sub CreateToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreateToolStripMenuItem.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Dim objaccount As New Account
objaccount.StartPosition = FormStartPosition.Manual
objaccount.Left = 0
objaccount.Top = 0
objaccount.MdiParent = Me
objaccount.Show()
Me.Refresh()
End Sub
Private Sub DisplayToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayToolStripMenuItem.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Dim objAccount_grid As New Account_Grid
objAccount_grid.StartPosition = FormStartPosition.Manual
objAccount_grid.Left = 0
objAccount_grid.Top = 0
objAccount_grid.MdiParent = Me
objAccount_grid.Show()
End Sub
Private Sub CreateToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreateToolStripMenuItem1.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Dim objCategory As New Category
objCategory.StartPosition = FormStartPosition.Manual
objCategory.Left = 0
objCategory.Top = 0
objCategory.MdiParent = Me
objCategory.Show()
End Sub
Private Sub DisplayToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayToolStripMenuItem1.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Dim objCategory_Grid As New Category_Grid_2
objCategory_Grid.StartPosition = FormStartPosition.Manual
objCategory_Grid.Left = 0
objCategory_Grid.Top = 0
objCategory_Grid.MdiParent = Me
objCategory_Grid.Show()
End Sub
Private Sub CreateToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreateToolStripMenuItem2.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Dim objFinancial_Year As New Financial_Year
objFinancial_Year.StartPosition = FormStartPosition.Manual
objFinancial_Year.Left = 0
objFinancial_Year.Top = 0
objFinancial_Year.MdiParent = Me
objFinancial_Year.Show()
End Sub
Private Sub DisplayToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayToolStripMenuItem2.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Dim objFinancial_Year_grid As New Financial_Year_Grid
objFinancial_Year_grid.StartPosition = FormStartPosition.Manual
objFinancial_Year_grid.Left = 0
objFinancial_Year_grid.Top = 0
objFinancial_Year_grid.MdiParent = Me
objFinancial_Year_grid.Show()
End Sub
Private Sub CreateToolStripMenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreateToolStripMenuItem4.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Dim objTransaction As New Transaction
objTransaction.StartPosition = FormStartPosition.Manual
objTransaction.Left = 0
objTransaction.Top = 0
objTransaction.MdiParent = Me
objTransaction.Show()
End Sub
Private Sub DisplayToolStripMenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayToolStripMenuItem3.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Dim objTransaction_grid As New Transaction_Grid
objTransaction_grid.StartPosition = FormStartPosition.Manual
objTransaction_grid.Left = 0
objTransaction_grid.Top = 0
objTransaction_grid.MdiParent = Me
objTransaction_grid.Show()
End Sub
Private Sub MasterToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterToolStripMenuItem.Click
End Sub
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub LogOutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogOutToolStripMenuItem.Click
Me.Close()
Login_Design.Show()
Login_Design.txtPassword.Text = ""
Login_Design.txtUser_Name.Text = ""
Login_Design.txtUser_Name.Select()
End Sub
Private Sub AddUserToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddUserToolStripMenuItem.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Dim objUser As New User
objUser.StartPosition = FormStartPosition.Manual
objUser.Left = 0
objUser.Top = 0
objUser.MdiParent = Me
objUser.Show()
End Sub
Private Sub EditDisplayUsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditDisplayUsToolStripMenuItem.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Dim objUser_grid As New User_Grid
objUser_grid.StartPosition = FormStartPosition.Manual
objUser_grid.Left = 0
objUser_grid.Top = 0
objUser_grid.MdiParent = Me
objUser_grid.Show()
End Sub
Private Sub CategoryReportToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub TypeReportToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAccount.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Me.cmdCategory.Enabled = False
Me.cmdClose.Enabled = False
Me.cmdLogoff.Enabled = False
Me.cmdTransaction.Enabled = False
Me.cmdUser.Enabled = False
Me.cmdAccount.Enabled = False
Dim objaccount As New Account_Grid
objaccount.StartPosition = FormStartPosition.Manual
objaccount.Left = 0
objaccount.Top = 0
objaccount.MdiParent = Me
objaccount.Show()
Me.Refresh()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCategory.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Me.cmdCategory.Enabled = False
Me.cmdClose.Enabled = False
Me.cmdLogoff.Enabled = False
Me.cmdTransaction.Enabled = False
Me.cmdUser.Enabled = False
Me.cmdAccount.Enabled = False
Dim objCategory As New Category_Grid_2
objCategory.StartPosition = FormStartPosition.Manual
objCategory.Left = 0
objCategory.Top = 0
objCategory.MdiParent = Me
objCategory.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdTransaction.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Me.cmdCategory.Enabled = False
Me.cmdClose.Enabled = False
Me.cmdLogoff.Enabled = False
Me.cmdTransaction.Enabled = False
Me.cmdUser.Enabled = False
Me.cmdAccount.Enabled = False
Dim objTransaction As New Transaction_Grid
objTransaction.StartPosition = FormStartPosition.Manual
objTransaction.Left = 0
objTransaction.Top = 0
objTransaction.MdiParent = Me
objTransaction.Show()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUser.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Me.cmdCategory.Enabled = False
Me.cmdClose.Enabled = False
Me.cmdLogoff.Enabled = False
Me.cmdTransaction.Enabled = False
Me.cmdUser.Enabled = False
Me.cmdAccount.Enabled = False
Dim objUser As New User_Grid
objUser.StartPosition = FormStartPosition.Manual
objUser.Left = 0
objUser.Top = 0
objUser.MdiParent = Me
objUser.Show()
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogoff.Click
Me.Close()
Login_Design.txtPassword.Text = ""
Login_Design.txtUser_Name.Text = ""
Login_Design.txtUser_Name.Select()
Login_Design.Show()
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClose.Click
End
End Sub
Private Sub ChartToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
'Chart.Show()
End Sub
Private Sub MenuStrip_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles MenuStrip.ItemClicked
End Sub
Private Sub TransactionReportToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TransactionReportToolStripMenuItem1.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Dim objtransaction As New SelectTransactionReport
objtransaction.StartPosition = FormStartPosition.Manual
objtransaction.Left = 0
objtransaction.Top = 0
objtransaction.MdiParent = Me
objtransaction.Show()
'Select_Category.Show()
End Sub
Private Sub TypeReporToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TypeReporToolStripMenuItem.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Dim objType As New SelectTypeReport
objType.StartPosition = FormStartPosition.Manual
objType.Left = 0
objType.Top = 0
objType.MdiParent = Me
objType.Show()
End Sub
Private Sub CategoryReportToolStripMenuItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CategoryReportToolStripMenuItem.Click
MenuStrip.Enabled = False
ToolStrip.Enabled = False
Dim objCategory As New Select_Category
objCategory.StartPosition = FormStartPosition.Manual
objCategory.Left = 0
objCategory.Top = 0
objCategory.MdiParent = Me
objCategory.Show()
End Sub
End Class
Account Entry Form
Public Class Account
Dim objmodelAcc As New modelAccount
Dim DtCourse As New DataTable
Dim e As System.EventArgs
Dim objAcc As New clsAccount
Dim state As Boolean
Public Sub clear()
txtAccount_Name.Text = ""
txtInitial_Balance.Text = ""
txtCurrent_Balance.Text = ""
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
Public Sub Validation()
If (txtAccount_Name.Text = "") Then
MsgBox("Please Enter The Name Of Account", MsgBoxStyle.Critical)
txtAccount_Name.Select()
state = False
ElseIf txtInitial_Balance.Text = "" Then
MsgBox("Please Enter Enter Your Initial Balance ", MsgBoxStyle.Critical)
txtInitial_Balance.Select()
state = False
ElseIf txtAccount_Name.Text = "" Then
MsgBox("Please Enter the Account Name", MsgBoxStyle.Critical)
txtAccount_Name.Select()
state = False
End If
End Sub
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
If (lblid.Enabled = False) Then
objAcc.Id = CInt(lblid.Text)
Dim id As Integer = objAcc.Id
objAcc.Account_Name = txtAccount_Name.Text
If (txtAccount_Name.Text = Nothing) Then
MsgBox("Please Enter the name of Account")
txtAccount_Name.Select()
Return
End If
If (txtInitial_Balance.Text = Nothing) Then
MsgBox("Please Enter the Initial_Balance")
txtInitial_Balance.Select()
Return
End If
objAcc.Initial_Balance = CDbl(txtInitial_Balance.Text)
objAcc.Current_Balance = CDbl(txtCurrent_Balance.Text)
objAcc.User_Id = lbluserid.Text
objmodelAcc.Update(id, objAcc)
clear()
Account_Grid.DGAccount.Refresh()
Me.Close()
Dim objaccount_Grid As New Account_Grid
Account_Grid.StartPosition = FormStartPosition.Manual
Account_Grid.Left = 0
Account_Grid.Top = 0
Account_Grid.MdiParent = Main
Account_Grid.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
Me.Refresh()
Else
If (txtAccount_Name.Text = Nothing) Then
MsgBox("Please Enter the name of Account")
txtAccount_Name.Select()
Return
End If
If (txtInitial_Balance.Text = Nothing) Then
MsgBox("Please Enter the Initial_Balance")
txtInitial_Balance.Select()
Return
End If
objAcc.Account_Name = txtAccount_Name.Text
objAcc.Initial_Balance = CDbl(txtInitial_Balance.Text)
objAcc.Current_Balance = CDbl(txtCurrent_Balance.Text)
objAcc.User_Id = lbluserid.Text
objmodelAcc.Insert(objAcc)
clear()
Account_Grid.DGAccount.Refresh()
Me.Close()
Dim objaccount_Grid As New Account_Grid
Account_Grid.StartPosition = FormStartPosition.Manual
Account_Grid.Left = 0
Account_Grid.Top = 0
Account_Grid.MdiParent = Main
Account_Grid.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
End If
End Sub
Private Sub cmdCancle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancle.Click
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Me.Close()
End Sub
Private Sub txtInitial_Balance_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtInitial_Balance.GotFocus
txtInitial_Balance.BackColor = Color.Bisque
End Sub
Private Sub txtInitial_Balance_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtInitial_Balance.KeyPress
If e.KeyChar <> ChrW(Keys.Back) Then
If (e.KeyChar.ToString >= "0" And e.KeyChar.ToString <= "9") Or (e.KeyChar.ToString >= "-" And e.KeyChar.ToString <= ".") Then
Else
e.Handled = True
End If
End If
End Sub
Private Sub txtInitial_Balance_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtInitial_Balance.LostFocus
txtInitial_Balance.BackColor = Color.White
End Sub
Private Sub txtInitial_Balance_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtInitial_Balance.TextChanged
txtCurrent_Balance.Text = txtInitial_Balance.Text
End Sub
Private Sub Account_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim state As Boolean
lbluserid.Text = userid
If (lbluserid.Text = "Null") Then
Me.Close()
Login_Design.Show()
End If
End Sub
Private Sub txtAccount_Name_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtAccount_Name.GotFocus
txtAccount_Name.BackColor = Color.Bisque
End Sub
Private Sub txtAccount_Name_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtAccount_Name.LostFocus
txtAccount_Name.BackColor = Color.White
End Sub
Private Sub txtAccount_Name_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtAccount_Name.TextChanged
End Sub
End Class
Display Account Entry Form
Imports System.Data.OleDb
Public Class Account_Grid
Dim objmodelacc As New modelAccount
Dim dtAccount As New DataTable
Dim adpter As New OleDb.OleDbDataAdapter
Dim objacc As New clsAccount
Dim this As New Label
Private Sub Account_Grid_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dtAccount = objmodelacc.SelectAll(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
DGAccount.DataSource = dtAccount
DGAccount.Refresh()
End Sub
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
Me.Close()
Dim objaccount As New Account
objaccount.StartPosition = FormStartPosition.Manual
objaccount.Left = 0
objaccount.Top = 0
objaccount.MdiParent = Main
objaccount.Show()
Me.Refresh()
End Sub
Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click
Dim i As Integer
Dim str As String
Dim j As Integer
i = DGAccount.SelectedRows.Count
If (i > 0) Then
j = 0
While (j < DGAccount.SelectedRows.Count)
Dim Id As Integer
Dim objAcc As New clsAccount
Id = DGAccount.SelectedRows(0).Cells(0).Value
objAcc = (objmodelacc.GetById(Id))
Dim objaccount As New Account
Account.StartPosition = FormStartPosition.Manual
Account.Left = 0
Account.Top = 0
Account.MdiParent = Main
Account.Show()
Account.lblid.Text = DGAccount.SelectedRows(j).Cells("ID").Value
Account.txtAccount_Name.Text = DGAccount.SelectedRows(j).Cells("Account_Name").Value
Account.txtInitial_Balance.Text = DGAccount.SelectedRows(j).Cells("Initial_Balance").Value
Account.txtCurrent_Balance.Text = DGAccount.SelectedRows(j).Cells("Current_Balance").Value
Account.lbluserid.Text = DGAccount.SelectedRows(j).Cells("User_Id").Value
Account.lblid.Enabled = False
Me.Close()
End While
Else
MsgBox("There is no row selected", MsgBoxStyle.Information)
DGAccount.Focus()
'j = j + 1
End If
End Sub
Private Sub cmdCancle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancle.Click
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Me.Close()
Main.Show()
End Sub
Private Sub cmdDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDelete.Click
Dim i As Integer
Dim str As String
Dim j As Integer
i = DGAccount.SelectedRows.Count
If (i > 0) Then
j = 0
Dim Id As Integer
str = MsgBox("Do you want to Delete this Record?", MsgBoxStyle.Information + MsgBoxStyle.OkCancel)
If str = vbOK Then
While (j < i)
Id = DGAccount.SelectedRows(0).Cells("ID").Value
objmodelacc.Delete(Id)
DGAccount.Rows.RemoveAt(DGAccount.SelectedRows(0).Index)
j = j + 1
End While
Else
DGAccount.Focus()
End If
Else
MsgBox("There is no row selected", MsgBoxStyle.Information)
End If
End Sub
Private Sub DGAccount_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGAccount.CellContentClick
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
End Class
Category Entry Form
Imports System.Data.OleDb
Public Class Category
Dim modeltypes As New modelTypes
Dim Da As New OleDbDataAdapter
Dim Dt As New DataTable
Dim Com As New OleDbCommand
Dim objCategory As New clsCategory
Dim objmodelCategory As New modelCategory
Public dr As OleDbDataReader
Dim typeid As Integer
Dim conn As New clsConnection
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
Public Sub validation()
If txtcategory_Name.Text = "" Then
MsgBox("Please Enter the name of category", MsgBoxStyle.Critical)
txtcategory_Name.Focus()
ElseIf cmbType.Text = "" Then
MsgBox("Please Enter the name of Type", MsgBoxStyle.Critical)
cmbType.Focus()
End If
End Sub
Public Sub clear()
txtcategory_Name.Text = ""
End Sub
Public Sub LoadById(ByVal Id As Integer)
Dim objModelCategory As New modelCategory
Dim objCategory As New clsCategory
lblid.Text = objCategory.Id
cmbType.SelectedValue = objCategory.Type_Id
cmbparentcategory.SelectedValue = objCategory.Parent_Category_Id
End Sub
Private Sub Category_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
RadioButton1.Select()
lbluserid.Text = userid
If (lbluserid.Text = "Null") Then
Me.Close()
Login_Design.Show()
End If
LoadType()
End Sub
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
If (lblid.Enabled = False) Then
objCategory.Id = CInt(lblid.Text)
Dim id As Integer = objCategory.Id
If (txtcategory_Name.Text = Nothing) Then
MsgBox("Please Enter the Name of Category")
txtcategory_Name.Select()
Return
End If
If (cmbparentcategory.Visible = False) Then
objCategory.Parent_Category_Id = 0
End If
If (cmbparentcategory.Visible = True) Then
objCategory.Parent_Category_Id = cmbparentcategory.SelectedValue
End If
objCategory.Category_Name = txtcategory_Name.Text
objCategory.Type_Id = cmbType.SelectedValue
objCategory.User_Id = userid
objmodelCategory.Update(id, objCategory)
clear()
Category_Grid_2.DGCategory.Refresh()
Me.Close()
Dim objCategory_Grid As New Category_Grid_2
Category_Grid_2.StartPosition = FormStartPosition.Manual
Category_Grid_2.Left = 0
Category_Grid_2.Top = 0
Category_Grid_2.MdiParent = Main
Category_Grid_2.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
Else
If (txtcategory_Name.Text = Nothing) Then
MsgBox("Please Enter the Name of Category")
txtcategory_Name.Select()
Return
End If
If (cmbparentcategory.Visible = False) Then
objCategory.Parent_Category_Id = 0
End If
If (cmbparentcategory.Visible = True) Then
objCategory.Parent_Category_Id = cmbparentcategory.SelectedValue
End If
objCategory.Category_Name = txtcategory_Name.Text
objCategory.Type_Id = cmbType.SelectedValue
objCategory.User_Id = userid
'validation()
objmodelCategory.Insert(objCategory)
clear()
Category_Grid_2.DGCategory.Refresh()
Me.Close()
Dim objCategory_Grid As New Category_Grid_2
objCategory_Grid.StartPosition = FormStartPosition.Manual
objCategory_Grid.Left = 0
objCategory_Grid.Top = 0
objCategory_Grid.MdiParent = Main
objCategory_Grid.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
End If
End Sub
Private Sub cmdCancle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancle.Click
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Me.Close()
Main.Show()
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
cmbparentcategory.Visible = True
Label3.Show()
Label7.Visible = True
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
cmbparentcategory.Visible = False
Label3.Visible = False
Label7.Visible = False
End Sub
Public Sub LoadType()
Dim objmodelType As New modelTypes
Dim dt As New DataTable
dt = objmodelType.SelectAll(Nothing, Nothing, Nothing, Nothing, Nothing)
cmbType.DataSource = dt
cmbType.ValueMember = "ID"
cmbType.DisplayMember = "Type_Name"
Dim typeid As Integer
typeid = cmbType.SelectedValue.ToString
ParentCategory()
End Sub
Public Sub ParentCategory()
Dim objmodelCategory As New modelCategory
Dim dt As New DataTable
dt = objmodelCategory.SelectAll(Nothing, Nothing, cmbType.SelectedValue.GetHashCode, Nothing, Nothing, Nothing, Nothing)
cmbparentcategory.DataSource = dt
cmbparentcategory.ValueMember = "ID"
cmbparentcategory.DisplayMember = "Category_Name"
End Sub
Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox1.Enter
End Sub
Private Sub cmbType_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbType.GotFocus
cmbType.BackColor = Color.Bisque
End Sub
Private Sub cmbType_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbType.LostFocus
End Sub
Private Sub cmbType_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbType.SelectedIndexChanged
ParentCategory()
End Sub
Private Sub txtcategory_Name_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtcategory_Name.GotFocus
txtcategory_Name.BackColor = Color.Bisque
End Sub
Private Sub txtcategory_Name_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtcategory_Name.LostFocus
txtcategory_Name.BackColor = Color.White
End Sub
Private Sub txtcategory_Name_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtcategory_Name.TextChanged
End Sub
Private Sub cmbparentcategory_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbparentcategory.GotFocus
cmbparentcategory.BackColor = Color.Bisque
End Sub
Private Sub cmbparentcategory_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbparentcategory.LostFocus
End Sub
Private Sub cmbparentcategory_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbparentcategory.SelectedIndexChanged
End Sub
Private Sub cmbtypeid_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
ParentCategory()
End Sub
End Class
Category Display Form
Imports System.Data.OleDb
Public Class Category_Grid_2
Dim objmodelCategory As New modelCategory
Dim adpter As New OleDbDataAdapter
Dim dtCategory As New DataTable
Dim dtType As New DataTable
Dim objType As New clsTypes
Dim objModelType As New modelTypes
Dim dscategory As New DataSet
Private Sub Category_Grid_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dtType = objModelType.SelectAll(Nothing, Nothing, Nothing, Nothing, Nothing)
cmbType.DataSource = dtType
cmbType.ValueMember = "ID"
cmbType.DisplayMember = "Type_Name"
dtCategory = objmodelCategory.SelectAll(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
DGCategory.DataSource = dtCategory
DGCategory.Refresh()
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
Me.Close()
Dim objCategory As New Category
objCategory.StartPosition = FormStartPosition.Manual
objCategory.Left = 0
objCategory.Top = 0
objCategory.MdiParent = Main
objCategory.Show()
End Sub
Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click
Dim Id As Integer
Dim objCategory As New clsCategory
Id = DGCategory.SelectedRows(0).Cells("ID").Value
objCategory = (objmodelCategory.GetById(Id))
Dim objCategory_Main As New Category
Category.StartPosition = FormStartPosition.Manual
Category.Left = 0
Category.Top = 0
Category.MdiParent = Main
Category.Show()
Category.LoadType()
Category.ParentCategory()
If (DGCategory.SelectedRows(0).Cells("Parent_Category_Id").Value = 0) Then
Category.RadioButton1.Select()
End If
Category.lblid.Text = DGCategory.SelectedRows(0).Cells("Id").Value
Category.txtcategory_Name.Text = DGCategory.SelectedRows(0).Cells("Category_Name").Value
Category.cmbparentcategory.SelectedText = DGCategory.SelectedRows(0).Cells("Parent_Category_Id").Value
Category.cmbType.SelectedText = DGCategory.SelectedRows(0).Cells("Type_Id").Value
Category.lbluserid.Text = DGCategory.SelectedRows(0).Cells("User_Id").Value
Category.lblid.Enabled = False
Me.Close()
End Sub
Private Sub cmdDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDelete.Click
Dim i As Integer
Dim str As String
Dim j As Integer
i = DGCategory.SelectedRows.Count
If (i > 0) Then
j = 0
Dim Id As Integer
str = MsgBox("Do you want to Delete this Record?", MsgBoxStyle.Information + MsgBoxStyle.OkCancel)
If str = vbOK Then
While (j < i)
Id = DGCategory.SelectedRows(0).Cells("ID").Value
objmodelCategory.Delete(Id)
DGCategory.Rows.RemoveAt(DGCategory.SelectedRows(0).Index)
j = j + 1
End While
Else
DGCategory.Focus()
End If
Else
MsgBox("There is no row selected", MsgBoxStyle.Information)
End If
End Sub
Private Sub cmdCancle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancle.Click
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Me.Close()
Main.Show()
End Sub
Private Sub cmdParent_Category_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdParent_Category.Click
Category.lblid.Enabled = True
Category.cmbparentcategory.Enabled = True
Category.cmbType.Enabled = False
Dim Id As Integer
Dim objCategory As New clsCategory
Id = DGCategory.SelectedRows(0).Cells(0).Value
objCategory = (objmodelCategory.GetById(Id))
Category.Show()
Category.lblid.Text = DGCategory.SelectedRows(0).Cells("Id").Value
Category.txtcategory_Name.Text = DGCategory.SelectedRows(0).Cells("Category_Name").Value
Category.cmbType.Text = DGCategory.SelectedRows(0).Cells("Type").Value
Me.Close()
End Sub
End Class
Financial Year Entry Form
Public Class Financial_Year
Dim objmodelfin As New mdelFinancial_Year
Dim DtCourse As New DataTable
Dim state As Boolean
Dim interval As Integer
Dim temp As New Integer
Dim objFin As New clsFinancial_Year
Public Sub clear()
'txtId.Text = ""
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
Public Sub Validation()
If DateTimePicker1.Text = "" Then
MsgBox("Please Enter the Starting Date ", MsgBoxStyle.Critical)
DateTimePicker1.Select()
ElseIf DateTimePicker2.Text = "" Then
MsgBox("Please Enter Enter The Ending Date", MsgBoxStyle.Critical)
DateTimePicker2.Select()
End If
End Sub
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
If (lblid.Enabled = False) Then
objFin.Id = CInt(lblid.Text)
Dim id As Integer = objFin.Id
objFin.Start_Date = DateTimePicker1.Text
objFin.End_Date = DateTimePicker2.Text
objFin.User_Id = lbluserid.Text
Validation()
objmodelfin.Update(id, objFin)
clear()
Financial_Year_Grid.Refresh()
' MsgBox("Record Updated Sucessfully", MsgBoxStyle.Information)
Me.Close()
Dim objFinancial_Year_grid As New Financial_Year_Grid
Financial_Year_Grid.StartPosition = FormStartPosition.Manual
Financial_Year_Grid.Left = 0
Financial_Year_Grid.Top = 0
Financial_Year_Grid.MdiParent = Main
Financial_Year_Grid.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
Else
objFin.Start_Date = CDate(DateTimePicker1.Text)
objFin.End_Date = CDate(DateTimePicker2.Text)
objFin.User_Id = lbluserid.Text
Validation()
objmodelfin.Insert(objFin)
Financial_Year_Grid.Refresh()
' MsgBox("Record Added successfully", MsgBoxStyle.Information)
clear()
Me.Close()
Dim objFinancial_Year_grid As New Financial_Year_Grid
Financial_Year_Grid.StartPosition = FormStartPosition.Manual
Financial_Year_Grid.Left = 0
Financial_Year_Grid.Top = 0
Financial_Year_Grid.MdiParent = Main
Financial_Year_Grid.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
End If
End Sub
Private Sub Financial_Year_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
lbluserid.Text = userid
End Sub
Private Sub cmdCancle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancle.Click
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.Enabled = True
Me.Close()
Main.Show()
End Sub
End Class
Display Financial Entry Form
Imports System.Data.OleDb
Public Class Financial_Year_Grid
Dim adpter As New OleDbDataAdapter
Dim dtFinancial_Year As New DataTable
Dim objmodelFinancial_Year As New mdelFinancial_Year
Dim objFinancial_Year As New clsFinancial_Year
Private Sub Financial_Year_Grid_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dtFinancial_Year = objmodelFinancial_Year.SelectAll(Nothing, Nothing, Nothing, Nothing)
DGFinancial_Year.DataSource = dtFinancial_Year
DGFinancial_Year.Refresh()
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
Me.Close()
Dim objFinancial_Year As New Financial_Year
objFinancial_Year.StartPosition = FormStartPosition.Manual
objFinancial_Year.Left = 0
objFinancial_Year.Top = 0
objFinancial_Year.MdiParent = Main
objFinancial_Year.Show()
End Sub
Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click
Dim Id As Integer
Dim objFin As New clsFinancial_Year
Id = DGFinancial_Year.SelectedRows(0).Cells("ID").Value
objFinancial_Year = (objmodelFinancial_Year.GetById(Id))
'Financial_Year.Show()
Dim objFinancial_Year_Main As New Financial_Year
Financial_Year.StartPosition = FormStartPosition.Manual
Financial_Year.Left = 0
Financial_Year.Top = 0
Financial_Year.MdiParent = Main
Financial_Year.Show()
Financial_Year.lblid.Text = DGFinancial_Year.SelectedRows(0).Cells("ID").Value
Financial_Year.DateTimePicker1.Text = DGFinancial_Year.SelectedRows("Start_Date").Cells(1).Value
Financial_Year.DateTimePicker2.Text = DGFinancial_Year.SelectedRows(0).Cells("End_Date").Value
Financial_Year.lbluserid.Text = DGFinancial_Year.SelectedRows(0).Cells("User_Id").Value
Financial_Year.lblid.Enabled = False
Me.Close()
objmodelFinancial_Year.Update(Id, objFin)
End Sub
Private Sub cmdDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDelete.Click
Dim i As Integer
Dim str As String
Dim j As Integer
i = DGFinancial_Year.SelectedRows.Count
If (i > 0) Then
j = 0
Dim Id As Integer
str = MsgBox("Do you want to Delete this Record?", MsgBoxStyle.Information + MsgBoxStyle.OkCancel)
If str = vbOK Then
While (j < i)
Id = DGFinancial_Year.SelectedRows(0).Cells("ID").Value
objmodelFinancial_Year.Delete(Id)
DGFinancial_Year.Rows.RemoveAt(DGFinancial_Year.SelectedRows(0).Index)
j = j + 1
End While
Else
DGFinancial_Year.Focus()
End If
'j = j + 1
Else
MsgBox("There is no row selected", MsgBoxStyle.Information)
End If
End Sub
Private Sub cmdCancle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancle.Click
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.Enabled = True
Me.Close()
Main.Show()
End Sub
End Class
Transaction Entry Form
Imports System.Data.OleDb
Public Class Transaction
Dim modeltypes As New modelTypes
Dim Da As New OleDbDataAdapter
Dim Dt As New DataTable
Dim da1 As New OleDbDataAdapter
Dim dt1 As New DataTable
Dim da2 As New OleDbDataAdapter
Dim dt2 As New DataTable
Dim Com As New OleDbCommand
Dim conn As New clsConnection
Dim objmodeltran As New modelTransaction
Dim objmodelacc As New modelAccount
Dim DtCourse As New DataTable
Public DtAcount As New DataTable
Dim typeid1 As String
Dim temp As Integer
Dim Account_Id As Integer
Dim Account_Name As String
Dim Initial_Balance As Double
Dim Current_Balance As Double
Dim auserid As Integer
Dim objmodelAccount As New modelAccount
Dim objaccount As New clsAccount
Dim typeid As Integer
Dim objtran As New clsTransaction
Public Sub LoadType()
Dim objmodelType As New modelTypes
Dim dt As New DataTable
dt = objmodelType.SelectAll(Nothing, Nothing, Nothing, Nothing, Nothing)
cmbType.DataSource = dt
cmbType.ValueMember = "ID"
cmbType.DisplayMember = "Type_Name"
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
Public Sub LoadAccount_ID()
Dim objmodelAccount As New modelAccount
Dim dt2 As New DataTable
dt2 = objmodelacc.SelectAll(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
cmbFrom_Account_Id.DataSource = dt2
cmbFrom_Account_Id.ValueMember = "ID"
cmbFrom_Account_Id.DisplayMember = "Account_Name"
End Sub
Public Sub LoadCategory()
Dim objmodelcategory As New modelCategory
Dim dt3 As New DataTable
dt3 = objmodelcategory.SelectAll(Nothing, Nothing, cmbType.SelectedValue.GetHashCode, Nothing, Nothing, Nothing, Nothing)
cmbCategory.DataSource = dt3
cmbCategory.ValueMember = "ID"
cmbCategory.DisplayMember = "Category_Name"
End Sub
Private Sub Transaction_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
lbluserid.Text = userid
If (lbluserid.Text = "Null") Then
Login_Design.Show()
Me.Close()
End If
LoadType()
LoadAccount_ID()
LoadCategory()
cmbFrom_Account_Id.Select()
cmbType.Select()
cmbCategory.Select()
DateTimePicker1.Select()
' LoadAccount_sID1()
End Sub
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
If (lblid.Enabled = False) Then
objtran.Id = CInt(lblid.Text)
Dim id As Integer = objtran.ID
If (txtAmount.Text = Nothing) Then
MsgBox("Please Enter the Amount")
txtAmount.Select()
Return
End If
If (typeid = 3) Then
Current_Balance = Current_Balance + CDbl(txtAmount.Text)
'objaccount.Id = Account_Id
objaccount.Account_Name = Account_Name
objaccount.Initial_Balance = Initial_Balance
objaccount.Current_Balance = Current_Balance
objaccount.User_Id = auserid
objtran.From_Account_ID = cmbFrom_Account_Id.SelectedValue
' objtran.To_Account_Id = CInt(cmbTo_Account_Id.Text)
objtran.Entry_Date = CDate(DateTimePicker1.Text)
objtran.Type_Id = cmbType.SelectedValue
objtran.Category_Id = cmbCategory.SelectedValue
objtran.Amount = CDbl(txtAmount.Text)
objtran.Comment = txtComment.Text
objtran.User_Id = lbluserid.Text
objmodelAccount.Update(Account_Id, objaccount)
objmodeltran.Update(id, objtran)
clear()
Transaction_Grid.DGTransaction.Refresh()
' MsgBox("Record Updated Sucessfully", MsgBoxStyle.Information)
Me.Close()
Dim objTransaction_grid As New Transaction_Grid
Transaction_Grid.StartPosition = FormStartPosition.Manual
Transaction_Grid.Left = 0
Transaction_Grid.Top = 0
Transaction_Grid.MdiParent = Main
Transaction_Grid.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
ElseIf (typeid = 4) Then
Current_Balance = Current_Balance - CDbl(txtAmount.Text)
'objaccount.Id = Account_Id
objaccount.Account_Name = Account_Name
objaccount.Initial_Balance = Initial_Balance
objaccount.Current_Balance = Current_Balance
objaccount.User_Id = auserid
objtran.From_Account_ID = cmbFrom_Account_Id.SelectedValue
' objtran.To_Account_Id = CInt(cmbTo_Account_Id.Text)
objtran.Entry_Date = CDate(DateTimePicker1.Text)
objtran.Type_Id = cmbType.SelectedValue
objtran.Category_Id = cmbCategory.SelectedValue
objtran.Amount = CDbl(txtAmount.Text)
objtran.Comment = txtComment.Text
objtran.User_Id = lbluserid.Text
objmodelAccount.Update(Account_Id, objaccount)
objmodeltran.Update(id, objtran)
clear()
Transaction_Grid.DGTransaction.Refresh()
' MsgBox("Record Updated Sucessfully", MsgBoxStyle.Information)
Me.Close()
Dim objTransaction_grid As New Transaction_Grid
Transaction_Grid.StartPosition = FormStartPosition.Manual
Transaction_Grid.Left = 0
Transaction_Grid.Top = 0
Transaction_Grid.MdiParent = Main
Transaction_Grid.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
End If
Else
If (txtAmount.Text = Nothing) Then
MsgBox("Please Enter the Amount")
txtAmount.Select()
Return
End If
If (typeid = 3) Then
Current_Balance = Current_Balance + CDbl(txtAmount.Text)
'objaccount.Id = Account_Id
objaccount.Account_Name = Account_Name
objaccount.Initial_Balance = Initial_Balance
objaccount.Current_Balance = Current_Balance
objaccount.User_Id = auserid
objtran.From_Account_ID = cmbFrom_Account_Id.SelectedValue
' objtran.To_Account_Id = CInt(cmbTo_Account_Id.Text)
objtran.Entry_Date = CDate(DateTimePicker1.Text)
objtran.Type_Id = cmbType.SelectedValue
objtran.Category_Id = cmbCategory.SelectedValue
objtran.Amount = CDbl(txtAmount.Text)
objtran.Comment = txtComment.Text
objtran.User_Id = lbluserid.Text
objmodelAccount.Update(Account_Id, objaccount)
' Validation()
objmodeltran.Insert(objtran)
clear()
Transaction_Grid.DGTransaction.Refresh()
' MsgBox("Record Added successfully", MsgBoxStyle.Information)
Me.Close()
Dim objTransaction_grid As New Transaction_Grid
Transaction_Grid.StartPosition = FormStartPosition.Manual
Transaction_Grid.Left = 0
Transaction_Grid.Top = 0
Transaction_Grid.MdiParent = Main
Transaction_Grid.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
ElseIf (typeid = 4) Then
Current_Balance = Current_Balance - CDbl(txtAmount.Text)
'objaccount.Id = Account_Id
objaccount.Account_Name = Account_Name
objaccount.Initial_Balance = Initial_Balance
objaccount.Current_Balance = Current_Balance
objaccount.User_Id = auserid
objtran.From_Account_ID = cmbFrom_Account_Id.SelectedValue
' objtran.To_Account_Id = CInt(cmbTo_Account_Id.Text)
objtran.Entry_Date = CDate(DateTimePicker1.Text)
objtran.Type_Id = cmbType.SelectedValue
objtran.Category_Id = cmbCategory.SelectedValue
objtran.Amount = CDbl(txtAmount.Text)
objtran.Comment = txtComment.Text
objtran.User_Id = lbluserid.Text
objmodelAccount.Update(Account_Id, objaccount)
' Validation()
objmodeltran.Insert(objtran)
clear()
Transaction_Grid.DGTransaction.Refresh()
' MsgBox("Record Added successfully", MsgBoxStyle.Information)
Me.Close()
Dim objTransaction_grid As New Transaction_Grid
Transaction_Grid.StartPosition = FormStartPosition.Manual
Transaction_Grid.Left = 0
Transaction_Grid.Top = 0
Transaction_Grid.MdiParent = Main
Transaction_Grid.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
End If
End If
End Sub
Public Sub Validation()
If cmbFrom_Account_Id.Text = "" Then
MsgBox("Please Enter the Account Id ", MsgBoxStyle.Critical)
cmbFrom_Account_Id.Select()
ElseIf cmbType.Text = "" Then
MsgBox("Please Enter Enter Type of transaction ", MsgBoxStyle.Critical)
cmbType.Select()
ElseIf cmbCategory.Text = "" Then
MsgBox("Please Enter Enter Category ", MsgBoxStyle.Critical)
cmbCategory.Select()
ElseIf txtAmount.Text = "" Then
MsgBox("Please Enter Enter Amount", MsgBoxStyle.Critical)
txtAmount.Select()
End If
End Sub
Public Sub clear()
cmbFrom_Account_Id.Text = ""
'txtTo_Account_Id.Text = ""
cmbType.Text = ""
cmbCategory.Text = ""
txtAmount.Text = ""
txtComment.Text = ""
'lblUserId.Text = ""
End Sub
Private Sub cmdCancle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancle.Click
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.Enabled = True
Me.Close()
Main.Show()
End Sub
Private Sub txtAmount_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtAmount.GotFocus
txtAmount.BackColor = Color.Bisque
End Sub
Private Sub txtAmount_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtAmount.KeyPress
If e.KeyChar <> ChrW(Keys.Back) Then
If (e.KeyChar.ToString >= "0" And e.KeyChar.ToString <= "9") Or (e.KeyChar.ToString >= "-" And e.KeyChar.ToString <= ".") Then
Else
e.Handled = True
End If
End If
End Sub
Private Sub cmbType_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbType.GotFocus
cmbType.BackColor = Color.Bisque
End Sub
Private Sub cmbType_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbType.LocationChanged
End Sub
Private Sub cmbType_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbType.LostFocus
cmbType.BackColor = Color.White
typeid = cmbType.SelectedValue
End Sub
Private Sub cmbFrom_Account_Id_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbFrom_Account_Id.GotFocus
cmbFrom_Account_Id.BackColor = Color.Bisque
End Sub
Private Sub cmbFrom_Account_Id_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbFrom_Account_Id.LostFocus
End Sub
Private Sub cmbFrom_Account_Id_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbFrom_Account_Id.SelectedIndexChanged
Dim id As Integer
id = cmbFrom_Account_Id.SelectedValue.GetHashCode
objaccount = (objmodelAccount.GetById(id))
Account_Id = objaccount.Id
Account_Name = objaccount.Account_Name
Initial_Balance = objaccount.Initial_Balance
Current_Balance = objaccount.Current_Balance
auserid = objaccount.User_Id
objaccount.User_Id = CInt(lbluserid.Text)
lblamount.Text = objaccount.Current_Balance
End Sub
Private Sub cmbCategory_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbCategory.GotFocus
cmbCategory.BackColor = Color.Bisque
End Sub
Private Sub cmbCategory_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbCategory.LostFocus
cmbCategory.BackColor = Color.White
End Sub
Private Sub cmbCategory_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbCategory.SelectedIndexChanged
End Sub
Private Sub txtAmount_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtAmount.LostFocus
txtAmount.BackColor = Color.White
End Sub
Private Sub txtAmount_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtAmount.TextChanged
End Sub
Private Sub txtComment_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtComment.GotFocus
txtComment.BackColor = Color.Bisque
End Sub
Private Sub txtComment_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtComment.LostFocus
txtComment.BackColor = Color.White
End Sub
Private Sub txtComment_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtComment.TextChanged
End Sub
Private Sub typeid_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs)
' temp = typeid.Text
End Sub
Private Sub typeid_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub cmbType_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbType.SelectedIndexChanged
LoadCategory()
End Sub
Private Sub categoryid_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Label12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label12.Click
End Sub
End Class
Display Transaction Form
Imports System.Data.OleDb
Public Class Transaction_Grid
Dim objmodeltran As New modelTransaction
Dim dtTransaction As New DataTable
Dim objconn As New clsConnection
Dim Account_Id As Integer
Dim Account_Name As String
Dim Initial_Balance As Double
Dim Current_Balance As Double
Dim auserid As Integer
Dim objmodelAccount As New modelAccount
Dim objaccount As New clsAccount
Dim objtran As New clsTransaction
Private Sub Transaction_Grid_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dtTransaction = objmodeltran.SelectAll(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
DGTransaction.DataSource = dtTransaction
DGTransaction.Refresh()
lbluserid.Text = userid
End Sub
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
Me.Close()
Dim objTransaction As New Transaction
objTransaction.StartPosition = FormStartPosition.Manual
objTransaction.Left = 0
objTransaction.Top = 0
objTransaction.MdiParent = Main
objTransaction.Show()
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
Private Sub cmdDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDelete.Click
Dim aid As Integer
Dim typeid As Integer
typeid = DGTransaction.SelectedRows(0).Cells("Type_ID").Value
aid = DGTransaction.SelectedRows(0).Cells("From_Account_ID").Value
objaccount = (objmodelAccount.GetById(aid))
Account_Id = objaccount.Id
Account_Name = objaccount.Account_Name
Initial_Balance = objaccount.Initial_Balance
Current_Balance = objaccount.Current_Balance
auserid = objaccount.User_Id
objaccount.User_Id = CInt(lbluserid.Text)
' lblamount.Text = objaccount.Current_Balance
Dim i As Integer
Dim str As String
Dim j As Integer
i = DGTransaction.SelectedRows.Count
If (i > 0) Then
j = 0
Dim Id As Integer
str = MsgBox("If u delete it will automatically effect your Account", MsgBoxStyle.Information + MsgBoxStyle.OkCancel)
If str = vbOK Then
While (j < i)
Id = DGTransaction.SelectedRows(0).Cells("ID").Value
If (typeid = 3) Then
Current_Balance = Current_Balance - CDbl(DGTransaction.SelectedRows(0).Cells("Amount").Value)
objaccount.Account_Name = Account_Name
objaccount.Initial_Balance = Initial_Balance
objaccount.Current_Balance = Current_Balance
objaccount.User_Id = auserid
objmodelAccount.Update(Account_Id, objaccount)
objmodeltran.Delete(Id)
ElseIf (typeid = 4) Then
Current_Balance = Current_Balance + CDbl(DGTransaction.SelectedRows(0).Cells("Amount").Value)
objaccount.Account_Name = Account_Name
objaccount.Initial_Balance = Initial_Balance
objaccount.Current_Balance = Current_Balance
objaccount.User_Id = auserid
objmodelAccount.Update(Account_Id, objaccount)
objmodeltran.Delete(Id)
End If
DGTransaction.Rows.RemoveAt(DGTransaction.SelectedRows(0).Index)
j = j + 1
End While
Else
DGTransaction.Focus()
End If
'j = j + 1
Else
MsgBox("There is no row selected", MsgBoxStyle.Information)
End If
End Sub
Private Sub cmdCancle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancle.Click
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.Enabled = True
Me.Close()
Main.Show()
End Sub
Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click
Dim Id As Integer
Dim objtran As New clsTransaction
Id = DGTransaction.SelectedRows(0).Cells("Id").Value
objtran = (objmodeltran.GetById(Id))
'Transaction.Show()
Dim objTransaction As New Transaction
Transaction.StartPosition = FormStartPosition.Manual
Transaction.Left = 0
Transaction.Top = 0
Transaction.MdiParent = Main
Transaction.Show()
Transaction.lblid.Text = DGTransaction.SelectedRows(0).Cells("Id").Value
Transaction.cmbFrom_Account_Id.SelectedText = DGTransaction.SelectedRows(0).Cells("From_Account_ID").Value
Transaction.cmbType.SelectedText = DGTransaction.SelectedRows(0).Cells("Type_Id").Value
Transaction.cmbCategory.SelectedText = DGTransaction.SelectedRows(0).Cells("Category_Id").Value
Transaction.txtAmount.Text = DGTransaction.SelectedRows(0).Cells("Amount").Value
Transaction.txtComment.Text = DGTransaction.SelectedRows(0).Cells("Comment").Value
Transaction.lbluserid.Text = DGTransaction.SelectedRows(0).Cells("User_Id").Value
Transaction.lblid.Enabled = False
Me.Close()
' objmodeltran.Update(Id, objtran)
End Sub
Private Sub DGTransaction_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGTransaction.CellContentClick
End Sub
Private Sub DGTransaction_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles DGTransaction.CellFormatting
End Sub
End Class
User Entry Form
Imports System.Data.OleDb
Public Class User
Dim objUser As New clsUser
Dim objModelUser As New modelUser
Dim dtUser As New DataTable
Dim Adpter As New OleDbDataAdapter
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
Private Sub cmdClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClose.Click
Me.Close()
Main.Show()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
End Sub
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
If (lblid.Enabled = False) Then
objUser.ID = CInt(lblid.Text)
Dim id As Integer = objUser.ID
If (txtUser_Name.Text = Nothing) Then
MsgBox("Please Enter the User name")
txtUser_Name.Select()
Return
End If
If (txtPassword.Text = Nothing) Then
MsgBox("Please Enter the Password")
txtPassword.Select()
Return
End If
If Not (txtRepassword.Text = txtPassword.Text) Then
MsgBox("The password is not valid")
txtRepassword.Select()
Return
End If
If (txtFirst_Name.Text = Nothing) Then
MsgBox("Please Enter the First name")
txtFirst_Name.Select()
Return
End If
If (txtPan_No.Text = Nothing) Then
MsgBox("Please Enter the Pan No")
txtPan_No.Select()
Return
End If
objUser.User_Name = txtUser_Name.Text
objUser.Password = txtPassword.Text
objUser.Password_Hint = txtPassword_Hint.Text
objUser.First_Name = txtFirst_Name.Text
objUser.Last_Name = txtLast_Name.Text
objUser.Phone_No = txtPhone_No.Text
objUser.Pan_No = txtPan_No.Text
objModelUser.Update(id, objUser)
Clear()
Account_Grid.DGAccount.Refresh()
Me.Close()
User_Grid.StartPosition = FormStartPosition.Manual
User_Grid.Left = 0
User_Grid.Top = 0
User_Grid.MdiParent = Main
User_Grid.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
Me.Refresh()
Else
If (txtUser_Name.Text = Nothing) Then
MsgBox("Please Enter the User name")
txtUser_Name.Select()
Return
End If
If (txtPassword.Text = Nothing) Then
MsgBox("Please Enter the Password")
txtPassword.Select()
Return
End If
If Not (txtRepassword.Text = txtPassword.Text) Then
MsgBox("The password is not valid")
txtRepassword.Select()
Return
End If
If (txtFirst_Name.Text = Nothing) Then
MsgBox("Please Enter the First name")
txtFirst_Name.Select()
Return
End If
If (txtPan_No.Text = Nothing) Then
MsgBox("Please Enter the Pan No")
txtPan_No.Select()
Return
End If
objUser.User_Name = txtUser_Name.Text
objUser.Password = txtPassword.Text
objUser.Password_Hint = txtPassword_Hint.Text
objUser.First_Name = txtFirst_Name.Text
objUser.Last_Name = txtLast_Name.Text
objUser.Phone_No = txtPhone_No.Text
objUser.Pan_No = txtPan_No.Text
' Validation()
objModelUser.Insert(objUser)
Clear()
Account_Grid.DGAccount.Refresh()
' MsgBox("Record Added successfully", MsgBoxStyle.Information)
Me.Close()
Dim objUser_Grid As New Account_Grid
User_Grid.StartPosition = FormStartPosition.Manual
User_Grid.Left = 0
User_Grid.Top = 0
User_Grid.MdiParent = Main
User_Grid.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
End If
End Sub
Public Sub Clear()
txtUser_Name.Text = ""
txtPassword.Text = ""
txtRepassword.Text = ""
txtPassword_Hint.Text = ""
txtFirst_Name.Text = ""
txtLast_Name.Text = ""
txtPhone_No.Text = ""
txtPan_No.Text = ""
End Sub
Public Sub Validation()
If (txtUser_Name.Text = "") Then
MsgBox("Please Enter The Name Of User", MsgBoxStyle.Critical)
txtUser_Name.Select()
ElseIf (txtPassword.Text = "") Then
MsgBox("Please Enter The Password Of User Name::" + txtUser_Name.Text, MsgBoxStyle.Critical)
txtPassword.Select()
ElseIf Not (txtRepassword.Text = txtPassword.Text) Then
MsgBox("Password Does Not Match Enter Agin", MsgBoxStyle.Critical)
txtRepassword.Select()
ElseIf (txtFirst_Name.Text = "") Then
MsgBox("Please Enter The First Name ", MsgBoxStyle.Critical)
txtFirst_Name.Select()
ElseIf (txtPan_No.Text = "") Then
MsgBox("Please Enter The Pan No", MsgBoxStyle.Critical)
txtPan_No.Select()
End If
End Sub
Private Sub txtUser_Name_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtUser_Name.GotFocus
txtUser_Name.BackColor = Color.Bisque
End Sub
Private Sub txtUser_Name_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtUser_Name.LostFocus
txtUser_Name.BackColor = Color.White
End Sub
Private Sub txtPassword_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtPassword.GotFocus
txtPassword.BackColor = Color.Bisque
End Sub
Private Sub txtPassword_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtPassword.LostFocus
txtPassword.BackColor = Color.White
End Sub
Private Sub txtRepassword_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtRepassword.GotFocus
txtRepassword.BackColor = Color.Bisque
End Sub
Private Sub txtRepassword_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtRepassword.LostFocus
txtRepassword.BackColor = Color.White
End Sub
Private Sub txtRepassword_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtRepassword.TextChanged
End Sub
Private Sub txtPassword_Hint_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtPassword_Hint.GotFocus
txtPassword_Hint.BackColor = Color.Bisque
End Sub
Private Sub txtPassword_Hint_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtPassword_Hint.LostFocus
txtPassword_Hint.BackColor = Color.White
End Sub
Private Sub txtPassword_Hint_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPassword_Hint.TextChanged
End Sub
Private Sub txtFirst_Name_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtFirst_Name.GotFocus
txtFirst_Name.BackColor = Color.Bisque
End Sub
Private Sub txtFirst_Name_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtFirst_Name.LostFocus
txtFirst_Name.BackColor = Color.White
End Sub
Private Sub txtFirst_Name_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtFirst_Name.TextChanged
End Sub
Private Sub txtLast_Name_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtLast_Name.GotFocus
txtLast_Name.BackColor = Color.Bisque
End Sub
Private Sub txtLast_Name_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtLast_Name.LostFocus
txtLast_Name.BackColor = Color.White
End Sub
Private Sub txtLast_Name_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtLast_Name.TextChanged
End Sub
Private Sub txtPhone_No_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtPhone_No.GotFocus
txtPhone_No.BackColor = Color.Bisque
End Sub
Private Sub txtPhone_No_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtPhone_No.LostFocus
txtPhone_No.BackColor = Color.White
End Sub
Private Sub txtPhone_No_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPhone_No.TextChanged
End Sub
Private Sub txtPan_No_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtPan_No.GotFocus
txtPan_No.BackColor = Color.Bisque
End Sub
Private Sub txtPan_No_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtPan_No.LostFocus
txtPan_No.BackColor = Color.White
End Sub
Private Sub txtPan_No_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPan_No.TextChanged
End Sub
Private Sub txtUser_Name_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtUser_Name.TextChanged
End Sub
Private Sub txtPassword_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPassword.TextChanged
End Sub
Private Sub User_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Display User Information Form
Edit Profile Form
Imports System.Data.OleDb
Public Class Edit_Profile
Dim objconn As New clsConnection
Dim objUser As New clsUser
Dim objmodelUser As New modelEdit_Profile
Private Sub cmdClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClose.Click
Me.Close()
Main.MenuStrip.Enabled = True
Main.cmdAccount.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
End Sub
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
If (lblId.Enabled = False) Then
objUser.ID = CInt(lblId.Text)
Dim id As Integer = objUser.ID
If (txtUser_Name.Text = Nothing) Then
MsgBox("Please Enter the User name")
txtUser_Name.Select()
Return
End If
If (txtFirst_Name.Text = Nothing) Then
MsgBox("Please Enter the First name")
txtFirst_Name.Select()
Return
End If
If (txtpan_no.Text = Nothing) Then
MsgBox("Please Enter the Pan No")
txtpan_no.Select()
Return
End If
objUser.User_Name = txtUser_Name.Text
objUser.First_Name = txtFirst_Name.Text
objUser.Last_Name = txtLast_Name.Text
objUser.Phone_No = txtPhone_No.Text
objUser.Pan_No = txtpan_no.Text
objmodelUser.Update(id, objUser)
Clear()
User_Grid.DGUser.Refresh()
' MsgBox("Record Updated Sucessfully", MsgBoxStyle.Information)
Me.Close()
User_Grid.StartPosition = FormStartPosition.Manual
User_Grid.Left = 0
User_Grid.Top = 0
User_Grid.MdiParent = Main
User_Grid.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
Me.Refresh()
Else
Me.Refresh()
End If
End Sub
Public Sub Clear()
txtUser_Name.Text = ""
txtFirst_Name.Text = ""
txtLast_Name.Text = ""
txtPhone_No.Text = ""
txtPan_No.Text = ""
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
End Class
Change Password Form
Imports System.Data.OleDb
Public Class Change_Password
Dim objConn As New clsConnection
Dim objmodelUser As New modelChange_Password
Dim objUser As New clsUser
Public Sub Clear()
txtUser_Name.Text = ""
txtPassword.Text = ""
txtRe_Password.Text = ""
txtPassword_Hint.Text = ""
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
Private Sub cmdClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClose.Click
Me.Close()
Main.MenuStrip.Enabled = True
Main.cmdAccount.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
End Sub
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
If (lblId.Enabled = False) Then
objUser.ID = CInt(lblId.Text)
Dim id As Integer = objUser.ID
If (txtUser_Name.Text = Nothing) Then
MsgBox("Please Enter the User name")
txtUser_Name.Select()
Return
End If
If (txtPassword.Text = Nothing) Then
MsgBox("Please Enter the Password")
txtPassword.Select()
Return
End If
If Not (txtRe_Password.Text = txtPassword.Text) Then
MsgBox("The password Does not match")
txtRe_Password.Select()
Return
End If
objUser.User_Name = txtUser_Name.Text
objUser.Password = txtPassword.Text
objUser.Password_Hint = txtPassword_Hint.Text
objmodelUser.Update(id, objUser)
Clear()
User_Grid.DGUser.Refresh()
Me.Close()
User_Grid.StartPosition = FormStartPosition.Manual
User_Grid.Left = 0
User_Grid.Top = 0
User_Grid.MdiParent = Main
User_Grid.Show()
Main.MenuStrip.Enabled = False
Main.ToolStrip.Enabled = False
Me.Refresh()
Else
Me.Refresh()
End If
End Sub
End Class
10.2.7 Reports
Transaction Report Selection Form
Imports System.Data.OleDb
Public Class SelectTransactionReport
Dim objType As New clsTypes
Dim objmodelType As New modelTypes
Dim objAccount As New clsAccount
Dim objmodelAccount As New modelAccount
Public Sub LoadType()
Dim objmodelType As New modelTypes
Dim dt As New DataTable
dt = objmodelType.SelectAll(Nothing, Nothing, Nothing, Nothing, Nothing)
cmbType.DataSource = dt
cmbType.ValueMember = "ID"
cmbType.DisplayMember = "Type_Name"
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
Public Sub LoadAccount()
Dim objmodelAccount As New modelAccount
Dim dt2 As New DataTable
dt2 = objmodelAccount.SelectAll(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
cmbAccountName.DataSource = dt2
cmbAccountName.ValueMember = "ID"
cmbAccountName.DisplayMember = "Account_Name"
End Sub
Private Sub SelectTransactionReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
LoadAccount()
LoadType()
RadioButton3.Select()
Dim sdata As String
Dim sdaata As String
sdaata = Now.Month - 1
cmbMonth.SelectedIndex = sdaata
sdata = Now.Year
Dim temp As String
temp = 20
sdata.Trim(temp)
cmbYear.SelectedIndex = 10
cmbYear1.SelectedIndex = 10
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
GroupBox2.Enabled = True
GroupBox1.Enabled = False
GroupBox3.Enabled = False
End Sub
Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
GroupBox2.Enabled = False
GroupBox1.Enabled = False
GroupBox3.Enabled = True
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
GroupBox2.Enabled = False
GroupBox3.Enabled = False
GroupBox1.Enabled = True
End Sub
Private Sub cmdCancle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancle.Click
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
Private Sub cmdLoadReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLoadReport.Click
Dim MySet As New DataTable
Dim dsTransaction As New dsTransaction
Dim month As New Date
Dim stDate As DateTime = Convert.ToDateTime("01/01/0001")
Dim enDate As DateTime = Convert.ToDateTime("01/01/0001")
Dim adpt As New OleDb.OleDbDataAdapter("", "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\PersonalAccountPlanner\PersonalTaxPlanner.accdb")
If (RadioButton1.Checked = True) Then
adpt.SelectCommand.CommandText = "SELECT tblTransaction.Entry_Date,tblTransaction.Amount,tblTransaction.User_ID, tblAccount.Account_Name, tblCategory.Category_Name, tblType.Type_Name From tblType INNER JOIN (tblCategory INNER JOIN (tblAccount INNER JOIN tblTransaction ON tblAccount.ID=tblTransaction.From_Account_Id) ON tblCategory.ID=tblTransaction.Category_Id) ON tblType.ID=tblTransaction.Type_Id WHERE tblTransaction.Entry_Date Between #" & DateTimePicker1.Text & "# AND #" & DateTimePicker2.Text & " # AND tblTransaction.User_ID = " & userid
End If
If (RadioButton2.Checked = True) Then
stDate = Convert.ToDateTime("01/01/0001")
stDate = stDate.AddYears(Convert.ToInt32(cmbYear.SelectedItem) - 1)
stDate = stDate.AddMonths(cmbMonth.SelectedIndex)
'stDate = stDate.AddDays(-1)
enDate = stDate.AddMonths(1)
enDate = enDate.AddDays(-1)
adpt.SelectCommand.CommandText = "SELECT tblTransaction.Entry_Date,tblTransaction.Amount,tblTransaction.User_ID, tblAccount.Account_Name, tblCategory.Category_Name, tblType.Type_Name From tblType INNER JOIN (tblCategory INNER JOIN (tblAccount INNER JOIN tblTransaction ON tblAccount.ID=tblTransaction.From_Account_Id) ON tblCategory.ID=tblTransaction.Category_Id) ON tblType.ID=tblTransaction.Type_Id WHERE tblTransaction.Entry_Date Between #" & stDate & "# AND #" & enDate & " # AND tblTransaction.User_ID = " & userid
End If
If (RadioButton3.Checked = True) Then
stDate = Convert.ToDateTime("01/01/0001")
stDate = stDate.AddYears(Convert.ToInt32(cmbYear1.SelectedItem) - 1)
enDate = stDate.AddYears(1)
enDate = enDate.AddDays(-1)
adpt.SelectCommand.CommandText = "SELECT tblTransaction.Entry_Date,tblTransaction.Amount,tblTransaction.User_ID, tblAccount.Account_Name, tblCategory.Category_Name, tblType.Type_Name From tblType INNER JOIN (tblCategory INNER JOIN (tblAccount INNER JOIN tblTransaction ON tblAccount.ID=tblTransaction.From_Account_Id) ON tblCategory.ID=tblTransaction.Category_Id) ON tblType.ID=tblTransaction.Type_Id WHERE tblTransaction.Entry_Date Between #" & stDate & "# AND #" & enDate & " # AND tblTransaction.User_ID = " & userid
End If
adpt.Fill(MySet)
Dim ob As New CrystalReport3
Dim p As New LoadReport(ob, MySet)
p.Show()
End Sub
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click
End Sub
Private Sub cmbAccountName_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbAccountName.SelectedIndexChanged
End Sub
End Class
Transaction Report with Chart
Public Class LoadReport
Dim obDocument As CrystalDecisions.CrystalReports.Engine.ReportDocument
Public Sub New(ByRef ob As CrystalDecisions.CrystalReports.Engine.ReportDocument)
obDocument = ob
InitializeComponent()
CrystalReportViewer1.ReportSource = obDocument
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim response As MsgBoxResult
response = MsgBox("Do you want to close?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm")
If response = MsgBoxResult.Yes Then
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
ElseIf response = MsgBoxResult.No Then
e.Cancel = True
Exit Sub
End If
End Sub
Public Sub New(ByRef ob As CrystalDecisions.CrystalReports.Engine.ReportDocument, ByRef DS As DataTable)
obDocument = ob
' This call is required by the Windows Form Designer.
InitializeComponent()
LogOnReport(obDocument, DS)
CrystalReportViewer1.ReportSource = obDocument
End Sub
Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load
End Sub
End Class
Category Report Selection Form
Imports System.Data.OleDb
Imports PersonalTaxPlanner.DataSetTable
Imports PersonalTaxPlanner.dsCategory
Public Class Select_Category
Dim objcategory As New clsCategory
Dim objConn As New clsConnection
Dim objType As New clsTypes
Dim objmodeltype As New modelTypes
Dim objmodelcategory As New modelCategory
Dim dtCateogry As New DataTable
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
Main.cmdCategory.Enabled = True
Main.cmdClose.Enabled = True
Main.cmdLogoff.Enabled = True
Main.cmdTransaction.Enabled = True
Main.cmdUser.Enabled = True
Main.cmdAccount.Enabled = True
End Sub
Private Sub Select_Category_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
cmdnext1.Visible = False
cmdnext2.Visible = False
cmdnext3.Visible = False
cmdnext4.Visible = False
cmbChild1.Visible = False
cmbChild2.Visible = False
cmbChild3.Visible = False
cmbChild4.Visible = False
cmdSelect2.Visible = False
cmdSelect3.Visible = False
cmdSelect4.Visible = False
cmdSelect5.Visible = False
cmdPrevious1.Visible = False
cmdPrevious2.Visible = False
cmdPrevious3.Visible = False
cmdPrevious4.Visible = False
Dim objmodelType As New modelTypes
Dim dt As New DataTable
dt = objmodelType.SelectAll(Nothing, Nothing, Nothing, Nothing, Nothing)
cmbType.DataSource = dt
cmbType.ValueMember = "ID"
cmbType.DisplayMember = "Type_Name"
RadioButton3.Select()
Dim sdata As String
Dim sdaata As String
sdaata = Now.Month - 1
cmbMonth.SelectedIndex = sdaata
sdata = Now.Year
Dim temp As String
temp = 20
sdata.Trim(temp)
cmbYear.SelectedIndex = 10
cmbYear1.SelectedIndex = 10
End Sub
Private Sub cmbType_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbType.SelectedIndexChanged
LoadCategory()
End Sub
Public Sub LoadCategory()
Dim dt3 As New DataTable
Dim objmodelcategory As New modelCategory
dt3 = objmodelcategory.SelectAll(Nothing, Nothing, cmbType.SelectedValue.GetHashCode, 0, Nothing, Nothing, Nothing)
cmbParent_Category.DataSource = dt3
cmbParent_Category.ValueMember = "ID"
cmbParent_Category.DisplayMember = "Category_Name"
End Sub
Public Sub LoadChlid1()
Dim dt1 As New DataTable
Dim objmodelcategory As New modelCategory
dt1 = objmodelcategory.SelectAll(Nothing, Nothing, Nothing, cmbParent_Category.SelectedValue.GetHashCode, Nothing, Nothing, Nothing)
cmbChild1.DataSource = dt1
cmbChild1.ValueMember = "ID"
cmbChild1.DisplayMember = "Category_Name"
End Sub
Public Sub LoadChlid2()
Dim dt1 As New DataTable
Dim objmodelcategory As New modelCategory
dt1 = objmodelcategory.SelectAll(Nothing, Nothing, Nothing, cmbChild1.SelectedValue.GetHashCode, Nothing, Nothing, Nothing)
cmbChild2.DataSource = dt1
cmbChild2.ValueMember = "ID"
cmbChild2.DisplayMember = "Category_Name"
End Sub
Public Sub LoadChlid3()
Dim dt1 As New DataTable
Dim objmodelcategory As New modelCategory
dt1 = objmodelcategory.SelectAll(Nothing, Nothing, Nothing, cmbChild2.SelectedValue.GetHashCode, Nothing, Nothing, Nothing)
cmbChild3.DataSource = dt1
cmbChild3.ValueMember = "ID"
cmbChild3.DisplayMember = "Category_Name"
End Sub
Public Sub LoadChlid4()
Dim dt1 As New DataTable
Dim objmodelcategory As New modelCategory
dt1 = objmodelcategory.SelectAll(Nothing, Nothing, Nothing, cmbChild3.SelectedValue.GetHashCode, Nothing, Nothing, Nothing)
cmbChild4.DataSource = dt1
cmbChild4.ValueMember = "ID"
cmbChild4.DisplayMember = "Category_Name"
End Sub
Private Sub cmbParent_Category_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbParent_Category.SelectedIndexChanged
LoadChlid1()
End Sub
Private Sub cmbChild1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbChild1.SelectedIndexChanged
LoadChlid2()
End Sub
Private Sub cmdnext1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdnext1.Click
Label2.Visible = True
Label3.Visible = True
Label4.Visible = False
Label5.Visible = False
cmdnext1.Visible = True
cmdnext2.Visible = True
cmdnext3.Visible = False
cmdnext4.Visible = False
cmbChild1.Visible = True
cmbChild2.Visible = True
cmbChild3.Visible = False
cmbChild4.Visible = False
cmdSelect2.Visible = True
cmdSelect3.Visible = True
cmdSelect4.Visible = False
cmdSelect5.Visible = False
cmdPrevious1.Visible = True
cmdPrevious2.Visible = True
cmdPrevious3.Visible = False
cmdPrevious4.Visible = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label2.Visible = True
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
cmdnext1.Visible = True
cmdnext2.Visible = False
cmdnext3.Visible = False
cmdnext4.Visible = False
cmbChild1.Visible = True
cmbChild2.Visible = False
cmbChild3.Visible = False
cmbChild4.Visible = False
cmdSelect1.Visible = True
cmdSelect2.Visible = True
cmdPrevious1.Visible = True
cmdPrevious2.Visible = False
cmdPrevious3.Visible = False
cmdPrevious4.Visible = False
End Sub
Private Sub cmdnext2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdnext2.Click
Label2.Visible = True
Label3.Visible = True
Label4.Visible = True
Label5.Visible = False
cmdnext1.Visible = True
cmdnext2.Visible = True
cmdnext3.Visible = True
cmdnext4.Visible = False
cmbChild1.Visible = True
cmbChild2.Visible = True
cmbChild3.Visible = True
cmbChild4.Visible = False
cmdSelect2.Visible = True
cmdSelect3.Visible = True
cmdSelect4.Visible = True
cmdSelect5.Visible = False
cmdPrevious1.Visible = True
cmdPrevious2.Visible = True
cmdPrevious3.Visible = True
cmdPrevious4.Visible = False
End Sub
Private Sub cmdnext3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdnext3.Click
Label2.Visible = True
Label3.Visible = True
Label4.Visible = True
Label5.Visible = True
cmdnext1.Visible = True
cmdnext2.Visible = True
cmdnext3.Visible = True
cmdnext4.Visible = False
cmbChild1.Visible = True
cmbChild2.Visible = True
cmbChild3.Visible = True
cmbChild4.Visible = True
cmdSelect2.Visible = True
cmdSelect3.Visible = True
cmdSelect4.Visible = True
cmdSelect5.Visible = True
cmdPrevious1.Visible = True
cmdPrevious2.Visible = True
cmdPrevious3.Visible = True
cmdPrevious4.Visible = True
End Sub
Private Sub cmbChild3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbChild3.SelectedIndexChanged
LoadChlid4()
End Sub
Private Sub cmdSelect1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSelect1.Click
Dim MySet As New DataTable
Dim dsCategory As New dsCategory
Dim stDate As DateTime = Convert.ToDateTime("01/01/0001")
Dim enDate As DateTime = Convert.ToDateTime("01/01/0001")
Dim adpt As New OleDb.OleDbDataAdapter("", "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\PersonalAccountPlanner\PersonalTaxPlanner.accdb")
If (RadioButton1.Checked = True) Then
Dim parentid As Integer
parentid = cmbParent_Category.SelectedValue.GetHashCode
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Created_Date Between #" & DateTimePicker1.Text & "# and #" & DateTimePicker2.Text & "#" & "AND tblCategory.Parent_Category_ID = " & cmbParent_Category.SelectedValue.GetHashCode
End If
If (RadioButton2.Checked = True) Then
stDate = Convert.ToDateTime("01/01/0001")
stDate = stDate.AddYears(Convert.ToInt32(cmbYear.SelectedItem) - 1)
stDate = stDate.AddMonths(cmbMonth.SelectedIndex)
enDate = stDate.AddMonths(1)
enDate = enDate.AddDays(-1)
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Created_Date Between #" & stDate & "# and #" & enDate & "#" & "AND tblCategory.Parent_Category_ID = " & cmbParent_Category.SelectedValue.GetHashCode
End If
If (RadioButton3.Checked = True) Then
stDate = Convert.ToDateTime("01/01/0001")
stDate = stDate.AddYears(Convert.ToInt32(cmbYear1.SelectedItem) - 1)
enDate = stDate.AddYears(1)
enDate = enDate.AddDays(-1)
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Created_Date Between #" & stDate & "# and #" & enDate & "#" & "AND tblCategory.Parent_Category_ID = " & cmbParent_Category.SelectedValue.GetHashCode
End If
adpt.Fill(MySet)
Dim ob As New CategoryReport
Dim p As New LoadReport(ob, MySet)
p.Show()
End Sub
Private Sub cmdSelect2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSelect2.Click
Dim MySet As New DataTable
Dim dsCategory As New dsCategory
Dim stDate As DateTime = Convert.ToDateTime("01/01/0001")
Dim enDate As DateTime = Convert.ToDateTime("01/01/0001")
Dim adpt As New OleDb.OleDbDataAdapter("", "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\PersonalTaxPlanner\PersonalTaxPlanner.accdb")
If (RadioButton1.Checked = True) Then
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Parent_Category.Id = " & cmbChild1.SelectedValue.GetHashCode & "AND tblCategory.Created_Date Between #" & DateTimePicker1.Text & "# and #" & DateTimePicker2.Text & "#" & "AND tblCategory.Parent_Category_ID = " & cmbChild1.SelectedValue.GetHashCode
End If
If (RadioButton2.Checked = True) Then
stDate = Convert.ToDateTime("01/01/0001")
stDate = stDate.AddYears(Convert.ToInt32(cmbYear.SelectedItem) - 1)
stDate = stDate.AddMonths(cmbMonth.SelectedIndex)
'stDate = stDate.AddDays(-1)
enDate = stDate.AddMonths(1)
enDate = enDate.AddDays(-1)
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Created_Date Between #" & stDate & "# and #" & enDate & "#" & "AND tblCategory.Parent_Category_ID = " & cmbChild1.SelectedValue.GetHashCode
End If
If (RadioButton3.Checked = True) Then
stDate = Convert.ToDateTime("01/01/0001")
stDate = stDate.AddYears(Convert.ToInt32(cmbYear1.SelectedItem) - 1)
enDate = stDate.AddYears(1)
enDate = enDate.AddDays(-1)
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Created_Date Between #" & stDate & "# and #" & enDate & "#" & "AND tblCategory.Parent_Category_ID = " & cmbChild1.SelectedValue.GetHashCode
End If
adpt.Fill(MySet)
Dim ob As New CategoryReport
Dim p As New LoadReport(ob, MySet)
p.Show()
End Sub
Private Sub cmdSelect3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSelect3.Click
Dim MySet As New DataTable
Dim dsCategory As New dsCategory
Dim stDate As DateTime = Convert.ToDateTime("01/01/0001")
Dim enDate As DateTime = Convert.ToDateTime("01/01/0001")
Dim adpt As New OleDb.OleDbDataAdapter("", "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\PersonalTaxPlanner\PersonalTaxPlanner.accdb")
If (RadioButton1.Checked = True) Then
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Parent_Category.Id = " & cmbChild2.SelectedValue.GetHashCode & "AND tblCategory.Created_Date Between #" & DateTimePicker1.Text & "# and #" & DateTimePicker2.Text & "#" & "AND tblCategory.Parent_Category_ID = " & cmbChild2.SelectedValue.GetHashCode
End If
If (RadioButton2.Checked = True) Then
stDate = Convert.ToDateTime("01/01/0001")
stDate = stDate.AddYears(Convert.ToInt32(cmbYear.SelectedItem) - 1)
stDate = stDate.AddMonths(cmbMonth.SelectedIndex)
enDate = stDate.AddMonths(1)
enDate = enDate.AddDays(-1)
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Created_Date Between #" & stDate & "# and #" & enDate & "#" & "AND tblCategory.Parent_Category_ID = " & cmbChild2.SelectedValue.GetHashCode
End If
If (RadioButton3.Checked = True) Then
stDate = Convert.ToDateTime("01/01/0001")
stDate = stDate.AddYears(Convert.ToInt32(cmbYear1.SelectedItem) - 1)
enDate = stDate.AddYears(1)
enDate = enDate.AddDays(-1)
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Created_Date Between #" & stDate & "# and #" & enDate & "#" & "AND tblCategory.Parent_Category_ID = " & cmbChild2.SelectedValue.GetHashCode
End If
adpt.Fill(MySet)
Dim ob As New CategoryReport
Dim p As New LoadReport(ob, MySet)
p.Show()
End Sub
Private Sub cmdSelect4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSelect4.Click
Dim MySet As New DataTable
Dim dsCategory As New dsCategory
Dim stDate As DateTime = Convert.ToDateTime("01/01/0001")
Dim enDate As DateTime = Convert.ToDateTime("01/01/0001")
Dim adpt As New OleDb.OleDbDataAdapter("", "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\PersonalTaxPlanner\PersonalTaxPlanner.accdb")
If (RadioButton1.Checked = True) Then
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Parent_Category.Id = " & cmbChild3.SelectedValue.GetHashCode & "AND tblCategory.Created_Date Between #" & DateTimePicker1.Text & "# and #" & DateTimePicker2.Text & "#" & "AND tblCategory.Parent_Category_ID = " & cmbChild3.SelectedValue.GetHashCode
End If
If (RadioButton2.Checked = True) Then
stDate = Convert.ToDateTime("01/01/0001")
stDate = stDate.AddYears(Convert.ToInt32(cmbYear.SelectedItem) - 1)
stDate = stDate.AddMonths(cmbMonth.SelectedIndex)
enDate = stDate.AddMonths(1)
enDate = enDate.AddDays(-1)
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Created_Date Between #" & stDate & "# and #" & enDate & "#" & "AND tblCategory.Parent_Category_ID = " & cmbChild3.SelectedValue.GetHashCode
End If
If (RadioButton3.Checked = True) Then
stDate = Convert.ToDateTime("01/01/0001")
stDate = stDate.AddYears(Convert.ToInt32(cmbYear1.SelectedItem) - 1)
enDate = stDate.AddYears(1)
enDate = enDate.AddDays(-1)
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Created_Date Between #" & stDate & "# and #" & enDate & "#" & "AND tblCategory.Parent_Category_ID = " & cmbChild3.SelectedValue.GetHashCode
End If
adpt.Fill(MySet)
Dim ob As New CategoryReport
Dim p As New LoadReport(ob, MySet)
p.Show()
End Sub
Private Sub cmdSelect5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSelect5.Click
Dim MySet As New DataTable
Dim dsCategory As New dsCategory
Dim stDate As DateTime = Convert.ToDateTime("01/01/0001")
Dim enDate As DateTime = Convert.ToDateTime("01/01/0001")
Dim adpt As New OleDb.OleDbDataAdapter("", "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\PersonalTaxPlanner\PersonalTaxPlanner.accdb")
If (RadioButton1.Checked = True) Then
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Parent_Category.Id = " & cmbChild4.SelectedValue.GetHashCode & "AND tblCategory.Created_Date Between #" & DateTimePicker1.Text & "# and #" & DateTimePicker2.Text & "#" & "AND tblCategory.Parent_Category_ID = " & cmbChild4.SelectedValue.GetHashCode
End If
If (RadioButton2.Checked = True) Then
stDate = Convert.ToDateTime("01/01/0001")
stDate = stDate.AddYears(Convert.ToInt32(cmbYear.SelectedItem) - 1)
stDate = stDate.AddMonths(cmbMonth.SelectedIndex)
enDate = stDate.AddMonths(1)
enDate = enDate.AddDays(-1)
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Created_Date Between #" & stDate & "# and #" & enDate & "#" & cmbChild4.SelectedValue.GetHashCode
End If
If (RadioButton3.Checked = True) Then
stDate = Convert.ToDateTime("01/01/0001")
stDate = stDate.AddYears(Convert.ToInt32(cmbYear1.SelectedItem) - 1)
enDate = stDate.AddYears(1)
enDate = enDate.AddDays(-1)
adpt.SelectCommand.CommandText = "SELECT tblCategory.*, tblType.Type_Name, tblTransaction.Amount FROM (tblType INNER JOIN tblCategory ON tblType.ID = tblCategory.Type_Id) INNER JOIN tblTransaction ON (tblType.ID = tblTransaction.Type_Id) AND (tblCategory.ID = tblTransaction.Category_Id) WHERE tblCategory.User_Id = " & userid & "AND tblCategory.Created_Date Between #" & stDate & "# and #" & enDate & "#" & cmbChild4.SelectedValue.GetHashCode
End If
adpt.Fill(MySet)
Dim ob As New CategoryReport
Dim p As New LoadReport(ob, MySet)
p.Show()
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
GroupBox1.Enabled = True
GroupBox2.Enabled = False
GroupBox3.Enabled = False
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
GroupBox1.Enabled = False
GroupBox2.Enabled = True
GroupBox3.Enabled = False
End Sub
Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
GroupBox1.Enabled = False
GroupBox2.Enabled = False
GroupBox3.Enabled = True
End Sub
Private Sub cmdPrevious4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPrevious4.Click
Label2.Visible = True
Label3.Visible = True
Label4.Visible = True
Label5.Visible = False
cmbChild1.Visible = True
cmbChild2.Visible = True
cmbChild3.Visible = True
cmbChild4.Visible = False
cmdSelect1.Visible = True
cmdSelect2.Visible = True
cmdSelect3.Visible = True
cmdSelect4.Visible = True
cmdSelect5.Visible = False
cmdnext1.Visible = True
cmdnext2.Visible = True
cmdnext3.Visible = True
cmdnext4.Visible = False
cmdPrevious1.Visible = True
cmdPrevious2.Visible = True
cmdPrevious3.Visible = True
cmdPrevious4.Visible = False
End Sub
Private Sub cmdPrevious3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPrevious3.Click
Label2.Visible = True
Label3.Visible = True
Label4.Visible = False
Label5.Visible = False
cmbChild1.Visible = True
cmbChild2.Visible = True
cmbChild3.Visible = False
cmbChild4.Visible = False
cmdSelect1.Visible = True
cmdSelect2.Visible = True
cmdSelect3.Visible = False
cmdSelect4.Visible = False
cmdSelect5.Visible = False
cmdPrevious1.Visible = True
cmdPrevious2.Visible = True
cmdPrevious3.Visible = False
cmdPrevious4.Visible = False
cmdnext1.Visible = True
cmdnext2.Visible = True
cmdnext3.Visible = False
cmdnext4.Visible = False
End Sub
Private Sub cmdPrevious2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPrevious2.Click
Label2.Visible = True
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
cmbChild1.Visible = True
cmbChild2.Visible = False
cmbChild3.Visible = False
cmbChild4.Visible = False
cmdSelect1.Visible = True
cmdSelect2.Visible = False
cmdSelect3.Visible = False
cmdSelect4.Visible = False
cmdSelect5.Visible = False
cmdPrevious1.Visible = True
cmdPrevious2.Visible = False
cmdPrevious3.Visible = False
cmdPrevious4.Visible = False
cmdnext1.Visible = True
cmdnext2.Visible = False
cmdnext3.Visible = False
cmdnext4.Visible = False
End Sub
Private Sub cmdPrevious1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPrevious1.Click
Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
cmbChild1.Visible = False
cmbChild2.Visible = False
cmbChild3.Visible = False
cmbChild4.Visible = False
cmdSelect1.Visible = True
cmdSelect2.Visible = False
cmdSelect3.Visible = False
cmdSelect4.Visible = False
cmdSelect5.Visible = False
cmdPrevious1.Visible = False
cmdPrevious2.Visible = False
cmdPrevious3.Visible = False
cmdPrevious4.Visible = False
cmdnext1.Visible = False
cmdnext2.Visible = False
cmdnext3.Visible = False
cmdnext4.Visible = False
End Sub
End Class
Category Report
Public Class LoadReport
Dim obDocument As CrystalDecisions.CrystalReports.Engine.ReportDocument
Public Sub New(ByRef ob As CrystalDecisions.CrystalReports.Engine.ReportDocument)
obDocument = ob
InitializeComponent()
CrystalReportViewer1.ReportSource = obDocument
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim response As MsgBoxResult
response = MsgBox("Do you want to close?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm")
If response = MsgBoxResult.Yes Then
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
ElseIf response = MsgBoxResult.No Then
e.Cancel = True
Exit Sub
End If
End Sub
Public Sub New(ByRef ob As CrystalDecisions.CrystalReports.Engine.ReportDocument, ByRef DS As DataTable)
obDocument = ob
InitializeComponent()
LogOnReport(obDocument, DS)
CrystalReportViewer1.ReportSource = obDocument
End Sub
Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load
End Sub
End Class
Type Report Selection Form
Public Class LoadReport
Dim obDocument As CrystalDecisions.CrystalReports.Engine.ReportDocument
Public Sub New(ByRef ob As CrystalDecisions.CrystalReports.Engine.ReportDocument)
obDocument = ob
InitializeComponent()
CrystalReportViewer1.ReportSource = obDocument
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim response As MsgBoxResult
response = MsgBox("Do you want to close?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm")
If response = MsgBoxResult.Yes Then
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
ElseIf response = MsgBoxResult.No Then
e.Cancel = True
Exit Sub
End If
End Sub
Public Sub New(ByRef ob As CrystalDecisions.CrystalReports.Engine.ReportDocument, ByRef DS As DataTable)
obDocument = ob
InitializeComponent()
LogOnReport(obDocument, DS)
CrystalReportViewer1.ReportSource = obDocument
End Sub
Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load
End Sub
End Class
Type Report Form
Public Class LoadReport
Dim obDocument As CrystalDecisions.CrystalReports.Engine.ReportDocument
Public Sub New(ByRef ob As CrystalDecisions.CrystalReports.Engine.ReportDocument)
obDocument = ob
InitializeComponent()
CrystalReportViewer1.ReportSource = obDocument
End Sub
Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim response As MsgBoxResult
response = MsgBox("Do you want to close?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm")
If response = MsgBoxResult.Yes Then
Me.Dispose()
Main.MenuStrip.Enabled = True
Main.ToolStrip.Enabled = True
ElseIf response = MsgBoxResult.No Then
e.Cancel = True
Exit Sub
End If
End Sub
Public Sub New(ByRef ob As CrystalDecisions.CrystalReports.Engine.ReportDocument, ByRef DS As DataTable)
obDocument = ob
InitializeComponent()
LogOnReport(obDocument, DS)
CrystalReportViewer1.ReportSource = obDocument
End Sub
Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load
End Sub
End Class
10.2.8. TESTING
Testing Database Connectivity:
Test a field one piece of data that appears in each record. For example, if you have a list of name and address, the first name might be the first field the last name might be the second field, for User Name, Password Details and other.
They are arranged in the table, records are also called rows and field is also called columns.
Record set let you automate and speed up your work; they are also used when you develop application. A micro is a list of action. SQL perform all the action in the list when you run the record set can save time for SQL users. Modules let you write programs in visual studio.net advanced application.
Complete check at run time:
After the connectivity of the SQL Database to the visual studio.net forms the data is shown to the forms in the details of the form at the run time.
The data contains of the User, Student, Staff, Branch, Class, Subject can show the full details of the student from his/her College or School.
As per the data the Administrator or User can add and edit the entry in the forms.
Testing validation:
Check the validation of the data adding or editing the data at run time. Time user can the valid data in the form when it is entering invalid data an error message displayed on the screen at run time
The validation of the data helps to enter perfect data in the database. So the viewer can see the perfect database in the report of the form.
Test of result:
In testing of the result the Administrator has to look that the main details have to insert in that result.
In the result the details data is entered and the user can view the details of his/her details and result.
11. Hardware Software Requirement
Hardware Requirements:
Minimum Hardware requirement is 128 MB of RAM
Space available on hard disk 20 MB
Processor is at list Pentium 4.
Software Requirements:
Windows XP or higher operating system
Microsoft Access 2007
Dot Net Framework 3.5
12. CONCLUSION
Any work may not be always perfect. There may be some error or some defect in the work. I have taken enough care to make the project user-friendly and more interactive and attractive.
Even though I never claim that this system may fulfill all the requirements of the entire user in every condition. After doing this project, I have learned many things and I would like to thank the entire concerned individual who has contributed to our precious learning.
I have learned to prepare the requirement catalogue, functional specification, system development life cycle in practical development and also learned real life software development coding tools having interactive features.
Though the project was taking too long and we faced many difficulties which had been resolved effective guidance of our project guide and professors.
I am sure that I can perform better and better as I step on the ladders of the experience…
As “Experience makes person perfect”
Thank you.
13. Bibliography
Reference e-book
Visual Basic 2005 Programming Black Book
Steven Holzner et al.
Resources from Internet
http://www.a1vbcode.com
http://www.codeproject.com
http://www.w3schools.com
http://www.stackoverflow.com
14. User Feedback
13. Project CD
ersonal Account Planner
Page 172 of 172