Académique Documents
Professionnel Documents
Culture Documents
2012
INTRODU TION
Page 1
2012
a!Pro"ect O#er#iew$
The client uses MS Excel, and maintains their product list, customer list, and prints the Payment On Demand System (Invoice), however it is not possi le them to share the data !rom multiple system in multi user environment, there is lot o! duplicate wor", and chance o! mista"e# $hen the product price are chan%ed they need to update each and every excel !ile# There is no option to !ind and print previous saved Payment On Demand System(Invoice)# There is no security& any ody can access any report and sensitive data, also no reports to !ind out the sales volume, stoc" list, and summary report# This Electronic 'illin% and invoicin% system is used to overcome the entire pro lem which they are !acin% currently, and ma"in% complete atomi(ation o! manual system# illin% and invoicin%
%! Pro"ect Sco&e
)rom an end*user perspective, the Electronic 'illin% and Invoicin% Pro+ect consists o! two !unctional elements, an enhanced searcha le data ase !or customer, products, illin% %eneration system and a report %eneration system# 'stomer( Prod'cts( Billing )eneration -n enhanced atomi(ed system is developed to maintain .ustomer, Product, order, order details data and produce 'ill and Payment On Demand System with !ollowin% !eatures# /The system operator will e a le to -dd, Edit and search the product# -lso the operator can delete the product& update the cost o! the product as per the ri%hts %iven to the operator y the administrator# /'y usin% their own account, sales sta!! will e a le to place orders throu%h the system# In addition, sales sta!! will e a le to apply discounts in accord with the current sales policy# Page 2
2012
/Improved search capa ilities o! product in!ormation will e availa le& It will display all the details o! the particular product with current stoc" 0uantity# /Prices and order in!ormation will e expressi le in international currency and date1time !ormats# /-!ter placin% the order system automatically print the Payment On Demand System with pre printed stationary with all the details# /Searchin% o! previously %enerated Payment On Demand System is also availa le& Operator can search the previously saved Payment On Demand System %enerated uni0ue Payment On Demand System no# /Importin% the old stoc" into the system, it imports the old stoc" !rom prede!ined MS Excel !ile# /Maintain the user master and security !eatures# y system
2012
2 System +nalysis
Page ,
2012
2 System +nalysis
a! Need -or the system The !irst step in system development li!e cycle is the study o! need o! chan%e to improve or enhance an existin% system# -n initial investi%ation on existin% system was carried out# The present system o! illin% is completely manual# Many pro lems were identi!ied durin% the initial study o! the existin% system# E.ISTIN) S/STE0 Durin% analysis, data collection on the various !iles, decision points and transaction handled y the present system# The commonly used tools in system are Data )low Dia%ram, interviews, etc# trainin%, experience and common sense are re0uired !or collection o! relevant in!ormation needed to develop the system# The success o! system depends lar%ely on how clearly the pro lem is de!ined, thorou%hly investi%ated and properly carried out throu%h the choice o! solution# - %ood model should provide not only the mechanisms o! pro lem understandin% accordance with the needs# System analysis can e cate%ori(ed into !our parts# 5# System plannin% and initial investi%ation 6# In!ormation %atherin%# 7# -pplyin% analysis tools !or structured analysis# 8# )easi ility study 9# .ost1 ene!it analysis %!Pro&osed system The draw ac" o! the existin% system is that it is very di!!icult to retrieve data !rom !iles# It is di!!icult to handle the whole system manually and it is less accurate and to "eep the Page 1 ut also the !ramewor" o! the solution# Then the proposed system should e analy(ed thorou%hly in
2012
data in case !iles !or !uture re!erence ecause i! may %et destroyed# Moreover it is very di!!icult to retrieve data# 2edundancy o! data may occur and this may lead to the inconsistency# The manual system is so time* consumin%# The proposed system is very easy to operate# Speed and accuracy are the main advanta%es o! proposed system# There is no redundancy o! data# The data are stored in the computer:s secondary memories li"e hard dis", etc# It can e easily received and used at any time# The proposed system will easily handle all the data and the wor" done y the existin% systems# The proposed systems eliminate the draw ac"s o! the existin% system to a %reat extent and it provides ti%ht security to data# O%"ecti#e This section presents a conceptual overview o! the solution, and then provides an introduction to its re0uirements# Solution Concept The e'illin% and Invoice System consists o!,
'stomer( Prod'cts( Billing )eneration, -utomate the current manual ill %eneration system and maintain the searcha le customer, products data ase and product invoice, maintain the data security, user ri%hts# Re&ort )eneration, - 2eport 3eneration system will e developed !or the user and mana%ement o! e'illin% and Invoicin% System# This MIS system will have oth details and summary type reports !or analysis the sales volume, sales trend, availa le stoc"
Part o! the solution will involve convertin% data !rom Microso!t Excel to the Data ase, system can import existin% customer, product data !rom prede!ined MS Excel, .S4 !ormat# It reduces the data entry wor" and 0uic" implementation o! the system#
Page 2
2012
The !ollowin% dia%ram descri es the proposed solution architecture at a hi%h level#
Page 4
2012
Each sales representative should receive customer and sales data pertinent only to them# The accountant should e a le to enter or update product in!ormation in one inter!ace only, with all necessary product in!ormation ein% received y sales sta!!#
Mana%er must receive his or her customer and appointment data plus detailed and rollup in!ormation !or each sales representative on his or her team# The application should support the capa ility to use multi user environment# The MIS Executive should a le to %enerate all type o! reports as and when re0uired y the mana%ement#
2012
Ena le capture, analysis, and sharin% o! data a out a customer across the company
>se !orecasts to esta lish sales %oals -llow all sta!! to view all contacts, ut allow each contact to e assi%ned to a sales representative
Accountant >pdate product details, includin% price, photo, and description -dd, delete, and update product speci!ications 3enerate stoc" reports and chec" the availa ility, order the item as and when needed# MIS Executive 3enerate 2eports as per re0uirement# Share the data, and convert reports to di!!erent !ormat li"e Text, .S4#
Page 7
2012
-ny chan%e to in!ormation must e re!lected immediately, and the chan%es must e propa%ated to the search en%ine so that employees that per!orm searches see this new in!ormation#
The application should wor" with the existin% communications and networ"in% in!rastructure# The application should deploy with a minimum o! additional operational processes, manual or otherwise#
System Re3'irements
These are additional constraints !rom a system perspective, Previous data o! customer, product details must e imported in the new system# The administrator must e a le to monitor everythin% !rom the IT department# e accessi le y everyone in the company as per the ri%hts
8ardware re3'irement
The !ollowin% is the con!i%uration o! the system used to develop the so!tware,
5# Processor , 6# Memory ,
7# )re0uency , 6#53;( 8# ;ard Dis" , 9# Cey oard , B# Mouse , 8? 3' -ny Type -ny Type Page 10
2012
Page 11
2012
Easy to create, a ility to print and select printer, can export report in di!!erent !ormat includin% MS Excel, easily inte%rate with 4isual 'asic B#
9ront End
:hy ;B2< 4'B is uilt on the $indows Server System to ta"e ma+or advanta%e o! the OS and which comes with a host o! di!!erent servers which allows !or uildin%, deployin%, mana%in% and maintainin% $indows 'ased solutions# The $indows Server System is desi%ned with per!ormance as priority and it provides scala ility, relia ility# The advanta%e o! 4' includes 2apid -pplication Development (2-D) Support# Power!ul $indows* ased -pplications Simpli!ied Deployment Power!ul, )lexi le, Simpli!ied Data -ccess Improved .odin% Direct -ccess to the OS Plat!orm O +ect*Oriented .onstructs .OM Interopera ility
;ISU+= B+SI
Page 12
2012
desi%n user*!riendly pac"a%es, run on Microso!t $indows 6??? and AP# 4isual asic is very easy to use# Many o! the !eatures that is di!!icult to pro%ram in other lan%ua%es practically easy in 4isual 'asic# :hat ;is'al Basic can do< The 4isual 'asic pro%rammin% lan%ua%e is not uni0ue to 4isual 'asic# The 4isual 'asic pro%rammin% system, -pplications Edition included in Microso!t Excel, Microso!t -ccess, and many other $indows applications uses the same lan%ua%e# The 4isual 'asic Scriptin% Edition (4'Script) is a widely used scriptin% lan%ua%e and a su set o! the 4isual 'asic lan%ua%e# The investment you ma"e in learnin% 4isual 'asic will carry over to these other areas# $hether your %oal is to create a small utility !or yoursel! or your wor" %roup, a lar%e enterprise*wide system, or even distri uted applications spannin% the %lo e via the Internet, 4isual 'asic has the tools you need# Data access !eatures allow you to create data ases, !ront*end applications, and scala le server*side components !or most popular data ase !ormats, includin% Microso!t SD< Server and other enterprise*level data ases# -ctiveAE technolo%ies allow you to use the !unctionality provided y other applications, such as Microso!t $ord word processor, Microso!t Excel spreadsheet, and other $indows applications# Fou can even automate applications and o +ects created usin% the Pro!essional or Enterprise editions o! 4isual 'asic# Internet capa ilities ma"e it easy to provide access to documents and applications across the Internet or intranet !rom within your application, or to create Internet server applications# Four !inished application is a true #exe !ile that uses a 4isual 'asic 4irtual Machine that you can !reely distri ute#
Page 1*
2012
Microso!tG -ctiveAG Data O +ects (-DO) ena le your client applications to access and manipulate data in a data ase server throu%h any O<E D' provider# -DO ena les you to write an application to access and manipulate data in a data ase server throu%h an O<E D' provider# -DO=s primary uildin% client1server and $e * ased applications# -DO also !eatures 2emote Data Service (2DS), y which you can move data !rom a server to a client application or $e pa%e, manipulate the data on the client, and return updates to the server in a sin%le round trip# Previously released as Microso!t 2emote Data Service 5#9, 2DS has een com ined with the -DO pro%rammin% model to simpli!y client*side data remotin%# -DO supports "ey !eatures !or uildin% client1server and $e * ased applications# Its primary ene!its are ease o! use, hi%h speed, low memory overhead, and a small dis" !ootprint H Incorporate standard windows user*inter!ace elements such as windows, menus, uttons, scroll ars, and so on# H .reate, read and write to text, data ase and inary !iles# H 2ead $indows 'itmaps, Meta!iles and P. Paint 'rush documents# H -ddress data ase in !ormats such as SD<, Microso!t access and others# Bac> End :hy 0S +ccess< MS -ccess is des"top 2DMS support small application with all !eatures li"e relational 0uery, di!!erent data types, +oins, and 0uery# Includes Easy to use and easy to deployment# Inte%ration with $indows OS Scala ility Import and Export o! data in all ma+or data ase system# .entrali(ed Mana%ement 2elia ility -utomatin% Tas"s Page 1, ene!its are ease o! use, hi%h speed, low memory overhead, and a small dis" !ootprint# -DO supports "ey !eatures !or
2012
2012
!or the same data it also en!orces data inte%rity across all client applications and controls data ase access the other security re0uirements# -dvanta%es o! Microso!t -ccess a# $ith Microso!t -ccess, the avera%e user can wor" with data ases without ein% hi%hly s"illed in the !ield# # Microso!t -ccess is a data ase so!tware pro%ram that ma"es manipulatin% data mana%ea le !or users o! many s"ill levels c# )lexi ility is the "ey with -ccess# Cnowin% that not everyone is s"illed at ma"in% data ases, Microso!t created asic templates that a user can %o and use immediately# d# -ccess uses many terms that may e new to you, ut are necessary to understand in order to complete the wor"# - Ldata aseL is a way to or%ani(e and store in!ormation a out people, places and thin%s#
rystal Re&ort 6?1 5# 2apid report development since the desi%ner inter!ace would ease the codin%
wor" !or the pro%rammer# 6# .an extend it to complicated reports with interactive charts and enhance the understandin% o! the usiness model 7# Exposes a report o +ect model, can interact with other controls on the -SP#KET $e !orm 8# .an pro%rammatically export the reports into widely used !ormats li"e #pd!, #doc, #xls, #html and #rt! # 9) Maximi(e IT e!!iciency y reusin% report components includin% itmaps, custom !unctions, and SD< commands across multiple reports# B) Trans!orm data !rom almost any data source*includin% AM<, relational, OD'. and enterprise*into interactive, power!ul content# Page 12
2012
M) <et end users access and interact with reports via portals, wireless devices and Microso!t O!!ice documents*without extra IT overhead# @) 2apidly inte%rate rich, dynamic content into $indows and we applications# J) Ta"e advanta%e o! a new, power!ul multi*threaded 2eport Server# )lexi le SDCs !or inte%ration into Iava, #KET or .OM applications# .ontrol end user report interaction, creation, and modi!ication at runtime
Page 14
2012
S/STE0 DESI)N
Page 16
2012
Page 17
2012
Page 20
2012
Payment On Demand System With Electronic Billing System Physical O !ect Model
Page 21
2012
Page 22
2012
Page 2*
2012
Page 2,
2012
Page 21
2012
Ta%le$ %ill Owner$ Destination DB name$ N'm%er o- col'mns$ N'm%er o- indeAes$ N'm%er o- -oreign >eys$ EAtended attri%'tes$ On9ile)ro'& l'stered PB 9ield Name sno Payment On Demand Systemno canme Payment On Demand P2IM-2F Fes Data Ty&e Int nvarchar(B?) onstraints K><< Kot allowed K><< Kot allowed K><< Kot allowed K><< Kot Page 22 d o e ill 59 7 ?
nvarchar(B?) Datetime
2012
Ta%le $ %ill@details Owner$ Destination DB name$ N'm%er o- col'mns$ N'm%er o- indeAes$ d o e ill B 7 Page 24
2012
9ield Name sno Bill@sno Prod@sno 3ty rate amt Int Int
Data Ty&e
onstraints Kot allowed Kot allowed Kot allowed Kot allowed Kot allowed Kot allowed
$a le% Company&master Owner$ Destination DB name$ N'm%er o- col'mns$ N'm%er o- indeAes$ N'm%er o- -oreign >eys$ EAtended attri%'tes$ On9ile)ro'& l'stered PB P2IM-2F Fes d o e ill M 6 ?
Page 26
2012
Ta%le $ 'ser@master Owner$ Destination DB name$ N'm%er o- col'mns$ N'm%er o- indeAes$ N'm%er o- -oreign >eys$ EAtended attri%'tes$ On9ile)ro'& l'stered PB P2IM-2F Fes d o e ill 7 6 ?
2012
Ta%le descri&tion $a le % product&master Owner$ Destination DB name$ N'm%er o- col'mns$ N'm%er o- indeAes$ N'm%er o- -oreign >eys$ EAtended attri%'tes$ On9ile)ro'& l'stered PB P2IM-2F Fes d o e ill 9 6 ?
onstraints Kull Kot allowed Kull Kot allowed Kull Kot allowed Kull Kot allowed Kull Kot allowed Page *0
2012
Ta%le $ %ill Owner$ Destination DB name$ N'm%er o- col'mns$ N'm%er o- indeAes$ N'm%er o- -oreign >eys$ EAtended attri%'tes$ On9ile)ro'& l'stered PB P2IM-2F Fes d o e ill 59 7 ?
Page *1
9ield Data Ty&e onstraints Name Payment On Demand System with Electronic Billing sno Payment On Demand Systemn o canme Payment On Demand System@ date location chalan@n o c'stome r@name 'stome r@addres s1 'stome r@addres s2 Total@am t disco'nt +mt@wor ds Paid@ty& e he3'e@ no Entry@da te Int nvarchar(B?) Kull Kot allowed Kull Kot allowed
2012
nvarchar(B?) Datetime
Kull Kot allowed Kull Kot allowed Kull Kot allowed Kull Kot allowed Kull -llowed
nvarchar(5??)
Kull Kot allowed Kull Kot allowed Kull Kot allowed Kull Kot allowed Kull -llowed Page *2 Kull Kot allowed
2012
Page **
2012
Page *,
2012
Page *1
2012
Page *2
2012
Page *4
2012
Page *6
2012
Page *7
2012
Page ,0
2012
9rmUtlity (To -ccess di!!erent utility pro%ram li"e compact, ac"up, chan%e password etc#)
Page ,1
2012
)rm.ompact -nd 2epair Data ase (To shrin" and compact main data ase data#md #)
Page ,2
2012
Page ,*
2012
9rm hangePassword
(.han%e password !or currently lo%%ed user)
Page ,,
2012
ode
FrmLogin
(Module to Authenticate User) Option Explicit Dim Rs As New ADODB.Recordset Private Sub Command1 Clic!"# $%%% c&ec! w&eat&er user name and password are blan! $%%% i' its is blan warn user to enter (' )xt*serName.)ext + ,, Or )xtPassword.)ext + ,, )&en -s.Box",Enter user name and password ...,/ vbExclamation# )xt*serName.Set0ocus"# Exit Sub End ('
$%%% c&ec! 'or entered compan1 $%%% 2uer1 to database and i' no record 'ound warn user to select compan1 'rom t&e list. (' Rs.State + adStateOpen )&en Rs.Close"# Rs.Open",select 3 'rom compan1 master w&ere compan1 name+$, 4 CmbCompan1Name.)ext 4 ,$,/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# (' Rs.RecordCount % 6 )&en Compan1Name + CmbCompan1Name.)ext Else -s.Box",Select compan1 name 'rom t&e list,/ vbExclamation# CmbCompan1Name.Set0ocus"# Exit Sub End ('
Page ,1
2012
$%%% i' no record 'ound c&ec! warn user 'or enter valid user namne and password $%%% i' record 'ound store user nmae/ user t1pe in .lobal variable 'or 'uture use. (' Rs.State + adStateOpen )&en Rs.Close"# Rs.Open",select 3 'rom user master w&ere *SER name +$, 4 )xt*serName.)ext 4 ,$ and user password +$, 4 )xtPassword 4 ,$,/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# (' Rs.RecordCount % 6 )&en C&ec!5o.in + )rue *serName + (('"(sNull"Rs",*SER name,#.7alue# + )rue/ ,NA,/ Rs",*SER name,#.7alue# *ser)1pe + (('"(sNull"Rs",user t1pe,#.7alue# + )rue/ ,NA,/ Rs",user t1pe,#.7alue#
*nload"-e#
Else -s.Box",(nvalid *ser Name and Password ... ,/ vbExclamation/ ,5o.in Error ,# )xtPassword.)ext + ,, )xt*serName.Set0ocus"# Exit Sub End ('
End Sub
Page ,2
2012
Private Sub 0orm 5oad"# $%%% open t&e .lobal connection (' Cn.State + 1 )&en Cn.Close"# OpenCon"# $%%% center t&e 'orm -e.-ove "Screen.9idt& : 9idt&# ; 8/ "Screen.<ei.&t : <ei.&t# ; 8
$%%% 'ill t&e combo box wit& all compan1 name 'rom compan1 master (' Rs.State + adStateOpen )&en Rs.Close"# Rs.Open",select 3 'rom compan1 master ,/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# CmbCompan1Name.Clear"# (' Rs.RecordCount % 6 )&en 9&ile Rs.EO0 + 0alse CmbCompan1Name.Add(tem"Rs",compan1 name,## Rs.-oveNext"# End 9&ile End (' (' Rs.State + adStateOpen )&en Rs.Close"# End Sub
Page ,4
2012
Frm ain
(Give user access to different module) Option Explicit
Private Sub -D(0orm Activate"# $%%% s&ow t&e lo.in 'orm as modulas 'or 'irst time $%%% w&en main 'orm activate 'irst time (' C&ec!5o.in + 0alse )&en 0rm5o.in.S&ow"1# End (' 5blCompan1Name + Compan1Name End Sub
Private Sub -D(0orm Resi?e"# $%%% reposition t&e picturebox as per 'orm si?e $%%% to displa1 t&e selected compan1 name Picture1.5e't + -e.9idt& : Picture1.9idt& : @66 End Sub
Private Sub )oolbar1 ButtonClic!"B17al Button As -SComctl5ib.Button# $%%% load appropriate 'orm as per user clic! on toolbar buttons $%%% in desi.n time we set !e1 value 'or eac& toolbar button (' Button.Ae1 + ,exit, )&en End Else(' Button.Ae1 + ,product master, )&en
Page ,6
2012
End Sub
FrmProd!ct"
(Maintain Product master) Option Explicit $%% decalre 'orm level valriable Dim Rs As New ADODB.Recordset Dim AddEdit As Strin.
Private Sub CmbProduct)1pe C&an.e"# $%%% as per product t1pe 'ill t&e product list Dim =rStr As Strin. (' CmbProduct)1pe.)ext + ,A55, )&en =rStr + ,select prod sub t1pe 'rom product master order b1 prod sub t1pe, Else =rStr + ,select prod sub t1pe 'rom product master w&ere prod t1pe+$, 4 CmbProduct)1pe.)ext 4 ,$ order b1 prod sub t1pe,
Page ,7
2012
Private Sub CmbProduct)1pe Clic!"# $%%% call c&an.e event CmbProduct)1pe C&an.e"# End Sub
Private Sub CmdCancel Clic!"# $%%% cancel update ED"0alse/ )rue# Displa1Record"# End Sub
Page 10
2012
Private Sub CmdEdit Clic!"# $%%% set 'la. to edit ED")rue/ 0alse# AddEdit + ,ED(), End Sub
Private Sub CmdNew Clic!"# $%%% set t&e 'la. to add $%%% claer text box 5blSr.Caption + 6 Cmb)1pe.)ext + ,, )xtName.)ext + ,, )xtRate.)ext + 6 C&!Active.7alue + 1
ED")rue/ 0alse#
Private Sub CmdSave Clic!"# $%%% validate t&e entr1 (' )rim"Cmb)1pe.)ext# + ,, )&en
Page 11
2012
-s.Box",Don$t use double 2oute in product name.,/ vbExclamation# )xtName.Set0ocus"# Exit Sub End (' (' (sNumeric")xtRate.)ext# + 0alse )&en -s.Box",Enter rate/ numeric onl1,/ vbExclamation# )xtRate.Set0ocus"# Exit Sub End (' $%%% c&ec! t&e 'la. 'rom add;edit (' AddEdit + ,ADD, )&en (' Rs.State + adStateOpen )&en Rs.Close"# Rs.Open",select max"sno# C1 'rom product master ,/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# Dim sno As (nte.er sno + Rs"6# (' Rs.State + adStateOpen )&en Rs.Close"# Rs.Open",select 3 'rom product master w&ere 1+8,/ Cn/ adOpenD1namic/ ad5oc!Optimistic#
Page 12
2012
$%%% dispal1 and update lists Dim OldP)1pe As Strin. OldP)1pe + Cmb)1pe.)ext Dim OldPName As Strin. OldPName + )xtName.)ext
Cmb)1pe.Clear"#
Page 1*
2012
Rs.Open",select distinct prod t1pe 'rom product master order b1 prod t1pe,/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# 9&ile Rs.EO0 + 0alse CmbProduct)1pe.Add(tem"Rs",prod t1pe,## Cmb)1pe.Add(tem"Rs",prod t1pe,## Rs.-oveNext"# End 9&ile $%%% 'ill t&e product list a.ain wit& updated;inserted records Dim =rStr As Strin. (' CmbProduct)1pe.)ext + ,A55, )&en =rStr + ,select prod sub t1pe 'rom product master order b1 prod sub t1pe, Else =rStr + ,select prod sub t1pe 'rom product master w&ere prod t1pe+$, 4 CmbProduct)1pe.)ext 4 ,$ order b1 prod sub t1pe, End (' 5stProductSub)1pe.Clear"# (' Rs.State + adStateOpen )&en Rs.Close"# Rs.Open"=rStr/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# 9&ile Rs.EO0 + 0alse 5stProductSub)1pe.Add(tem"Rs",prod sub t1pe,## Rs.-oveNext"# End 9&ile $%%% s&ow t&e 'irst record (' 5stProductSub)1pe.5istCount % 6 )&en
Page 1,
2012
End Sub
Private Sub 0orm 5oad"# $%%% center t&e 'orm -e.-ove "Screen.9idt& : 9idt&# ; 8/ "Screen.<ei.&t : <ei.&t# ; 8 $%%% reset connection OpenCon"#
$%%% 'ill t&e product t1pe CmbProduct)1pe.Clear"# CmbProduct)1pe.Add(tem",A55,# CmbProduct)1pe.)ext + ,A55, (' Rs.State + adStateOpen )&en Rs.Close"# Rs.Open",select distinct prod t1pe 'rom product master order b1 prod t1pe,/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# 9&ile Rs.EO0 + 0alse CmbProduct)1pe.Add(tem"Rs",prod t1pe,## Cmb)1pe.Add(tem"Rs",prod t1pe,##
Page 11
2012
$%%% 'ill t&e product sub t1pe Dim =rStr As Strin. (' CmbProduct)1pe.)ext + ,A55, )&en =rStr + ,select prod sub t1pe 'rom product master order b1 prod sub t1pe, Else =rStr + ,select prod sub t1pe 'rom product master w&ere prod t1pe+$, 4 CmbProduct)1pe.)ext 4 ,$ order b1 prod sub t1pe, End (' 5stProductSub)1pe.Clear"# (' Rs.State + adStateOpen )&en Rs.Close"# Rs.Open"=rStr/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# 9&ile Rs.EO0 + 0alse 5stProductSub)1pe.Add(tem"Rs",prod sub t1pe,## Rs.-oveNext"# End 9&ile $%%% select t&e 'irst record (' 5stProductSub)1pe.5istCount % 6 )&en 5stProductSub)1pe.5ist(ndex + 6 Displa1Record"# End (' End Sub Private Sub Displa1Record"# $%%% displa1 record as per selected product name (' Rs.State + adStateOpen )&en Rs.Close"#
Page 12
2012
Rs.Open",select 3 'rom product master w&ere prod sub t1pe+, 4 C&r"B@# 4 5stProductSub)1pe.)ext 4 C&r"B@#/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# (' Rs.RecordCount % 6 )&en 5blSr.Caption + Rs",sno,# Cmb)1pe.)ext + Rs",prod t1pe,# )xtName.)ext + Rs",prod sub t1pe,# )xtRate.)ext + Rs",rate,# C&!Active.7alue + Rs",is active,# Else 5blSr.Caption + ,, Cmb)1pe.)ext + ,, )xtName.)ext + ,, )xtRate.)ext + ,, C&!Active.7alue + 1
End (' End Sub Private Sub ED"B17al )1 As Boolean/ B17al )8 As Boolean# $%%% enable;disable button CmdSave.7isible + )1 CmdCancel.7isible + )1
Cmb)1pe.5oc!ed + )8
Page 14
2012
Private Sub )xtName Ae1Down"B17al Ae1Code As (nte.er/ B17al S&i't As (nte.er# $%%% SE5EC) 0RO- 5(S) (' CmbProduct)1pe.)ext D% ,A55, )&en CmbProduct)1pe.)ext + ,A55, End (' (' Ae1Code + vbAe1Down )&en (' 5stProductSub)1pe.5ist(ndex D 5stProductSub)1pe.5istCount : 1 )&en 5stProductSub)1pe.5ist(ndex + 5stProductSub)1pe.5ist(ndex C 1 End (' End (' (' Ae1Code + vbAe1*p )&en (' 5stProductSub)1pe.5ist(ndex % 6 )&en 5stProductSub)1pe.5ist(ndex + 5stProductSub)1pe.5ist(ndex : 1 End (' End (' End Sub
Page 16
2012
Dim AddEdit As Strin. Dim Rs As New ADODB.Recordset Dim sno As (nte.er Dim SavePrint As Strin.
Private Sub CmdClose Clic!"# $%%% c&ec! t&e caption o' t&e button $%%% close t&e 'orm or cancel t&e save (' CmdClose.Caption + ,4Close, )&en *nload"-e# Else DE")rue/ 0alse# End ('
End Sub
Private Sub CmdDelete Clic!"# $%%% con'irm 'or deletion o' bill $%%% i' user select EES delete t&e record 'rom bill and bill details $%%% clear t&e seleted data 'rom t&e screen 'or deleted bill
Page 17
2012
(' -s.Box",Record will delete permantle1 F,/ vbEesNo C vbCritical# + vbEes )&en Cn.Execute",delete 'rom bill details w&ere bill sno +, 4 sno# Cn.Execute",delete 'rom bill w&ere sno +, 4 sno# AddEdit + ,,
CmdGetBill.Caption + ,40ind, CmdDelete.Enabled + 0alse Call Clear0ield"# (' )xt(nvoiceNo.Enabled + )rue )&en )xt(nvoiceNo.Set0ocus"# End (' End ('
End Sub
Private Sub CmdGetBill Clic!"# $%%% 'ind t&e bill details $%%% 'ind t&e bill b1 invoice no AddEdit + ,, (' CmdGetBill.Caption + ,4Get Bill, )&en )xt(nvoiceNo.Enabled + )rue
Page 20
2012
Else Dim RS1 As New ADODB.Recordset RS1.Open",select 3 'rom bill w&ere invoice no +, 4 7al")xt(nvoiceNo.)ext# 4 , and cname+$, 4 Compan1Name 4 ,$,/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# (' RS1.RecordCount % 6 )&en $%%% s&ow details 'rom bill table DtDate.7alue + RS1",invoice date,# )xt5ocation.)ext + RS1",location,# )xtC&alanNo.)ext + RS1",c&alan no,# )xtCompan1.)ext + RS1",customer name,# )xtAddress1.)ext + RS1",customer address1,# )xtAddress8.)ext + RS1",customer address8,# 5bl)otalAmount + RS1",total amt,# 5blRs9ord.Caption + RS1",amt word,# )xtSerial.)ext + RS1",serial,#
bill details
Dim Rs8 As New ADODB.Recordset (' Rs8.State + adStateOpen )&en Rs8.Close"# Dim RsB As New ADODB.Recordset Rs8.Open",select 3 'rom bill details w&ere bill sno+, 4 RS1",sno,# 4 , order b1 sno ,/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# (' Rs8.RecordCount % 6 )&en Dim i As (nte.er Rs8.-ove0irst"# 0or i + 6 )o Rs8.RecordCount : 1
Page 21
2012
RsB.Open",select 3 'rom product master w&ere sno +, 4 Rs8",prod sno,#/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# (' RsB.RecordCount % 6 )&en -'1.)ext-atrix"i C 1/ 1# + RsB",prod sub t1pe,# End (' (' RsB.State + adStateOpen )&en RsB.Close"# -'1.)ext-atrix"i C 1/ 8# + Rs8",2t1,# -'1.)ext-atrix"i C 1/ B# + Rs8",rate,# -'1.)ext-atrix"i C 1/ @# + Rs8",amt,#
CmdGetBill.Caption + ,4Get Bill, CmdDelete.Enabled + )rue cmbval.7isible + 0alse CmdPrint.Enabled + )rue CmdSave.Enabled + )rue
$%%% loca! t&e buttons -'1.Enabled + )rue cmbval.Enabled + )rue )H)7A5.Enabled + )rue )xtCompan1.5oc!ed + 0alse )xtAddress1.5oc!ed + 0alse
Page 22
2012
-'1.Enabled + 0alse cmbval.Enabled + 0alse )H)7A5.Enabled + 0alse )xtCompan1.5oc!ed + )rue )xtAddress1.5oc!ed + )rue )xtAddress8.5oc!ed + )rue DtDate.Enabled + 0alse )xt5ocation.5oc!ed + )rue )xtC&alanNo.5oc!ed + )rue
End (' (' RS1.State + adStateOpen )&en RS1.Close"# End (' End Sub
Page 2*
2012
Private Sub CmdNew Clic!"# $%%% claer t&e screen 'or enterin. data 'or new bill $%%% enable;disable buttons DE"0alse/ )rue#
AddEdit + ,ADD,
Call Clear0ield"#
$%%% .et t&e new s1stem id 'rom bill (' Rs.State + adStateOpen )&en Rs.Close"# Rs.Open",select max"sno# ad5oc!ReadOnl1# (' Rs.RecordCount % 6 )&en sno + (('"(sNull"Rs"6## + )rue/ 6/ Rs"6## C 1 End (' (' Rs.State + adStateOpen )&en Rs.Close"# )xtCompan1.Set0ocus"# End Sub 'rom bill ,/ Cn/ adOpenStatic/
Private Sub CmdPrint Clic!"# $NO)E I it is not t&e ri.&t solution to call cr1stal report b1 temp usin. temp table $some time it is a .ood practice 'or complecated databse relation table $)&is ma1 not run properl1 in multi user environment $Better approc& is passin. value b1 Selection0ormula in cr1stal report $but an1wa1 it is a wor!in. solution
Page 2,
2012
$%%% insert 'rom bill/bill details to temp bill/ teemp bill details
Dim RS1 As New ADODB.Recordset (' RS1.State + 1 )&en RS1.Close"# RS1.Open",select sno 'rom bill w&ere invoice no+, 4 7al")xt(nvoiceNo.)ext# 4 , and cname +$, 4 Compan1Name 4 ,$,/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# (' RS1.RecordCount % 6 )&en Cn.Execute",delete 'rom temp bill details,# Cn.Execute",delete 'rom temp bill,# Cn.Execute",insert into temp bill select 3 'rom bill w&ere sno+, 4 RS1",sno,## Cn.Execute",insert into temp bill details select 3 'rom bill details w&ere bill sno+, 4 RS1",sno,## Call OpenCon"#
$%%% call cr1stal report Cr1.9indowState + crpt-aximi?ed Cr1.Report0ileName + App.Pat& 4 ,JreportsJbill.rpt, Cr1.Data0iles"6# + App.Pat& 4 ,Jdata.mdb, Cr1.Action + 1 Else -s.Box",No Bill 'ound select;enter invoice no 'or print,/ vbExclamation# Exit Sub End ('
Page 21
2012
End Sub
Private Sub CmdSave Clic!"# $%%% validation $%%% c&ec! t&e re2uired 'ield (' )rim")xtCompan1.)ext# + ,, )&en -s.Box",Enter Compan1 Name...,/ vbExclamation# )xtCompan1.Set0ocus"# Exit Sub End ('
(' (sNumeric")xt(nvoiceNo.)ext# + 0alse )&en -s.Box",Enter onl1 Numeric (nvoice No...,/ vbExclamation# )xt(nvoiceNo.Set0ocus"# Exit Sub End ('
(' )rim")xt5ocation.)ext# + ,, )&en -s.Box",Enter 5ocation...,/ vbExclamation# )xt5ocation.Set0ocus"# Exit Sub End ('
Page 22
2012
$%%% create transaction 'or insert bill and bil details Cn.Be.in)rans"# Dim RS1 As New ADODB.Recordset
$%%% c&ec! w&eat&er we need to insert or edit t&e record $%%% i' it is edit/ t&en delete t&e old bill and insert new record (' AddEdit D% ,ADD, )&en (' RS1.State + adStateOpen )&en RS1.Close"# RS1.Open",select 3 'rom bill w&ere invoice no +, 4 7al")xt(nvoiceNo.)ext# 4 , and cname+$, 4 Compan1Name 4 ,$,/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# (' RS1.RecordCount % 6 )&en sno + RS1",sno,# End (' (' RS1.State + adStateOpen )&en RS1.Close"# Cn.Execute",delete 'rom bill details w&ere bill sno +, 4 sno# Cn.Execute",delete 'rom bill w&ere sno +, 4 sno# AddEdit + ,,
Page 24
2012
$%%% c&ec! 'or product master $%%% c&ec! t&e .rid $%%% w&eat&er t&ere is a product or not $%%% w&eater t&e1 enter an1 2uantit1 or not $%%% w&eate&r t&ere is an1 price or not $%%% i' an1 t&in. .oes wron. s&ow messa.e Dim cc As (nte.er Dim i As (nte.er 0or i + 1 )o -'1.Rows : 1 Dim C& As Boolean C& + 0alse (' )rim"-'1.)ext-atrix"i/ 1## + ,, )&en C& + )rue End (' (' RS1.State + adStateOpen )&en RS1.Close"# RS1.Open",select sno 'rom product master w&ere prod sub t1pe +, 4 C&r"B@# 4 -'1.)ext-atrix"i/ 1# 4 C&r"B@#/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# (' RS1.RecordCount D+ 6 )&en
C& + )rue End (' (' RS1.State + adStateOpen )&en RS1.Close"# (' 7al"-'1.)ext-atrix"i/ 8## + 6 )&en C& + )rue End (' (' 7al"-'1.)ext-atrix"i/ B## + 6 )&en
Page 26
2012
$%%% c&ec! 'or duplicate invoice no (' Rs.State + adStateOpen )&en Rs.Close"# Rs.Open",select 3 'rom bill w&ere invoice no+, 4 7al")xt(nvoiceNo.)ext#/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# (' Rs.RecordCount % 6 )&en -s.Box",(nvalid (nvoice No cannot save..,/ vbExclamation# )xt(nvoiceNo.Set0ocus"# Exit Sub End (' (' Rs.State + adStateOpen )&en Rs.Close"#
table
Page 27
2012
$%%% vaildate eac& row be'ore save in details Dim 5astSno As (nte.er Dim ProdSno As (nte.er Dim Rs8 As New ADODB.Recordset (' Rs8.State + 1 )&en Rs8.Close"# Rs8.Open",select max"sno# 'rom bill details,/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# (' Rs8.RecordCount % 6 )&en
Page 40
2012
C& + 0alse (' )rim"-'1.)ext-atrix"i/ 1## + ,, )&en C& + )rue End (' (' RS1.State + adStateOpen )&en RS1.Close"# RS1.Open",select sno 'rom product master w&ere prod sub t1pe +, 4 C&r"B@# 4 -'1.)ext-atrix"i/ 1# 4 C&r"B@#/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# (' RS1.RecordCount % 6 )&en ProdSno + RS1"6# Else C& + )rue End (' (' RS1.State + adStateOpen )&en RS1.Close"# (' 7al"-'1.)ext-atrix"i/ 8## + 6 )&en C& + )rue End (' (' 7al"-'1.)ext-atrix"i/ B## + 6 )&en C& + )rue End (' (' 7al"-'1.)ext-atrix"i/ @## + 6 )&en C& + )rue End (' (' C& + 0alse )&en
Page 41
2012
$%%% insert in bill details 'or eac& validated .rid row (' Rs8.State + 1 )&en Rs8.Close"# Rs8.Open",select 3 'rom bill details w&ere 1+8,/ Cn/ adOpenD1namic/ ad5oc!Optimistic# Rs8.AddNew"# Rs8",sno,# + 5astSno Rs8",bill sno,# + sno Rs8",prod sno,# + ProdSno Rs8",2t1,# + 7al"-'1.)ext-atrix"i/ 8## Rs8",rate,# + 7al"-'1.)ext-atrix"i/ B## Rs8",amt,# + 7al"-'1.)ext-atrix"i/ @## Rs8.*pdate"# (' Rs8.State + 1 )&en Rs8.Close"# 5astSno + 5astSno C 1 End (' Next
$%%% commit t&e transaction Cn.Commit)rans"# -s.Box",Bill Saved,/ vb(n'ormation# (' C&!Print.7alue + 1 )&en $%%% call t&e report 'or print o' t&e saved bill CmdPrint Clic!"# End (' $%%% prepare 'or new bill entr1 AddEdit + ,, Call Clear0ield"#
Page 42
2012
End Sub
Private Sub DtDate Ae1Down"B17al Ae1Code As (nte.er/ B17al S&i't As (nte.er# $%%% move t&e cursor to new 'ield (' Ae1Code + 1B )&en SendAe1s",KtabL,# End (' End Sub
Private Sub DtDate Ae1Press"B17al Ae1Ascii As (nte.er# $%%% move t&e cursor to new 'ield (' Ae1Ascii + 1B )&en SendAe1s",KtabL,# End (' End Sub
Private Sub 0orm 5oad"# $%%% cnter t&e 'orm -e.5e't + "Screen.9idt& : -e.9idt&# ; 8 -e.)op + "Screen.<ei.&t : -e.<ei.&t# ; 8
Page 4*
2012
$%%% clear t&e 'orm 'or new bill entr1 Call Clear0ield"#
$%%% load last status 'or bill print a'ter saved Dim C&!7 As (nte.er C&!7 + 7al"GetSettin.",bills1stem,/ ,print,/ ,c&ec!print,/ ,1,## C&!Print.7alue + C&!7
$%%% load clent name 'rom t&e table Rs.Open",select client name 'rom client master w&ere client name is not null order b1 client name,/ Cn/ adOpenStatic/ ad5oc!ReadOnl1#
Picture1.7isible + )rue End Sub Private Sub DE"B17al )1 As Boolean/ B17al )8 As Boolean#
Page 4,
2012
)H)7A5.Enabled + )8 cmbval.Enabled + )8 -'1.Enabled + )8 (' )1 + )rue )&en CmdClose.Caption + ,4Close, Else CmdClose.Caption + ,4Cancel, End ('
)xtCompan1.5oc!ed + )1 )xtAddress1.5oc!ed + )1 )xtAddress8.5oc!ed + )1 DtDate.Enabled + )8 )xt5ocation.5oc!ed + )1 )xtC&alanNo.5oc!ed + )1 )xt(nvoiceNo.Bac!Color + vb9&ite CmdDelete.Enabled + 0alse End Sub
Private Sub Clear0ield"# $%%% clear t&e 'ields )xtCompan1.)ext + ,, )xtAddress1.)ext + ,, )xtAddress8.)ext + ,, )xt(nvoiceNo.)ext + ,,
Page 41
2012
$%%% 'or .rid edit Call set &eadin."# Call move textbox"# End Sub
$%%% save last status 'or bill print a'ter saved in t&e re.istr1
(' C&!Print.7alue + 1 )&en SaveSettin.",bills1stem,/ ,print,/ ,c&ec!print,/ ,1,# Else SaveSettin.",bills1stem,/ ,print,/ ,c&ec!print,/ ,6,# End (' End Sub
Private Sub )xtAddress1 Ae1Press"B17al Ae1Ascii As (nte.er# $%%% move t&e 'ocus to next control (' Ae1Ascii + 1B )&en SendAe1s",KtabL,#
Page 42
2012
Private Sub )xtAddress8 Ae1Press"B17al Ae1Ascii As (nte.er# $%%% move t&e 'ocus to next control (' Ae1Ascii + 1B )&en SendAe1s",KtabL,# End (' End Sub
Private Sub )xtC&alanNo Ae1Press"B17al Ae1Ascii As (nte.er# $%%% move t&e 'ocus to next control
Private Sub )xtCompan1 Got0ocus"# $%%% ma!e listbox as editable textbox )xtCompan1.<ei.&t + 1686 Picture1.7isible + 0alse End Sub
Private Sub )xtCompan1 Ae1Down"B17al Ae1Code As (nte.er/ B17al S&i't As (nte.er# $%%% s&ow t&e address o' t&e seleted compan1 Dim RS1 As New ADODB.Recordset
Page 44
2012
)xtAddress1.)ext + (('"(sNull"RS1",address1,## + )rue/ ,,/ RS1",address1,## )xtAddress8.)ext + (('"(sNull"RS1",address8,## + )rue/ ,,/ RS1",address8,## Else )xtAddress1.)ext + ,, )xtAddress8.)ext + ,, End (' (' RS1.State + adStateOpen )&en RS1.Close"# End Sub
Private Sub )xtCompan1 Ae1Press"B17al Ae1Ascii As (nte.er# $%%% move t&e 'ocus to next control
Private Sub )xtCompan1 5ost0ocus"# $%%% move t&e 'ocus to next control
Page 46
2012
Private Sub )xt(nvoiceNo Ae1Down"B17al Ae1Code As (nte.er/ B17al S&i't As (nte.er# $%%% call .etbill b1 enter !e1 in invoice no text box (' Ae1Code + 1B And CmdGetBill.Caption + ,40ind, )&en CmdGetBill Clic!"# End ('
End Sub
Private Sub )xt5ocation Ae1Press"B17al Ae1Ascii As (nte.er# $%%% move t&e 'ocus to next control (' Ae1Ascii + 1B )&en SendAe1s",KtabL,# End (' End Sub
Private Sub )xtSerial Ae1Press"B17al Ae1Ascii As (nte.er# $%%% move t&e 'ocus to next control (' Ae1Ascii + 1B )&en SendAe1s",KtabL,# End (' End Sub
Private Sub )H)7A5 Ae1Press"B17al Ae1Ascii As (nte.er# $%%% ma!e 'lex .ird editable move t& textbox in .id cell 'or enterin. value $%%% c&ec! w&eat&e we press enter !e1 $%%% i' 1es..move t&e control to next .rod
Page 47
2012
(' Ae1Ascii + 1B And -'1.Col + 8 )&en (' (sNumeric")H)7A5.)ext# + 0alse )&en Ae1Ascii + 6 Exit Sub End (' -'1.)ext + )H)7A5.)ext $%%% s&ow total -'1.)ext-atrix"-'1.Row/ -'1.Col C 8# + 7al"-'1.)ext-atrix"-'1.Row/ -'1.Col C 1## 3 )H)7A5.)ext Dim x As (nte.er Dim )1 As Double 0or x + 1 )o -'1.Rows : 1 )1 + )1 C 7al"-'1.)ext-atrix"x/ @## Next 5bl)otalAmount.Caption + )1 5blRs9ord + Rs9ord"5bl)otalAmount.Caption#
Else
Page 60
2012
$%%% set t&e current row -'1.Row + -'1.Row C 1 $%%% set sr no -'1.)ext-atrix"-'1.Row/ 6# + 7al"-'1.)ext-atrix"-'1.Row : 1/ 6## C 1 End (' -'1.Col + 1 End (' move textbox"# $%%% select t&e text in text box )H)7A5.SelStart + 6 )H)7A5.Sel5en.t& + 5en")H)7A5.)ext# End ('
End Sub
Private Sub cmbval Ae1Press"B17al Ae1Ascii As (nte.er# $%%% ma!e 'lex .ird editable move t& combobox in .id cell 'or seletin. value $%%% c&ec! w&eat&e we press enter !e1 $%%% i' 1es..move t&e control to next .rod
Dim t As (nte.er
Page 61
2012
RS1.Open",select 3 'rom product master w&ere prod sub t1pe+, 4 C&r"B@# 4 cmbval.)ext 4 C&r"B@#/ Cn/ adOpenStatic/ ad5oc!ReadOnl1# (' RS1.RecordCount % 6 )&en -'1.)ext-atrix"-'1.Row/ -'1.Col C 8# + RS1",rate,# Else Ae1Ascii + 6 Exit Sub End ('
-'1.)ext + cmbval.)ext
$%%% s&ow total -'1.)ext-atrix"-'1.Row/ @# + 7al"-'1.)ext-atrix"-'1.Row/ 8## 3 7al"-'1.)ext-atrix"-'1.Row/ B## Dim x As (nte.er Dim )1 As Double 0or x + 1 )o -'1.Rows : 1 )1 + )1 C 7al"-'1.)ext-atrix"x/ @## Next 5bl)otalAmount.Caption + )1 5blRs9ord + Rs9ord"5bl)otalAmount.Caption#
Page 62
2012
$%%% set sr no -'1.)ext-atrix"-'1.Row/ 6# + 7al"-'1.)ext-atrix"-'1.Row : 1/ 6## C 1 End (' -'1.Col + 1 End (' move textbox"# cmbval.SelStart + 6 cmbval.Sel5en.t& + 5en"cmbval.)ext# End (' End Sub
Page 6*
2012
-'1.Col + 6 -'1.Col9idt&"6# + 1666 -'1.Cell0oreColor + vbBlue -'1.Cell0ontBold + )rue -'1.CellAli.nment + @ -'1.)ext + ,Sr.,
-'1.Col + 1 -'1.Col9idt&"1# + @866 -'1.Cell0oreColor + vbBlue -'1.Cell0ontBold + )rue -'1.CellAli.nment + @ -'1.)ext + ,Particulars,
Page 6,
2012
-'1.Col + B -'1.Col9idt&"B# + 1866 -'1.Cell0oreColor + vbBlue -'1.Cell0ontBold + )rue -'1.CellAli.nment + @ -'1.)ext + ,Rate,
-'1.Col + @ -'1.Col9idt&"@# + 1866 -'1.Cell0oreColor + vbBlue -'1.Cell0ontBold + )rue -'1.CellAli.nment + @ -'1.)ext + ,Amount,
-'1.)ext-atrix"1/ 6# + ,1,
Page 61
2012
$%%% set serial 'rom 1.8... 0or A + 1 )o -'1.Rows : 1 -'1.)ext-atrix"A/ 6# + A Next -'1.Row + 1 End Sub
Private Sub -01 EnterCell"# $%%% call appropriate control 'or edit t&e .rid (' -'1.Col + 1 )&en $%%% visble combo box 'or select product cmbval.7isible + )rue )H)7A5.7isible + 0alse (' cmbval.7isible + )rue )&en (' cmbval.Enabled + )rue )&en cmbval.Set0ocus"# End (' End ('
Page 62
2012
Rs.Open",select prod sub t1pe 'rom product master order b1 prod sub t1pe,/ Cn/ adOpenStatic/ ad5oc!ReadOnl1#
Else $%%% visble text box 'or entrin. 2uantit1 cmbval.7isible + 0alse )H)7A5.7isible + )rue (' )H)7A5.7isible + )rue )&en (' )H)7A5.Enabled + )rue )&en )H)7A5.Set0ocus"# End (' End ('
End ('
Page 64
2012
$%%ali.n combo box as per .rid cell and set text cmbval.5e't + -'1.Cell5e't C -'1.5e't cmbval.)op + -'1.Cell)op C -'1.)op cmbval.9idt& + -'1.Cell9idt& cmbval.)ext + -'1.)ext End Sub
Page 66
2012
Page 67
2012
1 Testing
Page 70
2012
Testing Electronic Billing and Payment On Demand System System Test Plan Introduction
This document descri es the user acceptance test plan !or the Electronic 'illin% and Payment On Demand System System# The complete test strate%y !or the Electronic 'illin% and Payment On Demand System System is to per!orm the !ollowin% "inds o! tests, in se0uence, 5# om&onent testing o! each component that ma"es up the Electronic 'illin% and Payment On Demand System System 6# Integration testing o! the Electronic 'illin% and Payment On Demand System System, to ensure the correct interwor"in% o! its components 7# ;alidation testing o! the Electronic 'illin% and Payment On Demand System System, to ensure that it wor"s correctly in a pseudo*live environment 8# User acce&tance testing o! the Electronic 'illin% and Payment On Demand System System, to ensure that its !unction is accepta le to its users -cceptance testin% is the last set o! tests to e per!ormed e!ore the application %oes o!!icially live# $est Scope The scope o! the user acceptance testin% covers,
4ersion 5 o! the Electronic 'illin% and Payment On Demand System System >ser*!acin% !unctionality de!ined y a set o! use cases -dministrator*!acin% !unctionality de!ined y a set o! use cases
The aim o! the testin% is to determine how well the application meets its !unctional re0uirements !rom the perspective o! the user, and to identi!y any issues so they can e resolved# -lso, the testin% serves to compile a set o! test data and results that can e used durin% su se0uent test cycles, to test !or non*re%ression o! the so!tware in later releases or a!ter the application is in maintenance# Page 71
2012
$or"in% practices mi%ht vary !rom user to user and are considered outside the scope o! the testin%# $est Strategy The asis o! user acceptance testin% is that other tests were completed success!ully, so the application and its re0uired in!rastructure are considered to e sta le and relia le# -cceptance testin% concentrates on the application !rom the user:s perspective, that is, how the application is used and whether it meets the necessary 0uality criteria# .han%e re0uests will e sent to the development team as the actiona le documentation# .han%e criteria will e determined y the Test team and the Development team prior to the e%innin% o! testin%# )or instance, criteria may include impact to desired functionality, amount of code impacted by proposed change, and design required by proposed change# The tester will evaluate the criteria# The test lead will determine .han%e 2e0uired or not# Once a u% has een determined as .han%e 2e0uired, the u% report will e translated into a .han%e 2e0uest and passed on to development# The customer o! the acceptance testin% is the System >sers, Supervisor and -dministrator !or Electronic 'illin% and Payment On Demand System System# The pro%ress o! the acceptance testin% will e reported to the customer, to%ether with any issues that are discovered and their planned resolutions# Si%n*o!! o! the tests, and there!ore the acceptance o! the application, will e per!ormed y the customer or a selected representative# Preconditions The !ollowin% items are re0uired e!ore testin% can ta"e place, - complete and coherent !unctional speci!ication o! the Electronic 'illin% and Payment On Demand System System expressed as use cases and usa%e scenarios - complete and validation*tested release o! Electronic 'illin% and Payment On Demand System System, delivered accordin% to the delivery plan -n a%reed*upon procedure !or dealin% with any anomalies that are discovered durin% the testin% process - set o! test speci!ications descri in% how each !unctional area o! the Electronic 'illin% and Payment On Demand System System is to e acceptance tested -n implemented test environment !or the testin% Su!!icient, suita le resources to carry out the testin% -vaila le standards !or the acceptance testin%
Page 72
2012
$est Priorities Durin% testin% o! the Electronic 'illin% and Payment On Demand System System, the !ollowin% 0ualities will e tested in order o! priority, )unctionalityNwhether the re0uired !unctions are availa le and wor"in% as expected >sa ilityNhow user*!riendly and intuitive the Electronic 'illin% and Payment On Demand System System is SecurityNhow well*protected and %uaranteed corporate and user data is Per!ormanceNwhether the response times are within accepta le limits .ustomi(ationNhow strai%ht!orward it is to use the application in new, unpredicted ways
$est $echni#ues The !ollowin% techni0ues will e applied, Scripted testsNse0uences o! user interactions ( ased on the use case and usa%e scenarios) usin% prede!ined data sets a%ainst predicted results >nscripted testsN ased on scripted tests, the tester tries to modi!y the scenarios to explore what*i! possi ilities Penetration testsNscripted tests to attempt unauthori(ed entry into the system >sa ility chec"listsNtests to determine the complexity o! interactions Per!ormance statisticsN%eneration o! per!ormance in!ormation to chec" a%ainst desired per!ormance criteria
$est Organi'ation Roles and Res&onsi%ilities The !ollowin% roles are de!ined, D- lead1test mana%erNresponsi le !or plannin% and ensurin% the smooth runnin% o! the test process TesterNcarries out the tests accordin% to the test plan, and then reports the results Product mana%erNensures that the tests are carried out success!ully !rom a user perspective Pro+ect sponsor1clientNacts as main sta"eholder, and ensures that the needs o! the customer community as a whole are considered Test supportNprovides technical assistance, such as test environment con!i%uration, and non*technical assistance, such as methodolo%ical support
Page 7*
2012
$ee"ly team meetin%s will e held involvin% the test mana%er, testers, and product mana%ers# -t these meetin%s, the pro%ress o! the testin% process will e reported, any issues will e discussed, and actions will e a%reed upon#
Sales +'tomation Pro%lem c'stomer identi-ication# - ility to identi!y top 5? developin% pro lem customers y sales representative# Identi-ication o- %est c'stomers across &rod'ct lines and regions # -ll customers can e sorted y the !actors (to e determined) that ran" them 0ualitatively# 4aria le sorts and ran"in%s can e chosen y the sales representative# Identi-ication o- iss'es across gro'&s# -ll customers can e sorted y the issues (to e determined) within %roup cate%ories that can e updated# 4aria le sorts and ran"in%s can e chosen y the sales representative or other user# +nalysis o- 3'antities and rates o- &rod'cts# Products can e sorted y the 0uantity and dates sold# 4aria le sorts and ran"in%s can e chosen y the user# Design )oals and onstraints
Per(ormance Ko more than a 9*percent de%radation in avera%e 0uery response is allowed while all concurrent user are usin% the system# Processor utili(ation should not exceed @? percent durin% all concurrent users are usin% the system# Availa ility 'ecause the system is accessed y sales representative to oo" the order and print the Payment On Demand System, and their should not e any sin%le point o! !ailure# )elia ility 'ecause o! the need no sin%le point !ailure, automatic !ailover will e re0uired# In addition, existin% disaster recovery and ac"up plans and procedures must e revised to incorporate the Electronic 'illin% and Invoicin% System# Scala ility Electronic 'illin% and Payment On Demand System System an avera%e load o! 9? concurrent users a!ter the system is !ully operational, and expects that to %row y 9 percent each year !or the next !ive years# Page 7,
2012
Security )or the sensitive customer and order data, all users will need to lo% on the system with their user id and password# Every resource in the system are de!ined y the role and privile%ed# System administrator assi%ned user role and privile%ed !or their access ri%hts# Interopera ility In 4ersion 5#? o! the Electronic 'illin% and Payment On Demand System System, there are no re0uirements !or interopera ility with other systems# *ocation The Electronic 'illin% and Payment On Demand System System are used in the company o!!ice only# Setup+Installation Setup and installation must not interrupt the sales sta!!:s daily tas"s and wor" !low# Use ase S'mmary
Manage Orders Descri&tion This !unction will ena le sales representative to place orders !or Electronic 'illin% and Payment On Demand System System products, trac" su mitted orders, and view completed orders and print the Payment On Demand System# B'siness Need This !unction will ena le sales representative to interact with Electronic 'illin% and Payment On Demand System System catalo% directly without the intervention o! any other employees# Manage Products Descri&tion This !unction allows user o! Electronic 'illin% and Payment On Demand System System to create, maintain, and delete in!ormation a out products in the product data ase that can then e viewed and ordered y customers, and accessed and updated y the sales sta!!# B'siness Need This !unction will support the sales sta!! with accurate and relevant in!ormation, and will also support the Mana%e Orders !unction y ensurin% up*to*date product in!ormation# Page 71
2012
Descri&tion This !unction ena les the sales sta!! to create and mana%e contacts as well as share contact in!ormation with the rest o! the company# B'siness Need This !unction ena les user o! Electronic 'illin% and Payment On Demand System System to have accurate and up*to*date contact in!ormation when wor"in% with customers# Priority Medium Analy'e Customers Descri&tion This !unction allows mana%ement to analy(e the customer data ase and !ind out in!ormation, such as the identities o! the est customers, the top uyers, and the most popular products# B'siness Need This !unction will allow mana%ement to determine the most (and least) pro!ita le customers and product lines, ena lin% etter decision ma"in% in the runnin% o! the usiness# Priority Medium ,orecast Sales Descri&tion This !unction allows mana%ement to plan and trac" production costs, trac" sales results, and plan sales sta!!in% needs# B'siness Need This !unction will allow mana%ement to mana%e the revenue streams o! the or%ani(ations and control costs#
Page 72
2012
Descri&tion This !unction allows mana%ement to view current sales trends and employee per!ormance and to determine sales %oals !or the sales sta!! within the or%ani(ation# B'siness Need This !unction will allow mana%ement to set %oals !or sta!!, review the per!ormance o! sta!! mem ers, and trac" employee per!ormance# Priority Medium .sage Scenarios >sa%e scenarios that descri e how users will use the solution within the context o! the usiness, See !ollowin% usa%e scenarios# Assumptions+Preconditions 5# Sales representative has access ri%hts to view customer data# Actors 5# Sales 2epresentative Basic Course 5# >se case e%ins when the sales representative decides to retrieve customer in!ormation# 6# System prompts !or the type o! customer in!ormation that is re0uired# 7# Sales representative selects the type o! customer in!ormation to e retrieved# 8# System presents the appropriate customer in!ormation to the sales representative# 9# >se case ends when the selected in!ormation is passed to a method o! delivery# Alternate Course 5# I! no appropriate customer in!ormation can e !ound, system reports this !act# 6# >se case restarts to ena le sales representative to update the type o! customer in!ormation# .ses+Extends 5# Kone .ser Implementation )e#uests 5# Kone Page 74
2012
,uture )e#uirements 5# The sales representative may want to apply !ilters to the retrieved data# 6# The sales representative may want to sort the data# )or example, the sales representative may want to list the names o! customers in chronolo%ical order ased on the sale date#
Page 76
2012
Page 77
2012
<in"in% and inte%ration o! any le%acy system !or accountin%# Inte%ration with travel a%ent throu%h $e Services .onnection to third*party O<-P applications Electronic Data Interchan%e (EDI) system etween an"s, other credit veri!ication a%ency and their vendors In the area o! data security and system security# Provide more online tips and help# To optimi(e the 0uery which is em edded in the system #
Page 100
2012
Page 101
2012
Re-erences We sites http,11www#%oo%le#com http,11www#microso!t#com http,11www#pro%rammer6pro%rammer#net http,11www#codepro+ect#com http,11www#msdn#com# http,11www#v 567#com http,11www#v code#com http,11www#s0ltuner#com Boo/s
Masterin% 4isual 'asic B (Paper ac") Masterin% 4isual 'asic #KET (Paper ac") 4isual 'asic 'lac" 'oo" (Paper ac") SD< 'i le, 6nd Edition (Paper ac") Data ase Development in 4isual 'asic
Page 102