CHAPTER - 1 1. INTRODUCTION 1.1 DOTNET
The .Net frame work is a comprehensive platform that can be a little difficult to describe. It has been described as a Development Platform an execution environment and the operating system among other things. In fact in some aside from embracing the web, icrosoft .N!T acknowledges and responds The The fram framew ewor ork" k"ss #ase #ase $las $lasss %ibr %ibrar ary y provi provide dess a larg largee rang rangee of feat featur ures es incl includ udin ing g user user interf interface ace,, data data
access, access, databa database se
connect connectivi ivity ty,, crypto cryptograp graphy hy,, web
applica applicatio tion n develo developme pment, nt,
numeric algorithms, and network communications. The class library is used by programmers, who combine it with their own code to produce applications. Programs written for the .N!T &ramework execute in a software environment that manages the program"s runtime re'uirements. (lso part of the .N!T &ramework, this runtime environment is known as the $ommon %anguage )untime *$%)+. The $%) provides the appearance of an application virtual machine so that programmers need not consider the capabilities of the specific $P that will execute the program. The $%) also provides other important services such as security, memory management, and exception handling. The class library and the $%) together constitute the .N!T &ramework.
1
C# DOT NET
$- is a multipara multiparadigm digm programmin programming g language language encompassi encompassing ng imperative, imperative, declarativ declarative, e, functi functional onal,,
generi generic, c,
ob/ect ob/ector orien iented ted *class *classba based sed+, +,
and compone component ntori orient ented ed progra programm mming ing
disciplines. It was developed by icrosoft within the .N!T initiative and later approved as a standa standard rd by !cma !cma *!$( *!$(001+ 001+ and I23 *I234 *I234I!$ I!$ 50567+ 50567+.. $- is one of the progra programmi mming ng languages designed for the $ommon %anguage Infrastructure. $- is intended to be a simple, modern, generalpurpose, ob/ectoriented programming language. Its development team is led by (nders 8e/lsberg. The $- language language is disarmingl disarmingly y simple, with only about 97 keywords and a do:en builtin builtin data types types,, but $- is highly highly expres expressiv sivee when when it comes comes to implem implement enting ing modern modern program programmin ming g conc concept epts. s. $- incl includ udes es all all the the supp suppor ortt for for stru struct ctur ured, ed, comp compone onent ntb bas ased ed,, ob/e ob/ect ctor orie ient nted ed programming that one expects of a modern language built on the shoulders of $;; and
2
1.2 SQL SERVER:
2>% often referred to as 2tructured >uery %anguage, is a database computer language desi design gned ed for for
mana managi ging ng data data in rela relati tion onal al data databa base se mana managem gement ent syst system emss *)D# *)D#2 2+, +, and and
origin originall ally y based based upon upon relati relational onal algebr algebra. a. Its Its scope scope includ includes es data data insert insert,, 'uery 'uery, update update and delete, schema creation and modification, and data access control. 2>% was one of the first languages languages for !dgar &. $ode?s relational relational model in his influenti influential al @A67 paper, paper, B( )elational )elational odel of Data for %arge 2hared Data #anksB and became the most widely used language for relational databases. The 2>% language is subdivided into several language elements, includingC
•
$lauses, which are in some cases optional, constituent components of statements and 'ueries.
•
!xpressions which
can
produce
either scalar scalar v values
or tables tables consisting
of columns of columns and rows of data.
•
Predicates which specify conditions that can be evaluated to 2>% threevalue threevalued d logic *0%+ or #oolean or #oolean *true4false4unknown+ truth truth values and and whic which h are are used used to lim limit the the effects of statements and 'ueries, or to change program flow.
•
>ueries which retrieve data based on specific criteria.
•
2tatements which may have a persistent effect on schemas and data, or which may control transactions, program flow, connections, sessions, or diagnostics.
3
•
2>% statements also include the semicolon *BEB+ statement terminator. Though not re'uired on every platform, it is defined as a standard part of the 2>% grammar.
1.3 CASE TOOLS 1.3.1 Use Case Diagram
( use case corresponds to a se'uence of transactions, in which each transaction is invoked from outside the system *actors+ and engages internal ob/ects to interact with one another and will the system?s surroundings. The description of a use case defines what happens in the system when the use case is performed. In essence, the usecase model defines the outside *actors+ and Inside *use case+ of the system?s behavior. se cases represent specific flows of events in the system. The use cases are initiated by actors and describe the flow of events that these actors set off. (n actor is anything that interacts with a use caseC It could be a human user, external hardware, or another system. (n actor represents a category of user rather than physical user. 2everal physical users can play the same role. &or example, in terms of a ember actor, many people can be members of a library, which can be members of a library, which can be represented by one actor called ember. ( usecase diagram is a graph of actors, a set of use cases enc losed by a system boundary, communication associations between the actors and the use cases, and generali:ation among the usecases. 1.3.2Se!e"e Diagram:
4
2e'uence diagram are easy and intuitive way of describing the behavior of a system by viewing the interaction between the system and its environment. ( se'uence diagram shows an interaction arranged in a time se'uence. It shows the ob/ects participating in the interaction by their lifelines and the messages they exchange, arranged in a time se'uence. ( se'uence has two dimensionsC the vertical dimension represents time, the hori:ontal represents different ob/ects
1.3.3 C$%%a&$ra'i$":
$ollaboration is a recursive process where two or more people or organi:ations work together in an intersection of common goals F for example, an intellectual endeavor that is creative in nature by sharing knowledge, learning and building consensus. ost collaboration re'uires leadership, although the form of leadership can be social within a decentrali:ed and egalitarian group. In particular, teams that work collaboratively can obtain greater resources, recognition and reward when facing competition for finite resources. $ollaboration is also present in opposing goals exhibiting the notion of adversarial collaboration, though this is not a common case for using the word. 2tructured methods of collaboration encourage introspection of behavior and communication. These methods specifically aim to increase the success of teams as they engage in collaborative problem solving. &orms, rubrics, charts and graphs are useful in these situations to ob/ectively document personal traits with the goal of improving performance in current and future pro/ects.
1.3.( C%ass:
5
( class diagram in the nified odeling %anguage *%+ is a type of static structure diagram that describes the structure of a system by showing the system"s classes, their attributes, and the relationships between the classes. The class diagram is the main building block in ob/ect oriented modeling. They are being used both for general conceptual modeling of the systematic of the application, and for detailed modeling translating the models into programming code. The classes in a class diagram represent both the main ob/ects and or interactions in the application and the ob/ects to be programmed. In the class diagram these classes are represented with boxes which contain three partsC ( class with three sections. •
The upper part holds the name of the class
•
The middle part contains the attributes of the class
•
The bottom part gives the methods or operations the class can take or undertake
In the system design of a system, a number of classes are identified and grouped together in a class diagram which helps to determine the statically relations between those ob/ects. =ith detailed modeling, the classes of the conceptual design are often split in a number of subclasses. In order to further describe the behavior of systems, these class diagrams can be complemented by state diagram or % state machine. (lso instead of class diagrams 3b/ect role modeling can be used if you /ust want to model the classes and their relationships.
1.3.) A'i*i'+:
(ctivity diagrams are graphical representations of workflows of stepwise activities and actions with support for choice, iteration and concurrency. In the nified odeling %anguage,
6
activity diagrams can be used to describe the business and operational stepbystep workflows of components in a system. (n activity diagram shows the overall flow of control. (ctivity diagrams are constructed from a limited repertoire of shapes, connected with arrows. The most important shape typesC
•
)ounded rectangles represent activities.
•
Diamonds represent decisions.
•
#ars represent the start *split+ or end */oin+ of concurrent activities.
•
( black circle represents the start *initial state+ of the workflow.
•
(n encircled black circle represents the end *final state+.
•
(rrows run from the start towards the end and represent the order in which activities happen.
8ence they can be regarded as a form of flowchart. Typical flowchart techni'ues lack constructs for expressing concurrency. 8owever, the /oin and split symbols in activity diagrams only resolve this for simple casesE the meaning of the model is not clear when they are arbitrarily combined with decisions or loops.
7
CHAPTER , 2 2. SOTARE AND HARDARE REQUIRE/ENT
2.1 SOTARE REQUIRE/ENT
• • • •
3perating 2ystem &ront !nd #ack !nd =ord Processor
C =indows GP C $-.N!T C 2'l 2erver C 2=ord
2.2 HARDARE REQUIRE/ENT •
Processor
C IntelH dual$ore*T+
•
)(
C @ #
•
8ard Disc
C @57 #
•
Jey #oard
C 2tandard @7@4@75 keys
•
ouse
C icrosoft ouse or compatible pointing device
8
CHAPTER - 3 3. S0STE/ DESIN 3.1 DATA LO DIARA/
Logi n
Exit
Enter into Website
Homepage
Registrati on
Stock details
Bill Transacti on
9
Purchasin g
Report
Stop
3.2 CASE TOOLS DIARA/
3.2.1 Use ase Diagram
10
3.2.2 Se!e"e Diagram
login
new register s toc k det ail
purc hase detail
bill trancation
stock return
to be enter the new reg
to maintain the stock detail use login
to be purchase the product
re enter pass word
provided the bill
stock some time return
other information
11
about
3.2.3 C$%%a&$ra'i$" Diagram
5: re enter password
3: use login
bill trancation
stock detail
login
2: to maintain the stock detail 1: to be enter the new reg
6: provided the bill
4: to be purchase the product
purchase detail
7: stock some time return
stock return
8: other information new register
12
about
3.2.( C%ass Diagram
13
3.2.)A'i*i'+ Diagram
14
enter the new login login
false
stock detail
purchase detail
bill trancation
stock return
bill bacup
CHAPTER - (
15
(. /ODULE DISCRIPTION /$!%es:
1.@ %ogin 1.5 )egistration 1.0 2tock detail 1.1 #ill transaction 1.K Purchasing (.1 L$gi"
The user login module is used to grant access to other modules only for the authori:ed people on giving valid username and password.
(.2 Regis'ra'i$"
%ogin module accepts the name and password for existing user and validates it. &or new user create a account. This module will allow the user to buy and en/oy the accessibilities if they have an account *serId L Password+ .only admin can access have permission to change the password. =hen users have no account earlier they can create an account through admin. (.3 S'$ e'ai%s
In the stock detail module the availability of stock is checked by entering the code. If the stock is available it shows the stock detail otherwise it does not show the details. If stock is not available it can be purchased. 2tock detail displays icode, iname, iprice, 'uantity, here the availability of stock, 'uantity, prices are checked.
16
(.( 4i%% e'ai%
In this module the bill detail are shown. =henever the bill no is entered it shows the product to de bought by the customer. It is very useful for resales of product and also to check the bill details of the certain customer. (.) P!r5asi"g
This module will give the information that supports to buy a fresh product or to sell a second hand product. (lso it shows the icode, inumber, unit price, 'uanity, and amount. It will also give bill detail in it.
CHAPTER - ) ). I/PLE/ENTATION 17
).1 Da'a&ase Ta&%es
Stock detail.cs
Bill truncation.cs
18
Purchase detail.cs
).2 TESTIN
19
Testing is the name given to the checking and analysis process that ensure that the software conforms to its specification. In this pro/ect few testing techni'ues were applied at different stages of the pro/ect so as to test the performance of the pro/ect. The testing activity can be carried at the implementation to verify that the pro/ect behaves as intended by the designers. During these activities the software reliability was checked to a large extent. The successful testing process must confirm that the system is free of defects and is ready to use. ).2.1 /ODULE TESTIN It is a process of testing the system module, what are all the inputs given and what all are outputs produced and whether they are re'uired. 8ere after completing each module a testing was performed.
).2.2 S0STE/ TESTIN
2ystem testing is a series of different tests whose primary purpose is to exercise the computerbased system. It also tests to find discrepancies between the system and its original ob/ective, current specification. The re'uirements of our pro/ect were analy:ed and a test activity was performed whether the system has the necessary software to run this pro/ect. If not then the software is then installed into the system and the pro/ect will be implemented on it. ).2.3 INTERATED TESTIN
This is a very important testing process in any pro/ect. This testing mainly focuses on the combination of several parts of the pro/ect and making it to work. 8ere this testing activity was done at the end of the pro/ect and based on the results of this testing the output will be determined. ).2.( HITE 4O6 TESTIN
20
=hite #ox Testing focus on the program control structure. Test cases are derived to ensure that all statements in the program have been executed at least once during testing and that all logical conditions have been exercised. #asic Path Testing, a =hite #ox techni'ue, makes use of program graphics to derive a set of linearly independent tests that will ensure coverage. $ondition and data flow testing further exercise program logic and loop testing complements other white box techni'ues by providing a procedure for exercising loops of varying degrees of complexity.
).2.) 4LAC7 4O6 TESTIN
#lack #ox test are designed to validate functional re'uirements without regard to the interval working of the program. This techni'ue focuses on the information domain of 2oftware, deriving test case coverage. !'uivalence partitioning divides input domain into $lasses to data that are likely to exercise specific software function.
( classical system testing problem is finger pointing. This occurs when a defect is uncovered and one system element developer blames the other for the problem. In order to avoid this scenario the following measures are adopted. •
!rror handling paths are designed that test all information coming from other elements of the system.
•
( series of tests are conducted that stimulate bad data and other potential errors at the software interface.
•
The result of the tests is recorded to use as evidence if finger point does occur.
21
•
Participate in the design of system tests to ensure that the software if ade'uately tested.
TEST RESULT The listed tests were conducted at various development stages. Throughput was conducted .the errors were debugged. The integration testing will be performed once the system is integrated. The results were and analy:ed and alternations were made. The test results proved positive and henceforth the application is feasible and the test is approved.
22
).3 CODIN
P!r5ase e'ai%. Cs
private void button@M$lick*ob/ect sender, !vent(rgs e+ try 44int txtamt@ O $onvert.ToInt05*txt'ty.Text+ $onvert.ToInt05*txtuni.Text+E
44 txtamt.Text O [email protected]*+E 44txtamt.Text O$onvert.ToInt05 *txtuni.Text+4@77 $onvert.ToInt05*txttax.Text+E decimal p, ', :, m, /, a, fE if *txtuni.Text OOBB+ 44 essage#ox.2how*B!nter the Purchase PriceB, essage#ox#uttons.3J, essage#oxIcon.!xclamation+E essage#ox.2how*BQou must !nter a Purchase Price.B, BPurchase !ntry !rrorB, essage#ox#uttons.3J, essage#oxIcon.!xclamation+E txtuni.&ocus *+E R p O decimal.Parse*txtuni.Text+E
if **txtsell.Text+ OO BB+ a O decimal.Parse*txttaxper.Text+ aE 44 txttaxamt.Text O 2ystem.$onvert.To2tring*:+.To2tring*+E
23
txttaxamt.Text O :.To2tring*+E
int dE string s5 O txttaxamt.TextE d O s5.%astIndex3f*B.B+E 44 string ssa O s5.2ubstring*7, d ; 5+E 44 txttaxamt.Text O ssaE 44 essage#ox.2how*d.To2tring*++E if *dOOd + string ssa O s5.2ubstring*7, d ; 0+E txttaxamt.Text O ssaE R else txttaxamt.Text O :.To2tring*+E R
44 txttaxamt.Text O &ormat!xception*a, B-,---.--B+E 44 %abel9.Text O &ormat*count, B-,---.--B+
int nE string s@ O txtpri.TextE n O s@.%astIndex3f*B.B+E 44essage#ox.2how*n.To2tring*++E
24
if *n OO n+ string sss O [email protected]*7, n ; 0+E txtpri.Text O sssE R
else txtpri.Text O m.To2tring*+E R
44 txtpri.Text O sssE
txtmrpp.Text O f.To2tring*+E
int kE string s O txtmrpp.TextE kO s.%astIndex3f*B.B+E 44 string ss O s.2ubstring*7, k; 0+E 44 txtmrpp.Text O ssE if *k OO k+ Decimal dedE ded O *x+ Decimal.Parse*txtded.Text+E
44
txttotamt.Text O x.To2tring*+E
txttotamt.Text O ded.To2tring*+E
25
R catch *!xception ex+ essage#ox.2how*BQ3 2T !NT!) T8! &3)(T 7.77B,ex.essage+E R R
S'$ e'ai%.s
private void button1M$lick*ob/ect sender, !vent(rgs e+ try decimal p, ', :, m, /, a, fE if **txtsell.Text+ OO BB+ 44essage#ox.2how*B!nter the 2ell PriceB+E essage#ox.2how*BQou must !nter a 2ell Price.B, B2ell !ntry !rrorB, essage#ox#uttons.3J, essage#oxIcon.!xclamation+E txtsell.&ocus*+E R
/ O decimal.Parse*txtsell.Text+E ' O @77E a O / 4 'E 44 essage#ox.2how*:.To2tring*++E
26
if *txttaxper.Text OO BB+
essage#ox.2how*BQou must !nter a Tax Percentage.B, B(T !ntry !rrorB, essage#ox#uttons.3J, essage#oxIcon.!xclamation+E txttaxper.&ocus*+E
R else 44 : O decimal.Parse*txttaxper.Text+ :E a O decimal.Parse*txttaxper.Text+ aE
txttaxp.Text O 2ystem.$onvert.To2tring*a+.To2tring*+E
int vE string v@ O txttaxp.TextE v O v@.%astIndex3f*B.B+E 44 string vv O [email protected]*7, v ; 0+E 44 txttaxp.Text O vvE if *v OO v+
27
string vv O [email protected]*7, v ; 0+E txttaxp.Text O vvE R
else txttaxp.Text O 2ystem.$onvert.To2tring*a+.To2tring*+E R
44
m O p ; :E
f O / ; aE 44
txtpri.Text O m.To2tring*+E
txtmrpp.Text O f.To2tring*+E
int kE string s O txtmrpp.TextE k O s.%astIndex3f*B.B+E 44 string ss O s.2ubstring*7, k; 0+E 44 txtmrpp.Text O ssE if *k OO k+ string ss O s.2ubstring*7, k ; 0+E
28
txtmrpp.Text O ssE R
else txtmrpp.Text O f.To2tring*+E R
R R
catch *!xception ex+ essage#ox.2how*BQ3 2T !NT!) T8! &3)(T 7.77 B, ex.essage+E txtbat.&ocus*+E R R
29
).( Sree" S5$'s
L$gi".s
30
/ai".s
31
S'$e'ai%.s
32
4i%% 'ra"a'i$".s
33
P!r5ase e'ai%.s
34
S'$ re'!r".s
35