8/13/2019 Crm File Bca
1/100
96
CRM (A Client RelationshipManagement System)
1. Introduction Of Visual Basic
What is Visual Basic:
Visual Basic is not just a language it's an Integrated Development
Environment in which you can develop, run, test and debug your applications.
Standard EXE:
A standard EE project is a typical application most o! the application in
this language art standard EE project.
Active X EXE, Active DLL:
Active components are basic code"building components that
do not have a visible inter!ace and that can add special !unctionality to your
application.
Active X !ontrol:
Active control such as a #e$t Bo$ or %ommand Button control is a
basic element o! the user inter!ace.I! the Active control, that come with visual
basic do not provide the !unctionality you need, you can build your own customcontrols .
Active X Docu"ent EXE, Active X Docu"ent DLL:
#hat can run in the environments o! a container that supports hyper
lin&ing.
VB A##lication Wi$ard, VB Wi$ard %ana&er:
#he application wiard ta&es you through the stenos o! setting up
the (&elton o! a new application.
Data 'ro(ect:
It is identical to the (tandard EE project type, but it automatically
8/13/2019 Crm File Bca
2/100
96
CRM (A Client RelationshipManagement System)
adds the controls that are used in accessing databases to the toolbo$.
D)*% A##lication: VB) allows you to build dynamic *#+ page that can be displayed
in the browser's window on a client computer.Instead o! showing you how to use
VB's tool to automate the process o! designing"D*#+ pages.
)S A##lication:
VB) allows you to build applications that run on the web server
and
interact with client over the internet with the internet in!ormation server.
VB Enter#rise Edition !ontrols:
It simply creates a new standard EE project and load all the
tools o! the enterprise edition o! VB.
'ro(ect E+#lorer:
#he window tootled project e$plorer displays the components o!
the project .#he project window is called project e$plorer because it has the loo&
o! the window e$plorer.
'ro#erties Windo:
#he property window contains the property o! setting !or the
selected control properties are attributes o! an object ,such as its sie, caption
and color . -ou can adjust the appearance o! the controls and the !orm with point
and clic& operations.
-or" Desi&ner:
#he !orm designer is the main window in the middle o! the
screen ,and in it you design and edit the applications user inter!ace .#he same
windows display a test editor in which you can enter and edit the application's
code.
8/13/2019 Crm File Bca
3/100
96
CRM (A Client RelationshipManagement System)
-or" Laout:
-ou use the !orm layout window, which is in the lower right cornero! the VB ID, to determine the initial positions o! the !orms in your application.
-ou can move !orms around and place them on too o! each other.
I""ediate Windo:
#he immediate window, the bottom o! the IDE is a debugging
while an application is running, you can stop it and use the immediate window to
e$amine the change in value o! the application variable and to e$ecute VB
commands in immediate mode.
*he %enu Bar:
#he menu bar contains the commands you need wor& with Visual
Basic. #he basics menu are""""""
-ile:
#hat contains the commands !or opening and saving projects and
creating e$ecutable !iles and list o! recent projects.
Edit:
Edit contains the editing commands e.g."/ndo, %opy, 0aste1 plus a
number o! commands !or !ormatting and editing your code e.g 2ind, 3eplace1.
Vie:
View contains commands !or showing o! hiding components o! the IDE.
'ro(ect:
0roject contains commands that add components to current project,re!erences to windows and new tools to the tool bo$.
8/13/2019 Crm File Bca
4/100
96
CRM (A Client RelationshipManagement System)
-or"at:
2ormat contains commands !or aligning the control on the !orm.
De/u&:
Debug contains the usual debugging commands.
0uer:
4uery contains commands that simpli!y the design o! structures 4uery
anguage(41.
Dia&ra":
Diagram contains commands !or e!!ecting database diagrams.
un:
3un contains commands that start, brea& an e$ecution o! the current
application.
*ools:
#ools contains the tools you need in building Active components and
Active controls contains the commands to start the +enu Editor and the options
commands, which lets the customie the environment.
Windo:
5indows is the standard 5indows menu o! an application that contains
commands it arrange on the screen.
)el#:
*elp contains !ormation to help you as you wor&.
*)E ELE%E2* 3SE I2 *)E I2-O%A*IO2
#he toolbo$ o! the visual IDE and let6s 7uic&ie run through controls
shown in the #oolbo$.
8/13/2019 Crm File Bca
5/100
96
CRM (A Client RelationshipManagement System)
La/el:
#he abel te$t appears to be placed directly on the !orm. -ou set thelabel6s te$t with the caption property.
*e+t Bo+:
#he #e$tbo$ control is a mini te$t editor, and its most important property is
the te$t property, which can set the te$t on the control or read the te$t that the
user enters.
-ra"e:
#his control is used to draw bo$es on the !orm and to group otherelements.
!o""and Button:
%ommand button6s represented an action that is carried out when the user
clic& the button.
O#tion Button:
#he 8ption Button6s main property is chec&ed, and it is #rue i! the control
is chec&ed, and 2alse otherwise.
!o"/o Bo+:
It contains an Edit !ields. #he user can choose an item !rom the list
oriented a new string in the Edit !ield. #he item selected !rom the listor entered
in the Edit !ield.1
List Bo+:
ist bo$ control can contains many lines and the user can scroll the list to
locate an item. #he selected item in a list bo$ control is given by the te$t
property.
Sha#e:
8/13/2019 Crm File Bca
6/100
96
CRM (A Client RelationshipManagement System)
#his control is used to draw graphical element such as bo$es and circles,
on the sur!ace o! a !orm.
%S-le+ 4rid !ontrol:
#he +(2le$ 9rid %ontrol is an e$tremely used tool !or displaying
in!ormation in a tabular !orm, but not !or data entry.
%icrosoft Access Data/ase:
A database is a collection o! data. -our phone boo& is a simple database
and so is your chec&boo&. A history o! a companies order, invoice: and
payments is an e$ample o! a more complicated database, as is a log o! a salepersons contacts with clients and any related !ollows"up plans.
Access is a !le$ible program that wor&s !or both simple and comple$
database projects, It6s also a relational database, which means it lets you
de!ine relationships between di!!erent types o! in!ormationli&e customers
and their orders1 so you can use them together.
O/(ects Of An Access Data/ase:
#he heart o! a database is the in!ormation it holds. But there are other
important elements, usually re!errers to as objects, in an access database.
*ere the &inds o! the objects are;"
< *a/le: It holds in!ormation.
< 0ueries: et you as& 7uestion about your data or ma&e changes to
data.
< -or"s: 2orms are !or viewing and editing in!ormation.
< 'a&es: 0ages are *#+ *yperte$t +ar&up anguage1 !iles that let
you view access database with internet e$plorer.
8/13/2019 Crm File Bca
7/100
96
CRM (A Client RelationshipManagement System)
< e#orts: 3eports is !or summariing and printing data.
< %acros: +acros per!orms one or more database actions automatically.
< Securit: 0rovides security through password when the database is
opened in E$clusive mode.
< %ulti3ser:Allows multi"user access to database !or users created in
Access.
%odulesare another type o! access object that you may or may not wor& with. Amodule is a program you write using VBVisual Basic, #he 0rogramming
anguage included with 8!!ice =>>>1 to automate and customie database
!unctions.
8/13/2019 Crm File Bca
8/100
96
CRM (A Client RelationshipManagement System)
5. I2*OD3!*IO2 *O %S A!!ESS
It is a coherent connection o! data with some minaret meaning, design cast and
populated with data !or a speci!ic purpose. A data base stores data that is use!ul
to us. #his data is only part o! the entire data available in the world around us.
#o be able to success!ully design and maintain database we have to do the
!ollowing""""
Identi!y which part o! the world data is o! interest to us.
Identi!y what speci!ic objects in that part o! the world data are o! interest to
us.
Identi!y a relationship between objects
*ence, the objects, their attributes and the relationship between them that are o!
interest to us are stored in data base that is designed, build and populated data
!or a speci!ic purpose.
+( Access is developed by +icroso!t according to above consideration
.+(Access is a power !ull tool o! ms o!!ice which allow to create data base and
also have ability to maintain a data base.
8/13/2019 Crm File Bca
9/100
96
CRM (A Client RelationshipManagement System)
6. Sste" Desi&n
#he purpose o! the design phase is to plan a solution o! the problem speci!ied by
the re7uirements document. #his phase is the !irst step in moving !rom the
problem domain to the solution domain. In other words, starting with what is
needed, design ta&es us toward how to satis!y the needs.
#he design o! a system is perhaps the most critical !actor a!!ecting the 7uality o!
the so!tware: it has a major impact on the later phases? particularly testing and
maintenance. #he output o! this phase is the design document. #his document is
similar to a blueprint or plans !or the solution and is used later during
implementation, testing and maintenance.
#he design activity is o!ten divided into two separate phases;"
@1 (ystem Design
=1 Detail Design
@1 Sste" Desi&n: (ystem Design, which is sometimes also called top"
level design, aims to identi!y the modules that should be in the system, the
speci!ication o! these modules, and how they interact with other to produceresults. At the end o! system design all major data structures, !ile !ormats,
output !ormats, and the major modules in the system and their speci!ications
are decided.
=1 Detail Desi&n: During the detail design? the internal logic o! each o!
the modules speci!ied in system design is decided. During this phase !urther
set ails o! the data structures and algorithmic design o! each o! the modules
is speci!ied. #he logic o! a module usually speci!ied in a high"level design
description language, which is independent o! the target language in whichthe so!tware will eventually be implemented.
8/13/2019 Crm File Bca
10/100
96
CRM (A Client RelationshipManagement System)
6.1 %odule Brea7u# 8 Descri#tion
< %odules of the 'ro(ect;"#he ban&ing system is organied into the!ollowing modules;"
Account Detail +odule
#ransaction Detail +odule
%reate account +odule
6.5 Validation ules
#his so!tware !ollows the several validation rules, by avoiding them user can6t
ma&e the entries possible. (o &eep in mind all these rules during the data
entry process. #he validation rules are as !ollows;"
@. Each !ield having the ma$imum length, you can6t e$ceed them.
=. (ome !ield li&e 0in %ode, Acc. Co., and 0hone Co. can accept
numbers.
8/13/2019 Crm File Bca
11/100
96
CRM (A Client RelationshipManagement System)
9. -easi/ilit Stud
2easibility study is a test o! the system o! the system proposals according to its
wor& ability and to meet the user needs and the e!!ective use o! the resources.
It is carried out to select the best system that meets the per!ormance
re7uirements, which entails the identi!ication, description the selection o! the
best system !or the job.
9.1 *his stud focuses on three "a(or uestions;
5hat are the users6 demonstrable needs and how does a candidate
system meet them.
5hat resources are available !or the given system is the problem worth
solving.
5hat is the li&ely impact o! the candidate system on the organiation how
well does it !it within the organiation master +I( plan
9.5 3ser de"onstra/le needs :
It means seeing all the user re7uirements and by considering these
re7uirements .we develop a suitable project to !ul!ill these re7uirements. these
re7uirements are ;
#he data entered by the user should be stored in a particular !ile
permanently.
At the time o! deletion and modi!ication o! a particular record the
record corresponding to its will be displayed on the screen with
alternation.
At any point o! time the user can e$it !rom the program.
8/13/2019 Crm File Bca
12/100
96
CRM (A Client RelationshipManagement System)
9.6 'ro/le" orth solvin&:
#he problem studies lead to three candidate solutions;
Do nothing
Improve the e$isting manual system by reducing duplicity and
redundancy.
%omputerie the manual system
By thoroughly studying the three options, the third solution technically is most!easible.
9.9 -easi/ilit !onsideration:
#hree &ey consideration are involved in the !easibility analysis; economic,
technical, and behavioral.
i;Econo"ic -easi/ilit; Economic analysis is the most !re7uently usedmethod !or evaluating the e!!ectiveness o! a candidate system . +ore commonly
Fnown as costGbene!it analysis, the procedure is to determine the bene!its and
savings that are e$pected !rom a candidate the decision is mind to design and
implement the system. 8therwise !urther justi!ication or alterations in the
proposed system will have to be made i! it is to have a chance o! being
approved.
#his is an ongoing e!!ort that improves in accuracy o! each phase o! the
system li!e cycle. #he records displayed should be page wise.
8/13/2019 Crm File Bca
13/100
96
CRM (A Client RelationshipManagement System)
ii;*echnical -easi/ilit: #echnical !easibility centers around the
e$isting computer system hardware, so!tware etc1 and to what e$tent it can
support the proposed addition. 2or e$ample, i! the current computer is operatingat H> per cent capacity" an arbitrary ceiling then running another application
could overload the system or re7uire additional hardware. #his involves !inancial
considerations to accommodate technical enhancements. I! the budget is a
serious constraint, then the project is judged not !easible.
9.< Ste#s in -easi/ilit Analsis
2easibility analysis encompasses eight steps;
@1 2orm a project team and appoint a project leader.
=1 0repare systems !low charts.
1 Enumerate potential candidate system.
J1 Describe and identi!y characteristics o! candidate systems.
K1 Determine and evaluate per!ormance and cost e!!ectiveness o! each
candidate system.
)1 5eight system per!ormance and cost data.
L1 (elect the best candidate system.
H1 0repare and report !inal project directive to management.
8/13/2019 Crm File Bca
14/100
96
CRM (A Client RelationshipManagement System)
8/13/2019 Crm File Bca
15/100
96
CRM (A Client RelationshipManagement System)
5. SOFTWARE REQUIRMENT SPECIFICATION
8/13/2019 Crm File Bca
16/100
96
CRM (A Client RelationshipManagement System)
=. D-D>Data -lo Dia&ra";
.-%
.-X
Binar
data
.BAS
Standard
"odules
.!LS!lass
"odule
.O!X
-or"
%odules
-or"1.fr"
-or"5.fr"
%od1./as
!lass1.cls
:
:
8/13/2019 Crm File Bca
17/100
96
CRM (A Client RelationshipManagement System)
!usto"
controls
A##.e+e .ES 'ro(ect file
V#/
esources
files
8/13/2019 Crm File Bca
18/100
96
CRM (A Client RelationshipManagement System)
7. FORM DESIGN
AND
FORM CODING
8/13/2019 Crm File Bca
19/100
96
CRM (A Client RelationshipManagement System)
0rivate (ub FeyAscii As Integer1
I! FeyAscii M @ #hen
#$t0assword.(et2ocus
End I!
End (ub
0rivate (ub %mdE$itN%lic&1
/nload +eEnd (ub
0rivate (ub %md8&N%lic&1
I! %bo/serCame.#e$t M OAdministratorO And #$t0assword.#e$t M #$t0assword.#ag
#hen
[email protected] M #rue
+DI2orm@.(et2ocus
/nload +e
Else
+sgBo$ O0lease 2ill #he %orrect /ser Came 0assword......PO, vbIn!ormation,+e.%aption
#$t0assword.#e$t M OO
#$t0assword.(et2ocus
E$it (ub
8/13/2019 Crm File Bca
20/100
96
CRM (A Client RelationshipManagement System)
End I!
End (ub
0rivate (ub 2ormNoad1
8n Err 9o#o errh
#[email protected] M #rue
Ani5ait.Auto0lay M #rue
Ani5ait.8pen App.0ath OQ2ile%omm.AVIO
+e.3e!resh
E$it (ub
errh;
3esume Ce$t
End (ub
0rivate (ub #imer@N#imer1
I! blData.e!t R blData.5idth S blCew.e!t #hen
blData.e!t M K>J>
Else
blData.e!t M blData.e!t " =>
End I!
End (ub
0rivate (ub #$t0asswordNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
%md8&.(et2ocus
End I!
End (ub
8/13/2019 Crm File Bca
21/100
96
CRM (A Client RelationshipManagement System)
8/13/2019 Crm File Bca
22/100
96
CRM (A Client RelationshipManagement System)
0rivate (ub +DI2ormNoad1
!rmBac&ground.Visible M #rue
End (ub
0rivate (ub +nu%%+N%lic&1
!rm%on!iguration+gmt.Visible M #rue
!rm%on!iguration+gmt.(et2ocus
End (ub
0rivate (ub +Cu%lientN%lic&1
2rm%lient+aster.Visible M #rue
2rm%lient+aster.(et2ocus
End (ub
0rivate (ub +nu%lients3eportsN%lic&1
Dim myde As De3eports
(et myde M Cew De3eports
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
myde.%onn3eports.%onnection(tring M gstrmasterconn
myde.%onn3eports.8pen
myde.rs%md%lient.8pen
I! myde.rs%md%lient.3ecord%ount S @ #hen
+sgBo$ OCothing to (ave.O, vbIn!ormation, +e.%aption
E$it (ub
Else
Dr%lient.3e!resh
Dr%lient.(how End I!
End (ub
0rivate (ub +nu%+N%lic&1
8/13/2019 Crm File Bca
23/100
96
CRM (A Client RelationshipManagement System)
!rm%all+gmt.Visible M #rue
!rm%all+gmt.(et2ocus
End (ub
0rivate (ub +nudailyN%lic&1
Dim myde As De3eports
(et myde M Cew De3eports
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
myde.%onn3eports.%onnection(tring M gstrmasterconn
myde.%onn3eports.8pen
myde.rs%mdDaily.8pen I! myde.rs%mdDaily.3ecord%ount S @ #hen
+sgBo$ OCothing to (ave.O, vbIn!ormation, +e.%aption
E$it (ub
Else
DrDaily.3e!resh
DrDaily.(how
End I!
End (ub
0rivate (ub +nuD53N%lic&1
!rmdailyreport.Visible M #rue
!rmdailyreport.(et2ocus
End (ub
0rivate (ub +nuE3N%lic&1
Dim myde As De3eports
(et myde M Cew De3eports
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1 myde.%onn3eports.%onnection(tring M gstrmasterconn
myde.%onn3eports.8pen
myde.rs%mdEmployee.8pen
I! myde.rs%mdEmployee.3ecord%ount S @ #hen
8/13/2019 Crm File Bca
24/100
96
CRM (A Client RelationshipManagement System)
+sgBo$ OCothing to (ave.O, vbIn!ormation, +e.%aption
E$it (ub
Else DrEmployee.3e!resh
DrEmployee.(how
End I!
End (ub
0rivate (ub +nu+50(N%lic&1
!rm+odule(tatus.Visible M #rue
!rm+odule(tatus.(et2ocus
End (ub
0rivate (ub +nu8C(+N%lic&1
!rm8nine(upport.Visible M #rue
!rm8nine(upport.(et2ocus
End (ub
0rivate (ub +nu0I3N%lic&1
!rm0endency.Visible M #rue
!rm0endency.(et2ocus
End (ub
0rivate (ub +nu0rojectsN%lic&1
Dim myde As De3eports
(et myde M Cew De3eports
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
myde.%onn3eports.%onnection(tring M gstrmasterconn
myde.%onn3eports.8pen
myde.rs%md0rojects.8pen I! myde.rs%md0rojects.3ecord%ount S @ #hen
+sgBo$ OCothing to (ave.O, vbIn!ormation, +e.%aption
E$it (ub
Else
8/13/2019 Crm File Bca
25/100
96
CRM (A Client RelationshipManagement System)
Dr0rojects.3e!resh
Dr0rojects.(how
End I!End (ub
0rivate (ub +nu#eamN%lic&1
!rmemployee.Visible M #rue
!rmemployee.(et2ocus
End (ub
0rivate (ub +nu0rojectN%lic&1
!rmproject.Visible M #rue
!rmproject.(et2ocus
End (ub
0rivate (ub +nu5ee&lyN%lic&1
2rm3eports.Visible M #rue
2rm3eports.(et2ocus
End (ub
0rivate (ub +nu5(N%lic&1
2rmwee&ly(chedule.Visible M #rue
2rmwee&ly(chedule.(et2ocus
End (ub
8/13/2019 Crm File Bca
26/100
96
CRM (A Client RelationshipManagement System)
0rivate (ub 1
2illNist
!illNlistp
8/13/2019 Crm File Bca
27/100
96
CRM (A Client RelationshipManagement System)
End (ub
0rivate (ub !illNlistp1
8n Err 9o#o errh
Dim l$ As istItem
Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset
(et lconn M 8pen%onlconn1
lstNproj.istItems.%lear
(et rs M lconn.E$ecuteO(EE%# project.#Nname, project.CNcode 2rom project
83DE3 B- project.#NnameO1
I! rs.B82 8r rs.E82 #hen
Else 2or i M @ #o rs.3ecord%ount
(et l$ M lstNproj.istItems.Add, , rsP#Nname1
l$.#ag M rsPCNcode
rs.+oveCe$t
Ce$t i
End I!
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
0rivate (ub %hec&@N%lic&1
I! %hec&@.Value M @ #hen
t$tNcity.#e$t M #$t%city.#e$t
t$tNdis.#e$t M #$t%district.#e$t
t$tNpin.#e$t M #$t%0in.#e$t
t$tNstate.#e$t M #$t%(tate.#e$t t$tNcountr.#e$t M #$t%country.#e$t
t$tNadd.#e$t M #$t%add.#e$t
Else
t$tNadd.#e$t M t$tNadd.#ag
8/13/2019 Crm File Bca
28/100
96
CRM (A Client RelationshipManagement System)
t$tNcity.#e$t M t$tNcity.#ag
t$tNdis.#e$t M t$tNdis.#ag
t$tNpin.#e$t M t$tNpin.#ag t$tNstate.#e$t M t$tNstate.#ag
t$tNcountr.#e$t M t$tNcountr.#ag
End I!
End (ub
0rivate (ub 2illNist1
8n Err 9o#o errh
Dim l$ As istItem
Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset(et lconn M 8pen%onlconn1
listNrec.istItems.%lear
(et rs M lconn.E$ecuteO(EE%# 2rom client 83DE3 B- client.CNIDO1
I! rs.B82 8r rs.E82 #hen
Else
2or i M @ #o rs.3ecord%ount
(et l$ M listNrec.istItems.Add, , listNrec.istItems.%ount R @1
l$.(ubItems@1 M II!IsCullrsPCNId1, OO, rsPCNId1
l$.(ubItems=1 M II!IsCullrsP#Nname1, OO, rsP#Nname1
l$.(ubItems1 M II!IsCullrsP#Nclientcoordinators1, OO, rsP#Nclientcoordinators1
l$.(ubItemsJ1 M II!IsCullrsPDNdate1, OO, rsPDNdate1
l$.(ubItemsK1 M II!IsCullrsP#Nlocaladd1, OO, rsP#Nlocaladd1
l$.(ubItems)1 M II!IsCullrsP#N%ity1, OO, rsP#N%ity1
l$.(ubItemsL1 M II!IsCullrsP#NphoneNno1, OO, rsP#NphoneNno1
rs.+oveCe$t
Ce$t i
End I!
E$it (ub
errh; +sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
8/13/2019 Crm File Bca
29/100
96
CRM (A Client RelationshipManagement System)
0rivate (ub cmdNdelN%lic&1
8n Err 9o#o errh
Dim lconn As AD8DB.%onnection (et lconn M 8pen%onlconn1
ans M +sgBo$ODo -ou 3eally 5ant #o Delete #he (elected Data.O, vb4uestion R
vb-esCo, +e.%aption1
I! ans M ) #hen
lconn.E$ecute ODelete 2rom client where CNIDM'O t$tNid.#e$t O'O
lconn.E$ecute ODelete 2rom clientNproject where clientNIdM'O t$tNid.#e$t O'O
+sgBo$ OData Delete (uccess!ully.O, vbIn!ormation, +e.%aption
End I!
%learN%ontrols 2illNist
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
0rivate (ub %mdE$itN%lic&1
I! cmde$it.%aption S< O%ancelO #hen
/nload +e
Else
save.%aption M OsaveO
%learN%ontrols
cmde$it.%aption M Oe$itO
End I!
End (ub
0rivate (ub saveN%lic&1
8n Err 9o#o errh
Dim lconn As AD8DB.%onnection
Dim l$ As istItem
8/13/2019 Crm File Bca
30/100
96
CRM (A Client RelationshipManagement System)
(et lconn M 8pen%onlconn1
I! t$tNid.#e$t M OO #hen
+sgBo$ O0lease !ill the id valueO, vb%riticalt$tNid.(et2ocus
E$it (ub
End I!
I! t$tNname.#e$t M OO #hen
+sgBo$ O0lease !ill the nameO, vb%ritical
t$tNname.(et2ocus
E$it (ub
End I!
I! save.%aption S< O+odi!yO #hen
(et rs M lconn.E$ecuteO(EE%# client.CNId !rom client O1 2or i M @ #o rs.3ecord%ount
(et l$@ M listNrec.istItems
j M II!IsCullrsPCNId1, OO, rsPCNId1
I! t$tNid.#e$t M j1 #hen
+sgBo$ OId E$istP 0lease !ill another id valueO, vb%ritical
t$tNid.#e$t M OO
t$tNid.(et2ocus
E$it (ub
End I!
rs.+oveCe$t
Ce$t i
lconn.Begin#rans
lconn.E$ecute OIC(E3# IC#8 client CNId, #Nname, #NphoneNno, #Ndomain,
#NemailNid, #Nclientcoordinators, DNdate, #Nlocaladd, #Ncity, #Ndis, CNpin, #Nstate,
#Ncountry, #N!a$, #Nwebadd, #Nintroducer, #Nclass, #Ncategory, #Nremar&s, #Ncoadd,
#Ncity@, #Ndis@, CNpin@, #Nstate@, #Ncountry@1O N
OVA/E('O t$tNid.#e$t O','O t$tNname.#e$t O','O t$tNph.#e$t O','O t$tNdomain.#e$t O','O t$tNemail.#e$t O','O t$tNclientco.#e$t O',TO
%DateII!dtNdate.Value M OO, Date, dtNdate.Value11 OT,'O t$tNadd.#e$t O','O
t$tNcity.#e$t O','O t$tNdis.#e$t O',O Valt$tNpin.#e$t1 O,'O t$tNstate.#e$t O','O
t$tNcountr.#e$t O','O t$tN!a$.#e$t O','O t$tNweb.#e$t O','O t$tNintro.#e$t O','O
8/13/2019 Crm File Bca
31/100
96
CRM (A Client RelationshipManagement System)
t$tNclass.#e$t O','O t$tNcategory.#e$t O','O t$tNremar&.#e$t O','O #$t%add.#e$t
O','O #$t%city.#e$t O','O #$t%district.#e$t O',O Val#$t%0in.#e$t1 O,'O
#$t%(tate.#e$t O','O #$t%country.#e$t O'1O lconn.%ommit#rans
2or j M @ #o lstNproj.istItems.%ount
(et l$ M lstNproj.istItemsj1
I! l$.%hec&ed M #rue #hen
lconn.E$ecute OIC(E3# IC#8 clientNproject clientNId, #Nproject1 O N
OVA/E('O t$tNid.#e$t O',O Vall$.#ag1 O1O
End I!
Ce$t j
+sgBo$ OData (aved (uccess!ully.O, vbIn!ormation, +e.%aption Else
lconn.Begin#rans
lconn.E$ecute O/pdate client set CNIdM'O t$tNid.#e$t O', #NnameM'O
t$tNname.#e$t O', #NphoneNnoM'O t$tNph.#e$t O', #NdomainM'O t$tNdomain.#e$t
O', #NemailNidM'O t$tNemail.#e$t O', #NclientcoordinatorsM'O t$tNclientco.#e$t O',
DNdateMTO %DateII!dtNdate.Value M OO, Date, dtNdate.Value11 OT, #NlocaladdM'O
t$tNadd.#e$t O', #NcityM'O t$tNcity.#e$t O', #NdisM'O t$tNdis.#e$t O', CNpinMO
Valt$tNpin.#e$t1 O, #NstateM'O t$tNstate.#e$t O', #NcountryM'O t$tNcountr.#e$t
O', #N!a$M'O t$tN!a$.#e$t O', #NwebaddM'O t$tNweb.#e$t O', #NintroducerM'O
t$tNintro.#e$t O', #NclassM'O t$tNclass.#e$t O', #NcategoryM'O t$tNcategory.#e$t
O', #Nremar&sM'O t$tNremar&.#e$t O', #NcoaddM'O #$t%add.#e$t O',O N
O#Ncity@M'O #$t%city.#e$t O', #Ndis@M'O #$t%district.#e$t O', CNpin@MO
Val#$t%0in.#e$t1 O, #Nstate@M'O #$t%(tate.#e$t O', #Ncountry@M'O
#$t%country.#e$t O' where CNIdM'O t$tNid.#e$t O'O
lconn.%ommit#rans
lconn.Begin#rans
lconn.E$ecute ODelete 2rom clientNproject where clientNIdM'O t$tNid.#e$t O'O
lconn.%ommit#rans
2or j M @ #o lstNproj.istItems.%ount
(et l$ M lstNproj.istItemsj1
I! l$.%hec&ed M #rue #hen
8/13/2019 Crm File Bca
32/100
96
CRM (A Client RelationshipManagement System)
lconn.E$ecute OIC(E3# IC#8 clientNproject clientNId, #Nproject1 O N
OVA/E(O Valt$tNid.#e$t1 O,O Vall$.#ag1 O1O
End I! Ce$t
+sgBo$ OData +odi!y (uccess!ully.O, vbIn!ormation, +e.%aption
End I!
%learN%ontrols
2illNist
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub 3esume
End (ub
0rivate (ub %ombo@N9ot2ocus1
2ill%ombo@ O(EE%# CNID 2rom client 83DE3 B- CNIDO, combo@
End (ub
0rivate (ub listNrecNDbl%lic&1
Dim rs As AD8DB.3ecordset
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
save.%aption M O+odi!yO
cmdNdel.Enabled M #rue
cmde$it.%aption M O%ancelO
Dim l$ As istItem
(et l$ M listNrec.(electedItem
t$tNid.#e$t M l$.(ubItems@1
(et rs M lconn.E$ecuteO(elect !rom client where CNID M 'O t$tNid.#e$t O'O1I! rs.E82 8r rs.B82 #hen
Else
t$tNid.#e$t M II!IsCullrsPCNId1, OO, rsPCNId1
8/13/2019 Crm File Bca
33/100
96
CRM (A Client RelationshipManagement System)
t$tNname.#e$t M II!IsCullrsP#Nname1, OO, rsP#Nname1
t$tNph.#e$t M II!IsCullrsP#NphoneNno1, OO, rsP#NphoneNno1
t$tNdomain.#e$t M II!IsCullrsP#Ndomain1, OO, rsP#Ndomain1 t$tNemail.#e$t M II!IsCullrsP#NemailNid1, OO, rsP#NemailNid1
t$tNclientco.#e$t M II!IsCullrsP#Nclientcoordinators1, OdateO, rsP
#Nclientcoordinators1
dtNdate.Value M II!IsCullrsPDNdate1, OO, rsPDNdate1
t$tNcity.#e$t M II!IsCullrsP#N%ity1, OO, rsP#N%ity1
t$tNdis.#e$t M II!IsCullrsP#Ndis1, OO, rsP#Ndis1
t$tNpin.#e$t M II!IsCullrsPCNpin1, OO, rsPCNpin1
t$tNadd.#e$t M II!IsCullrsP#Ncoadd1, OO, rsP#Ncoadd1
t$tNstate.#e$t M II!IsCullrsP#Nstate1, OO, rsP#Nstate1
t$tNcountr.#e$t M II!IsCullrsP#Ncountry1, OO, rsP#Ncountry1 t$tN!a$.#e$t M II!IsCullrsP#N!a$1, OO, rsP#N!a$1
t$tNweb.#e$t M II!IsCullrsP#Nwebadd1, OO, rsP#Nwebadd1
t$tNintro.#e$t M II!IsCullrsP#Nintroducer1, OO, rsP#Nintroducer1
t$tNclass.#e$t M II!IsCullrsP#Nclass1, OO, rsP#Nclass1
t$tNcategory.#e$t M II!IsCullrsP#Ncategory1, OO, rsP#Ncategory1
t$tNremar&.#e$t M II!IsCullrsP#Nremar&s1, OO, rsP#Nremar&s1
#$t%add.#e$t M II!IsCullrsP#Ncoadd1, OO, rsP#Ncoadd1
#$t%city.#e$t M II!IsCullrsP#N%ity@1, OO, rsP#N%ity@1
#$t%district.#e$t M II!IsCullrsP#Ndis@1, OO, rsP#Ndis@1
#$t%0in.#e$t M II!IsCullrsPCNpin@1, OO, rsPCNpin@1
#$t%(tate.#e$t M II!IsCullrsP#Nstate@1, OO, rsP#Nstate@1
#$t%country.#e$t M II!IsCullrsP#Ncountry@1, OO, rsP#Ncountry@1
!illNlistp
8penN%lientN0rojects
End I!
End (ub
0rivate (ub 8penN%lientN0rojects18n Err 9o#o errh
Dim l$ As istItem
Dim rs As AD8DB.3ecordset
Dim lconn As AD8DB.%onnection
8/13/2019 Crm File Bca
34/100
96
CRM (A Client RelationshipManagement System)
(et lconn M 8pen%onlconn1
(et rs M lconn.E$ecuteO(EE%# clientNproject.clientNid,
clientNproject.#Nproject, 0roject.#Nname 238+ clientNproject ICCE3 U8IC0roject 8C clientNproject.#Nproject M 0roject.CNcode 5*E3E
clientNproject.clientNidM'O t$tNid.#e$t O'O1
I! rs.B82 8r rs.E82 #hen
Else
2or i M @ #o rs.3ecord%ount
2or j M @ #o lstNproj.istItems.%ount
(et l$ M lstNproj.istItemsj1
I! rsP#N0roject M Vall$.#ag1 #hen
l$.%hec&ed M #rue
End I! Ce$t j
rs.+oveCe$t
Ce$t i
End I!
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
0rivate (ub %learN%ontrols1
t$tNid.#e$t M OO
t$tNname.#e$t M OO
t$tNph.#e$t M OO
t$tNdomain.#e$t M OO
t$tNemail.#e$t M OO
t$tNclientco.#e$t M OO
dtNdate.Value M Date
t$tNadd.#e$t M OO
t$tNcity.#e$t M OO
t$tNdis.#e$t M OO
8/13/2019 Crm File Bca
35/100
96
CRM (A Client RelationshipManagement System)
t$tNpin.#e$t M OO
t$tNstate.#e$t M OO
t$tNcountr.#e$t M OO t$tN!a$.#e$t M OO
t$tNweb.#e$t M OO
t$tNintro.#e$t M OO
t$tNclass.#e$t M OO
t$tNcategory.#e$t M OO
t$tNremar&.#e$t M OO
#$t%add.#e$t M OO
#$t%city.#e$t M OO
#$t%district.#e$t M OO
#$t%0in.#e$t M OO #$t%(tate.#e$t M OO
#$t%country.#e$t M OO
save.%aption M O(aveO
cmde$it.%aption M OE$itO
cmdNdel.Enabled M 2alse
End (ub
0rivate (ub t$tNnameNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tNclientco.(et2ocus
End I!
End (ub
0rivate (ub t$tNidNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tNname.(et2ocus
End I!
End (ub
0rivate (ub t$tNaddNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
8/13/2019 Crm File Bca
36/100
96
CRM (A Client RelationshipManagement System)
t$tNcity.(et2ocus
End I!
End (ub
0rivate (ub t$tNphNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tN!a$.(et2ocus
End I!
End (ub
0rivate (ub t$tNdomainNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tNclass.(et2ocus End I!
End (ub
0rivate (ub t$tNemailNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tNweb.(et2ocus
End I!
End (ub
0rivate (ub t$tNclientcoNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
dtNdate.(et2ocus
End I!
End (ub
0rivate (ub dtNdateNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
#$t%add.(et2ocus
End I!End (ub
0rivate (ub t$tNcityNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
8/13/2019 Crm File Bca
37/100
96
CRM (A Client RelationshipManagement System)
t$tNdis.(et2ocus
End I!
End (ub
0rivate (ub t$tNdisNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tNpin.(et2ocus
End I!
End (ub
0rivate (ub t$tNpinNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tNstate.(et2ocus End I!
End (ub
0rivate (ub t$tNstateNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tNcountr.(et2ocus
End I!
End (ub
0rivate (ub t$tNcountrNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tNph.(et2ocus
End I!
End (ub
0rivate (ub t$tN!a$NFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tNemail.(et2ocus
End I!End (ub
0rivate (ub t$tNwebNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
8/13/2019 Crm File Bca
38/100
96
CRM (A Client RelationshipManagement System)
t$tNintro.(et2ocus
End I!
End (ub
0rivate (ub t$tNintroNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tNdomain.(et2ocus
End I!
End (ub
0rivate (ub t$tNclassNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tNcategory.(et2ocus End I!
End (ub
0rivate (ub t$tNcategoryNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tNremar&.(et2ocus
End I!
End (ub
0rivate (ub t$tNremar&NFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
save.(et2ocus
End I!
End (ub
0rivate (ub #$t%addNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
#$t%city.(et2ocus
End I!End (ub
0rivate (ub #$t%cityNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
8/13/2019 Crm File Bca
39/100
96
CRM (A Client RelationshipManagement System)
#$t%district.(et2ocus
End I!
End (ub
0rivate (ub #$t%districtNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
#$t%0in.(et2ocus
End I!
End (ub
0rivate (ub #$t%pinNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
#$t%(tate.(et2ocus End I!
End (ub
0rivate (ub #$t%stateNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
#$t%country.(et2ocus
End I!
End (ub
0rivate (ub #$t%countryNFey0ressFeyAscii As Integer1
I! FeyAscii M @ #hen
t$tNadd.(et2ocus
End I!
End (ub
8/13/2019 Crm File Bca
40/100
96
CRM (A Client RelationshipManagement System)
0rivate (ub cbNprojNcoordN9ot2ocus1
2ill%ombo@ O(EE%# #Nname 2rom employee 83DE3 B- #NnameO, cbNprojNcoord
8/13/2019 Crm File Bca
41/100
96
CRM (A Client RelationshipManagement System)
End (ub
0rivate (ub cbNprojNleaderN9ot2ocus1 2ill%ombo@ O(EE%# #Nname 2rom employee 83DE3 B- #NnameO, cbNprojNleader
End (ub
0rivate (ub 1
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
I! t$tNcode.#e$t M OO #hen
+sgBo$ O0lease !ill the code valueO, vb%ritical
t$tNcode.(et2ocus E$it (ub
End I!
I! t$tNname.#e$t M OO #hen
+sgBo$ O0lease !ill the project nameO, vb%ritical
t$tNname.(et2ocus
E$it (ub
End I!
I! cmdNsave.%aption S< O+odi!yO #hen
lconn.Begin#rans
lconn.E$ecute OIC(E3# IC#8 project CNcode, #Nname,#Ndomain,DNstartNdt,
DNdelvrNdt, #NprojNlead, #NprojN%oordinators1O N
OVA/E('O t$tNcode.#e$t O','O t$tNname.#e$t O','O t$tNdomain.#e$t
O',TO %DatedtNstNdt.Value1 OT,TO %DatedtNdelNdt.Value1 OT,'O
cbNprojNleader.#e$t O','O cbNprojNcoord.#e$t O'1O
lconn.%ommit#rans
+sgBo$ OData (aved (uccess!ully.O, vbIn!ormation, +e.%aption
Else
lconn.E$ecute O/0DA#E project (E# CNcodeM'O t$tNcode.#e$t O', #NnameM'O
t$tNname.#e$t O', DNstartNdtMTO %DatedtNstNdt.Value1 OT,DNdelvrNdtMTO %DatedtNdelNdt.Value1 OT,#NprojNleadM'O cbNprojNleader.#e$t O',
#NprojN%oordinatorsM' O cbNprojNcoord.#e$t O ' where CNcodeM'O t$tNcode.#e$t
O' O
+sgBo$ OData +odi!y (uccess!ully.O, vbIn!ormation, +e.%aption
8/13/2019 Crm File Bca
42/100
96
CRM (A Client RelationshipManagement System)
End I!
%learN%ontrols
lstvNmod.istItems.%lear 2illNist
cmdNdel.Enabled M #rue
E$it (ub
End (ub
0rivate (ub 2illNist1
8n Err 9o#o errh
Dim l$ As istItem
Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset
(et lconn M 8pen%onlconn1
lstvNproj.istItems.%lear
(et rs M lconn.E$ecuteO(EE%# project.CNcode, project.#Nname, project.DNstartNdt,
project.DNdelvrNdt,project.#NprojNlead !rom project 83DE3 B- project.#NnameO1
I! rs.B82 8r rs.E82 #hen
Else
2or i M @ #o rs.3ecord%ount
(et l$ M lstvNproj.istItems.Add, , lstvNproj.istItems.%ount R @1
l$.(ubItems@1 M II!IsCullrsPCNcode1, OO, rsPCNcode1
l$.(ubItems=1 M II!IsCullrsP#Nname1, OO, rsP#Nname1
l$.(ubItems1 M II!IsCullrsPDNstartNdt1, OO, rsPDNstartNdt1
l$.(ubItemsJ1 M II!IsCullrsPDNdelvrNdt1, OO, rsPDNdelvrNdt1
l$.(ubItemsK1 M II!IsCullrsP#NprojNlead1, OO, rsP#NprojNlead1
rs.+oveCe$t
Ce$t i
End I!
E$it (uberrh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
8/13/2019 Crm File Bca
43/100
96
CRM (A Client RelationshipManagement System)
End (ub
0rivate (ub cmdNe$itN%lic&1I! cmdNe$it.%aption S< O%ancelO #hen
/nload +e
Else
cmdNsave.%aption M OsaveO
%learN%ontrols
cmdNe$it.%aption M Oe$itO
End I!
End (ub
0rivate (ub cmdNdelN%lic&18n Err 9o#o errh
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
ans M +sgBo$ODo -ou 3eally 5ant #o Delete #he (elected Data.O, vb4uestion R
vb-esCo, +e.%aption1
I! ans M ) #hen
lconn.E$ecute ODelete 2rom project where CNcodeM'O t$tNcode.#e$t O'O
lconn.E$ecute ODelete 238+ moduleN@ where 2FNcodeM'O t$tNcode.#e$t O'O
+sgBo$ OData Delete (uccess!ully.O, vbIn!ormation, +e.%aption
End I!
lstvNmod.istItems.%lear
%learN%ontrols
2illNist
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub 3esume
End (ub
0rivate (ub lstvNprojNDbl%lic&1
8/13/2019 Crm File Bca
44/100
96
CRM (A Client RelationshipManagement System)
Dim rs As AD8DB.3ecordset
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1 cmdNsave.%aption M O+odi!yO
cmdNdel.Enabled M #rue
cmdNe$it.%aption M O%ancelO
Dim l$ As istItem
(et l$ M lstvNproj.(electedItem
t$tNcode.#e$t M l$.(ubItems@1
(et rs M lconn.E$ecuteO(elect !rom project where CN%ode M 'O t$tNcode.#e$t
O'O1
I! rs.E82 8r rs.B82 #hen
Else t$tNname.#e$t M II!IsCullrsP#Nname1, OO, rsP#Nname1
t$tNdomain.#e$t M II!IsCullrsP#Ndomain1, OO, rsP#Ndomain1
dtNstNdt.Value M II!IsCullrsPDNstartNdt1, OO, rsPDNstartNdt1
dtNdelNdt.Value M II!IsCullrsPDNdelvrNdt1, OO, rsPDNdelvrNdt1
cbNprojNleader.#e$t M II!IsCullrsP#NprojNlead1, OO, rsP#NprojNlead1
cbNprojNcoord.#e$t M II!IsCullrsP#NprojN%oordinators1, OO, rsP
#NprojN%oordinators1
End I!
lstvNmod.istItems.%lear
(et rs M lconn.E$ecuteOselect 2rom moduleN@ where 2FNcode M 'O
t$tNcode.#e$t O'O1
I! rs.E82 8r rs.B82 #hen
Else
2or i M @ #o rs.3ecord%ount
(et l$ M lstvNmod.istItems.Add, , lstvNmod.istItems.%ount R @1
l$.(ubItems@1 M II!IsCullrsP#Nmodule1, OO, rsP#Nmodule1
l$.(ubItems=1 M II!IsCullrsPCNpriority1, OO, rsPCNpriority1
l$.(ubItems1 M II!IsCullrsP#Ndescription1, OO, rsP#Ndescription1 rs.+oveCe$t
Ce$t i
End I!
End (ub
8/13/2019 Crm File Bca
45/100
8/13/2019 Crm File Bca
46/100
96
CRM (A Client RelationshipManagement System)
(et lrs M lconn.E$ecuteO(elect !rom moduleN@ where 2FN%ode M 'O
t$tNcode.#e$t O'O1
I! lrs.E82 8r lrs.B82 #hen
Else
(et l$ M lstvNmod.(electedItem
t$tNmodule.#e$t M l$.(ubItems@1
t$tNprior.#e$t M l$.(ubItems=1
t$tNdescr.#e$t M l$.(ubItems1
lstvNmod.istItems.3emove lstvNmod.(electedItem.Inde$1
lconn.E$ecute ODelete 2rom moduleN@ where #Nmodule M 'O
t$tNmodule.#e$t O'O
End I!End (ub
0rivate (ub %learN%ontrols1
t$tNcode.#e$t M OO
t$tNname.#e$t M OO
t$tNdomain.#e$t M OO
dtNdelNdt.Value M Date
dtNstNdt.Value M Date
cbNprojNleader.#e$t M OO
cbNprojNcoord.#e$t M OO
t$tNmodule.#e$t M OO
t$tNprior.#e$t M OO
t$tNdescr.#e$t M OO
End (ub
0rivate (ub !illNlistm1
8n Err 9o#o errh
Dim l$ As istItem
Dim lconn As AD8DB.%onnectionDim rs As AD8DB.3ecordset
(et lconn M 8pen%onlconn1
lconn.Begin#rans
8/13/2019 Crm File Bca
47/100
96
CRM (A Client RelationshipManagement System)
lconn.E$ecute OIC(E3# IC#8 moduleN@ #Nmodule,CNpriority, #Ndescription,
2FNcode1O N
OVA/E('O t$tNmodule.#e$t O',O Valt$tNprior.#e$t1 O,'O t$tNdescr.#e$t O','O t$tNcode.#e$t O'1O
lconn.%ommit#rans
lstvNmod.istItems.%lear
(et rs M lconn.E$ecuteO(EE%# 2rom moduleN@ where 2FNcodeM'O
t$tNcode.#e$t O' 83DE3 B- [email protected]
I! rs.B82 8r rs.E82 #hen
Else
2or i M @ #o rs.3ecord%ount
(et l$ M lstvNmod.istItems.Add, , lstvNmod.istItems.%ount R @1
l$.(ubItems@1 M II!IsCullrsP#Nmodule1, OO, rsP#Nmodule1 l$.(ubItems=1 M II!IsCullrsPCNpriority1, OO, rsPCNpriority1
l$.(ubItems1 M II!IsCullrsP#Ndescription1, OO, rsP#Ndescription1
t$tNmodule.#e$t M OO
t$tNprior.#e$t M OO
t$tNdescr.#e$t M OO
t$tNmodule.(et2ocus
rs.+oveCe$t
Ce$t i
End I!
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
8/13/2019 Crm File Bca
48/100
96
CRM (A Client RelationshipManagement System)
0rivate (ub 1
2ill%ombo@ O(EE%# #Nstate 2rom state 83DE3 B- #NstateO, cbNstate
End (ub
0rivate (ub %learN%ontrols1
t$tNcode.#e$t M OO
8/13/2019 Crm File Bca
49/100
96
CRM (A Client RelationshipManagement System)
t$tNname.#e$t M OO
t$tN!Nname.#e$t M OO
t$tNadd.#e$t M OOt$tNcity.#e$t M OO
t$tNpin.#e$t M OO
cbNstate.#e$t M OO
t$tNph.#e$t M OO
t$tN!a$.#e$t M OO
t$tNemail.#e$t M OO
t$tNprt.#e$t M OO
t$tNyear.#e$t M OO
t$tNper.#e$t M OOt$tNgrd.#e$t M OO
t$tNuniv.#e$t M OO
t$tNrem.#e$t M OO
t$tNdsgn M OO
End (ub
0rivate (ub cmdNdelN%lic&1
8n Err 9o#o errh
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
ans M +sgBo$ODo -ou 3eally 5ant #o Delete #he (elected Data.O, vb4uestion R
vb-esCo, +e.%aption1
I! ans M ) #hen
lconn.E$ecute ODelete 2rom employee where CNcodeM'O t$tNcode.#e$t O'O
lconn.E$ecute ODelete 2rom 7uali!ication where 2FNempcodeM'O t$tNcode.#e$t
O'O
+sgBo$ OData Delete (uccess!ully.O, vbIn!ormation, +e.%aption
End I!
cmdNsave.%aption M OsaveO lstvN7uali.istItems.%lear
%learN%ontrols
2illNist
E$it (ub
8/13/2019 Crm File Bca
50/100
96
CRM (A Client RelationshipManagement System)
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub 3esume
End (ub
0rivate (ub cmdNe$itN%lic&1
I! cmdNe$it.%aption S< O%ancelO #hen
/nload +e
Else
cmdNsave.%aption M OsaveO
%learN%ontrolscmdNe$it.%aption M Oe$itO
End I!
End (ub
0rivate (ub cmdNopenN%lic&1
cmdNsave.%aption M O+odi!yO
cmdNdel.Enabled M #rue
cmdNe$it.%aption M O%ancelO
End (ub
0rivate (ub cmdNsaveN%lic&1
Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset
(et lconn M 8pen%onlconn1
Dim gnd, ms As (tring
(et rs M lconn.E$ecuteO(EE%# employee.CNcode !rom employee O1
I! 8ptNmale.Value M #rue #hen
gnd M OmaleO
Else gnd M O!emaleO
End I!
I! 8ptNmrd.Value M #rue #hen
ms M OmarriedO
8/13/2019 Crm File Bca
51/100
96
CRM (A Client RelationshipManagement System)
Else
ms M OunmarriedO
End I! I! t$tNcode.#e$t M OO #hen
+sgBo$ O0lease !ill the code valueO, vb%ritical
t$tNcode.(et2ocus
E$it (ub
End I!
I! t$tNname.#e$t M OO #hen
+sgBo$ O0lease !ill the nameO, vb%ritical
t$tNname.(et2ocus
E$it (ub
End I!
I! cmdNsave.%aption S< O+odi!yO #hen
(et rs M lconn.E$ecuteO(EE%# employee.CNcode !rom employee O1
2or i M @ #o rs.3ecord%ount
(et l$ M stvNrec.istItems
j M II!IsCullrsPCNcode1, OO, rsPCNcode1
I! t$tNcode.#e$t M j1 #hen
+sgBo$ O%ode E$istP 0lease !ill another code valueO, vb%ritical
t$tNcode.#e$t M OO
t$tNcode.(et2ocus
E$it (ub
End I!
rs.+oveCe$t
Ce$t i
lconn.Begin#rans
lconn.E$ecute OIC(E3# IC#8 employee CNcode, #Nname,DND8B,
#N!atherNname, #Ngender, #NmaritalNstatus,#Naddress,#Ncity, CNpin, #Nstate,#N!a$,#Nphone,#Nemail,DND8U,#Ndesignation1O N
OVA/E('O t$tNcode.#e$t O','O t$tNname.#e$t O',TO
%DatedtNbirth.Value1 OT,'O t$tN!Nname.#e$t O','O gnd O', 'O ms O',' O
t$tNadd.#e$t O ','O t$tNcity.#e$t O',O Valt$tNpin.#e$t1 O,'O cbNstate.#e$t O',O
8/13/2019 Crm File Bca
52/100
96
CRM (A Client RelationshipManagement System)
Valt$tN!a$.#e$t1 O,'O t$tNph.#e$t O','O t$tNemail.#e$t O',TO
%DatedtNbirth.Value1 OT,'O t$tNdsgn.#e$t O'1O
lconn.%ommit#rans +sgBo$ OData (aved (uccess!ully.O, vbIn!ormation, +e.%aption
Else
I! 8ptNmale.Value M #rue #hen
gnd M OmaleO
Else
gnd M O!emaleO
End I!
I! 8ptNmrd.Value M #rue #hen
ms M OmarriedO
Else ms M OunmarriedO
End I!
lconn.E$ecute O/pdate employee set CNcodeM'O t$tNcode.#e$t O', #NnameM'O
t$tNname.#e$t O', DND8BMTO %DatedtNbirth.Value1 OT,#N!atherNnameM'O
t$tN!Nname.#e$t O',DND8UMTO %DatedtNjoin.Value1 OT,#NaddressM'O
t$tNadd.#e$t O',#NgenderM'O gnd O', #NmaritalNstatusM'O ms O',#NcityM'O
t$tNcity.#e$t O',CNpinMO Valt$tNpin.#e$t1 O,#NstateM'O cbNstate.#e$t
O',#NphoneM'O t$tNph.#e$t O',#N!a$M'O t$tN!a$.#e$t O',#NemailM'O t$tNemail.#e$t
O',#NdesignationM'O t$tNdsgn.#e$t O' where CNcodeM'O t$tNcode.#e$t O' O
+sgBo$ OData +odi!y (uccess!ully.O, vbIn!ormation, +e.%aption
End I!
%learN%ontrols
lstvN7uali.istItems.%lear
2illNist
E$it (ub
End (ub
0rivate (ub 2illNist1
8n Err 9o#o errh
Dim l$ As istItem
Dim lconn As AD8DB.%onnection
8/13/2019 Crm File Bca
53/100
96
CRM (A Client RelationshipManagement System)
Dim rs As AD8DB.3ecordset
(et lconn M 8pen%onlconn1
stvNrec.istItems.%lear(et rs M lconn.E$ecuteO(EE%# employee.CNcode, employee.#Nname,
employee.#N!atherNname, employee.#Ngender,
employee.#Naddress,employee.#Ncity, employee.#Nphone 2rom employee
83DE3 B- employee.#NnameO1
I! rs.B82 8r rs.E82 #hen
Else
2or i M @ #o rs.3ecord%ount
(et l$ M stvNrec.istItems.Add, , stvNrec.istItems.%ount R @1 l$.(ubItems@1 M II!IsCullrsPCNcode1, OO, rsPCNcode1
l$.(ubItems=1 M II!IsCullrsP#Nname1, OO, rsP#Nname1
l$.(ubItems1 M II!IsCullrsP#N!atherNname1, OO, rsP#N!atherNname1
l$.(ubItemsJ1 M II!IsCullrsP#Ngender1, OO, rsP#Ngender1
l$.(ubItemsK1 M II!IsCullrsP#NAddress1, OO, rsP#NAddress1
l$.(ubItems)1 M II!IsCullrsP#N%ity1, OO, rsP#N%ity1
l$.(ubItemsL1 M II!IsCullrsP#Nphone1, OO, rsP#Nphone1
rs.+oveCe$t
Ce$t i
End I!
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
0rivate (ub !illNlist718n Err 9o#o errh
'Dim l$ As istItem
Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset
8/13/2019 Crm File Bca
54/100
96
CRM (A Client RelationshipManagement System)
(et lconn M 8pen%onlconn1
(et rs M lconn.E$ecuteO(EE%# 7uali!ication.#Nparticular !rom 7uali!ication where2FNempcodeM'O t$tNcode.#e$t O'O1
2or i M @ #o rs.3ecord%ount
(et l$ M lstvN7uali.istItems
j M II!IsCullrsP#Nparticular1, OO, rsP#Nparticular1
I! t$tNprt.#e$t M j1 #hen
+sgBo$ O0articular E$istP 0lease !ill another particular valueO, vb%ritical
t$tNprt.#e$t M OO
t$tNyear.#e$t M OO
t$tNper.#e$t M OO
t$tNgrd.#e$t M OOt$tNuniv.#e$t M OO
t$tNrem.#e$t M OO
t$tNprt.(et2ocus
E$it (ub
End I!
rs.+oveCe$t
Ce$t i
lconn.Begin#rans
lconn.E$ecute OIC(E3# IC#8 7uali!ication #Nparticular,CNyear,
CNpercent,#Ngrade,#Nboarduniv, #Nremar&s, 2FNempcode1O N
OVA/E('O t$tNprt.#e$t O',O Valt$tNyear.#e$t1 O,O Valt$tNper.#e$t1 O
,'O t$tNgrd.#e$t O','O t$tNuniv.#e$t O','O t$tNrem.#e$t O','O t$tNcode.#e$t O'1O
lconn.%ommit#rans
lstvN7uali.istItems.%lear
(et rs M lconn.E$ecuteO(EE%# 2rom 4uali!ication where 2FNempcodeM'O
t$tNcode.#e$t O' 83DE3 B- 4uali!ication.CNyearO1 I! rs.B82 8r rs.E82 #hen
Else
2or i M @ #o rs.3ecord%ount
(et l$ M lstvN7uali.istItems.Add, , lstvN7uali.istItems.%ount R @1
8/13/2019 Crm File Bca
55/100
96
CRM (A Client RelationshipManagement System)
l$.(ubItems@1 M II!IsCullrsP#Nparticular1, OO, rsP#Nparticular1
l$.(ubItems=1 M II!IsCullrsPCNyear1, OO, rsPCNyear1
l$.(ubItems1 M II!IsCullrsPCNpercent1, OO, rsPCNpercent1 l$.(ubItemsJ1 M II!IsCullrsP#Ngrade1, OO, rsP#Ngrade1
l$.(ubItemsK1 M II!IsCullrsP#Nboarduniv1, OO, rsP#Nboarduniv1
l$.(ubItems)1 M II!IsCullrsP#Nremar&s1, OO, rsP#Nremar&s1
t$tNprt.#e$t M OO
t$tNyear.#e$t M OO
t$tNper.#e$t M OO
t$tNgrd.#e$t M OO
t$tNuniv.#e$t M OO
t$tNrem.#e$t M OO
t$tNprt.(et2ocus
rs.+oveCe$t
Ce$t i
End I!
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
0rivate (ub %ommand@N%lic&1
I! t$tNprt.#e$t M OO #hen
+sgBo$ O0lease !ill the particularsO, vb%ritical
t$tNprt.(et2ocus
E$it (ub
End I!
I! t$tNper.#e$t M OO #hen
+sgBo$ O0lease !ill the percentageO, vb%ritical
t$tNper.(et2ocus
E$it (ub
8/13/2019 Crm File Bca
56/100
96
CRM (A Client RelationshipManagement System)
End I!
I! t$tNper.#e$t < @>> 8r t$tNper.#e$t S > #hen
+sgBo$ O0lease !ill the correct percentageO, vb%ritical t$tNper.(et2ocus
E$it (ub
End I!
!illNlist7
End (ub
0rivate (ub %ommand=N%lic&1
Dim lconn As AD8DB.%onnection
Dim lrs As AD8DB.3ecordset
Dim l$ As istItemDim i As (tring
(et lconn M 8pen%onlconn1
(et l$ M lstvN7uali.(electedItem
I! t$tNprt.#e$t S< OO #hen
t$tNprt.#e$t M OO
t$tNyear.#e$t M OO
t$tNper.#e$t M OO
t$tNgrd.#e$t M OO
t$tNuniv.#e$t M OO
t$tNrem.#e$t M OO
t$tNprt.(et2ocus
Else
lconn.E$ecute Odelete !rom 7uali!ication where CNpercent M i O1
End I!
End (ub
0rivate (ub 2ormNoad1
2illNist
End (ub
0rivate (ub lstvN7ualiNDbl%lic&1
I! lstvN7uali.istItems.%ount M > #hen E$it (ub
Dim lconn As AD8DB.%onnection
8/13/2019 Crm File Bca
57/100
96
CRM (A Client RelationshipManagement System)
Dim lrs As AD8DB.3ecordset
Dim l$ As istItem
(et lconn M 8pen%onlconn1 (et lrs M lconn.E$ecuteO(elect !rom 7uali!ication where 2FNemp%ode M 'O
t$tNcode.#e$t O'O1
I! lrs.E82 8r lrs.B82 #hen
Else
(et l$ M lstvN7uali.(electedItem
t$tNprt.#e$t M l$.(ubItems@1
t$tNyear.#e$t M l$.(ubItems=1
t$tNper.#e$t M l$.(ubItems1
t$tNgrd.#e$t M l$.(ubItemsJ1 t$tNuniv.#e$t M l$.(ubItemsK1
t$tNrem.#e$t M l$.(ubItems)1
l$.ist(ubItems.3emove @1
l$.ist(ubItems.3emove @1
l$.ist(ubItems.3emove @1
l$.ist(ubItems.3emove @1
l$.ist(ubItems.3emove @1
lstvN7uali.istItems.3emove lstvN7uali.(electedItem.Inde$1
lconn.E$ecute ODelete 2rom 7uali!ication where #Nparticular M 'O t$tNprt.#e$t
O'O
End I!
End (ub
0rivate (ub stvNrecNDbl%lic&1
Dim rs As AD8DB.3ecordset
Dim lconn As AD8DB.%onnection
Dim s As (tring
(et lconn M 8pen%onlconn1 cmdNsave.%aption M O+odi!yO
cmdNdel.Enabled M #rue
cmdNe$it.%aption M O%ancelO
Dim l$ As istItem
8/13/2019 Crm File Bca
58/100
96
CRM (A Client RelationshipManagement System)
(et l$ M stvNrec.(electedItem
t$tNcode.#e$t M l$.(ubItems@1(et rs M lconn.E$ecuteO(elect !rom employee where CN%ode M 'O
t$tNcode.#e$t O'O1
I! rs.E82 8r rs.B82 #hen
Else
t$tNname.#e$t M II!IsCullrsP#Nname1, OO, rsP#Nname1
t$tN!Nname.#e$t M II!IsCullrsP#N!atherNname1, OO, rsP#N!atherNname1
s M II!IsCullrsP#Ngender1, OO, rsP#Ngender1
I! s M OmaleO1 #hen 8ptNmale.Value M #rue
Else
8ptN!ml.Value M #rue
End I!
s M II!IsCullrsP#N+aritalN(tatus1, OO, rsP#N+aritalN(tatus1
I! s M OmarriedO1 #hen
8ptNmrd.Value M #rue
Else
8ptNunmrd.Value M #rue
End I!
t$tNadd.#e$t M II!IsCullrsP#NAddress1, OO, rsP#NAddress1
t$tNcity.#e$t M II!IsCullrsP#N%ity1, OO, rsP#N%ity1
dtNbirth.Value M II!IsCullrsPDND8B1, OO, rsPDND8B1
dtNjoin.Value M II!IsCullrsPDND8U1, OO, rsPDND8U1
t$tNadd.#e$t M II!IsCullrsP#NAddress1, OO, rsP#NAddress1
t$tNcity.#e$t M II!IsCullrsP#N%ity1, OO, rsP#N%ity1
t$tNpin.#e$t M II!IsCullrsPCNpin1, OO, rsPCNpin1
cbNstate.#e$t M II!IsCullrsP#Nstate1, OO, rsP#Nstate1
t$tNph.#e$t M II!IsCullrsP#Nphone1, OO, rsP#Nphone1 t$tN!a$.#e$t M II!IsCullrsP#N!a$1, OO, rsP#N!a$1
t$tNemail.#e$t M II!IsCullrsP#Nemail1, OO, rsP#Nemail1
t$tNdsgn.#e$t M II!IsCullrsP#Ndesignation1, OO, rsP#Ndesignation1
8/13/2019 Crm File Bca
59/100
96
CRM (A Client RelationshipManagement System)
End I!
lstvN7uali.istItems.%lear
(et rs M lconn.E$ecuteO(elect !rom 7uali!ication where 2FNemp%ode M'O t$tNcode.#e$t O'O1
I! rs.E82 8r rs.B82 #hen
Else
2or i M @ #o rs.3ecord%ount
(et l$ M lstvN7uali.istItems.Add, , lstvN7uali.istItems.%ount R @1
l$.(ubItems@1 M II!IsCullrsP#Nparticular1, OO, rsP#Nparticular1
l$.(ubItems=1 M II!IsCullrsPCNyear1, OO, rsPCNyear1
l$.(ubItems1 M II!IsCullrsPCNpercent1, OO, rsPCNpercent1
l$.(ubItemsJ1 M II!IsCullrsP#Ngrade1, OO, rsP#Ngrade1
l$.(ubItemsK1 M II!IsCullrsP#Nboarduniv1, OO, rsP#Nboarduniv1
l$.(ubItems)1 M II!IsCullrsP#Nremar&s1, OO, rsP#Nremar&s1
rs.+oveCe$t
Ce$t i
End I!
End (ub
8/13/2019 Crm File Bca
60/100
96
CRM (A Client RelationshipManagement System)
8/13/2019 Crm File Bca
61/100
96
CRM (A Client RelationshipManagement System)
0rivate (ub cbNempNnameN%lic&1
cbNcode.istInde$ M cbNempNname.istInde$
End (ub
0rivate (ub cbNempNnameN9ot2ocus1
2ill%ombo@ O(EE%# employee.#Nname 2rom employee 83DE3 B-employee.#NnameO, cbNempNname
8/13/2019 Crm File Bca
62/100
96
CRM (A Client RelationshipManagement System)
2ill%ombo@ O(EE%# employee.CNcode 2rom employee 83DE3 B-
employee.#NnameO, cbNcode
End (ub
0rivate (ub cbNempNnameNFeyDownFey%ode As Integer, (hi!t As Integer1
cbNcode.istInde$ M cbNempNname.istInde$
End (ub
0rivate (ub cbNempNnameNFey0ressFeyAscii As Integer1
cbNcode.istInde$ M cbNempNname.istInde$
End (ub
0rivate (ub cbNempNnameNost2ocus1 cbNcode.istInde$ M cbNempNname.istInde$
End (ub
0rivate (ub %learN%ontrols1
Dtp2romDate.Value M Date
Dtp#oDate.Value M Date
D#Ndate.Value M Date
cbNempNname.#e$t M OO
cbNcode.#e$t M OO
cbNprojNname.#e$t M OO
cbNmodule.#e$t M OO
t$tNduration.#e$t M OO
t$tNdesc.#e$t M OO
End (ub
0rivate (ub cmdNsaveN%lic&1
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
I! cmdNsave.%aption S< O+odi!yO #hen lconn.Begin#rans
lconn.E$ecute OIC(E3# IC#8 5ee&ly DNstartNdate, DNendNdate,
#NempNname, DNdate, #N0roject, #Nmodule,CNduration, #Ndescription1O N
8/13/2019 Crm File Bca
63/100
96
CRM (A Client RelationshipManagement System)
OVA/E(TO %DateDtp2romDate.Value1 OT,TO %DateDtp#oDate.Value1
OT,'O cbNempNname.#e$t O',TO %DateD#Ndate.Value1 OT,'O
cbNprojNname.#e$t O','O cbNmodule.#e$t O','O t$tNduration.#e$t O','O t$tNdesc.#e$t O'1O
lconn.%ommit#rans
+sgBo$ OData (aved (uccess!ully.O, vbIn!ormation, +e.%aption
Else
lconn.E$ecute O/0DA#E 5ee&ly (E# DNstartNdateMTO
%DateDtp2romDate.Value1 OT, DNendNdateMTO %DateDtp#oDate.Value1 OT,
#NempNnameM'O cbNempNname.#e$t O',DNdateMTO %DateD#Ndate.Value1
OT,#N0rojectM'O cbNprojNname.#e$t O', #NmoduleM' O cbNmodule.#e$t O
',CNdurationMO Valt$tNduration.#e$t1 O, #NdescriptionM'O t$tNdesc.#e$t O' where
#NempNnameM'O cbNempNname.#e$t O'and DNstartNdateMTO %DateDtp2romDate.Value1 OT O
+sgBo$ OData +odi!y (uccess!ully.O, vbIn!ormation, +e.%aption
End I!
%learN%ontrols
stNrec.istItems.%lear
2illNist
cmdNe$it.%aption M OcancelO
E$it (ub
End (ub
0rivate (ub %mdAddN%lic&1
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
Dim rs As istItem
(et l$ M stNrec.istItems.Add, , stNrec.istItems.%ount R @1
l$.(ubItems@1 M D#Ndate.Value
l$.(ubItems=1 M cbNempNname.#e$t
l$.(ubItems1 M cbNprojNname.#e$t
l$.(ubItemsJ1 M cbNmodule.#e$t l$.(ubItemsK1 M t$tNduration.#e$t
l$.(ubItems)1 M t$tNdesc.#e$t
End (ub
8/13/2019 Crm File Bca
64/100
96
CRM (A Client RelationshipManagement System)
0rivate (ub Dtp2romDateNFeyDownFey%ode As Integer, (hi!t As Integer1
I! Fey%ode M @ #hen
Dtp#oDate.Value M DateAddOdO, L, Dtp2romDate.Value1 Dtp2romDate.(et2ocus
End I!
End (ub
0rivate (ub 2ormNoad1
Dtp2romDate.Value M Date
Dtp#oDate.Value M DateAddOdO, L, Dtp2romDate.Value1
2illNist
End (ub
0rivate (ub cbNmoduleN9ot2ocus1
Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset
(et lconn M 8pen%onlconn1
(et rs M lconn.E$ecuteO(EE%# CNcode !rom project where #NnameM'O
cbNprojNname.#e$t O' O1
n M II!IsCullrsPCNcode1, OO, rsPCNcode1
2ill%ombo@ O(EE%# #Nmodule 2rom moduleN@ where 2FNcodeM'O n O' O,
cbNmodule
End (ub
0rivate (ub cbNprojNnameN9ot2ocus1
2ill%ombo@ O(EE%# #Nname 2rom project 83DE3 B- #NnameO, cbNprojNname
End (ub
0rivate (ub 2illNist1
8n Err 9o#o errhDim l$ As istItem
Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset
(et lconn M 8pen%onlconn1
8/13/2019 Crm File Bca
65/100
96
CRM (A Client RelationshipManagement System)
stNrec.istItems.%lear
(et rs M lconn.E$ecuteO(EE%# 2rom 5ee&ly order by 5ee&ly.DNstartNdateO1
I! rs.B82 8r rs.E82 #henElse
2or i M @ #o rs.3ecord%ount
(et l$ M stNrec.istItems.Add, , stNrec.istItems.%ount R @1
l$.(ubItems@1 M II!IsCullrsPDNdate1, OO, rsPDNdate1
l$.(ubItems=1 M II!IsCullrsP#NempNname1, OO, rsP#NempNname1
l$.(ubItems1 M II!IsCullrsP#N0roject1, OO, rsP#N0roject1
l$.(ubItemsJ1 M II!IsCullrsP#Nmodule1, OO, rsP#Nmodule1
l$.(ubItemsK1 M II!IsCullrsPCNduration1, OO, rsPCNduration1
l$.(ubItems)1 M II!IsCullrsP#Ndescription1, OO, rsP#Ndescription1
rs.+oveCe$t
Ce$t i
End I!
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
0rivate (ub cmdNe$itN%lic&1
I! cmdNe$it.%aption S< O%ancelO #hen
/nload +e
Else
2illNist
cmdNsave.%aption M OsaveO
%learN%ontrols
cmdNe$it.%aption M Oe$itO
End I!End (ub
0rivate (ub cmdNopenN%lic&1
Dim rs As AD8DB.3ecordset
8/13/2019 Crm File Bca
66/100
96
CRM (A Client RelationshipManagement System)
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
cmdNsave.%aption M O+odi!yO cmdNdel.Enabled M #rue
cmdNe$it.%aption M O%ancelO
Dim l$ As istItem
(et l$ M stNrec.(electedItem
stNrec.istItems.%lear
(et rs M lconn.E$ecuteO(elect !rom 5ee&ly where DNdate BE#5EEC TO
%DateDtp2romDate.Value1 OT ACD TO %DateDtp#oDate.Value1 OTO1
I! rs.E82 8r rs.B82 #hen
Else
2or i M @ #o rs.3ecord%ount (et l$ M stNrec.istItems.Add, , stNrec.istItems.%ount R @1
l$.(ubItems@1 M II!IsCullrsPDNdate1, OO, rsPDNdate1
l$.(ubItems=1 M II!IsCullrsP#NempNname1, OO, rsP#NempNname1
l$.(ubItems1 M II!IsCullrsP#N0roject1, OO, rsP#N0roject1
l$.(ubItemsJ1 M II!IsCullrsP#Nmodule1, OO, rsP#Nmodule1
l$.(ubItemsK1 M II!IsCullrsPCNduration1, OO, rsPCNduration1
l$.(ubItems)1 M II!IsCullrsP#Ndescription1, OO, rsP#Ndescription1
rs.+oveCe$t
Ce$t
End I!
End (ub
0rivate (ub cmdNdelN%lic&1
8n Err 9o#o errh
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
ans M +sgBo$ODo -ou 3eally 5ant #o Delete #he (elected Data.O, vb4uestion Rvb-esCo, +e.%aption1
I! ans M ) #hen
lconn.E$ecute ODelete 2rom 5ee&ly where #NempNnameM'O
cbNempNname.#e$t O'and DNdateMTO %DateD#Ndate.Value1 OT O
8/13/2019 Crm File Bca
67/100
96
CRM (A Client RelationshipManagement System)
+sgBo$ OData Delete (uccess!ully.O, vbIn!ormation, +e.%aption
End I!
cmdNsave.%aption M OsaveO %learN%ontrols
2illNist
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
0rivate (ub lstNrecNDbl%lic&1
Dim rs As AD8DB.3ecordset
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
cmdNsave.%aption M O+odi!yO
cmdNdel.Enabled M #rue
cmdNe$it.%aption M O%ancelO
Dim l$ As istItem
(et l$ M stNrec.(electedItem
D#Ndate.Value M l$.(ubItems@1
cbNempNname.#e$t M l$.(ubItems=1
(et rs M lconn.E$ecuteO(elect !rom wee&ly where #NempNname M 'O
cbNempNname.#e$t O' and DNdateMTO %DateD#Ndate.Value1 OT O1
I! rs.E82 8r rs.B82 #hen
Else
Dtp2romDate.Value M II!IsCullrsPDNstartNdate1, OO, rsPDNstartNdate1
cbNempNname.#e$t M II!IsCullrsP#NempNname1, OO, rsP#NempNname1 cbNprojNname.#e$t M II!IsCullrsP#N0roject1, OO, rsP#N0roject1
cbNmodule.#e$t M II!IsCullrsP#Nmodule1, OO, rsP#Nmodule1
t$tNduration.#e$t M II!IsCullrsPCNduration1, OO, rsPCNduration1
t$tNdesc.#e$t M II!IsCullrsP#Ndescription1, OO, rsP#Ndescription1
8/13/2019 Crm File Bca
68/100
96
CRM (A Client RelationshipManagement System)
End I!
End (ub
8/13/2019 Crm File Bca
69/100
96
CRM (A Client RelationshipManagement System)
0rivate (ub cbNempNnameN%lic&1
cbNcode.istInde$ M cbNempNname.istInde$
End (ub
0rivate (ub cbNempNnameN9ot2ocus1
2ill%ombo@ O(elect #Nname !rom employee 83DE3 B- #NnameO, cbNempNname
2ill%ombo@ O(EE%# CNcode 2rom employee 83DE3 B- #NnameO, cbNcode
End (ub
0rivate (ub cbNempNnameNFeyDownFey%ode As Integer, (hi!t As Integer1
8/13/2019 Crm File Bca
70/100
96
CRM (A Client RelationshipManagement System)
cbNcode.istInde$ M cbNempNname.istInde$
End (ub
0rivate (ub cbNempNnameNFey0ressFeyAscii As Integer1
cbNcode.istInde$ M cbNempNname.istInde$
End (ub
0rivate (ub cbNempNnameNost2ocus1
cbNcode.istInde$ M cbNempNname.istInde$
End (ub
0rivate (ub cbNmoduleN9ot2ocus1Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset
(et lconn M 8pen%onlconn1
(et rs M lconn.E$ecuteO(EE%# CNcode !rom project where #NnameM'O
cbNprojNname.#e$t O' O1
n M II!IsCullrsPCNcode1, OO, rsPCNcode1
2ill%ombo@ O(EE%# #Nmodule 2rom moduleN@ where 2FNcodeM'O n O' O,
cbNmodule
End (ub
0rivate (ub cbNprojNnameN9ot2ocus1
2ill%ombo@ O(EE%# #Nname 2rom project 83DE3 B- #NnameO, cbNprojNname
End (ub
0rivate (ub cbNstatusN9ot2ocus1
cbNstatus.ist
End (ub
0rivate (ub cmdNdelN%lic&18n Err 9o#o errh
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
8/13/2019 Crm File Bca
71/100
96
CRM (A Client RelationshipManagement System)
ans M +sgBo$ODo -ou 3eally 5ant #o Delete #he (elected Data.O, vb4uestion R
vb-esCo, +e.%aption1
I! ans M ) #hen lconn.E$ecute ODelete 2rom D53@ where #NempNnameM'O
cbNempNname.#e$t O'and DNdateMTO %DateD#Ndate.Value1 OT O
+sgBo$ OData Delete (uccess!ully.O, vbIn!ormation, +e.%aption
End I!
cmdNsave.%aption M OsaveO
%learN%ontrols
2illNist E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
0rivate (ub cmdNe$itN%lic&1
I! cmdNe$it.%aption S< O%ancelO #hen
/nload +e
Else
cmdNsave.%aption M OsaveO
%learN%ontrols
cmdNe$it.%aption M Oe$itO
End I!
End (ub
0rivate (ub %learN%ontrols1
cbNcode.#e$t M OOcbNempNname.#e$t M OO
cbNstatus.#e$t M OO
cbNprojNname.#e$t M OO
cbNmodule.#e$t M OO
8/13/2019 Crm File Bca
72/100
96
CRM (A Client RelationshipManagement System)
t$tNtas&.#e$t M OO
t$tNremar&.#e$t M OO
t$tNin!o.#e$t M OOD#Ndate.Value M Date
dtNtime.Value M #ime
End (ub
0rivate (ub cmdNopenN%lic&1
cmdNdel.Enabled M #rue
cmdNe$it.%aption M O%ancelO
cmdNsave.%aption M O+odi!yO
End (ub
0rivate (ub cmdNsaveN%lic&1
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
I! cbNcode.#e$t M OO #hen
+sgBo$ O0lease !ill the code valueO, vb%ritical
cbNcode.(et2ocus
E$it (ub
End I!
I! cmdNsave.%aption S< O+odi!yO #hen
lconn.Begin#rans
lconn.E$ecute OIC(E3# IC#8 D53@ CNcode, #NempNname, #NprojNname,
#Ntas&, #Nremar&, #Nmodule,DNtime, #Nstatus, DNdate, #Nin!o1O N
OVA/E('O cbNcode.#e$t O','O cbNempNname.#e$t O','O
cbNprojNname.#e$t O','O t$tNtas&.#e$t O','O t$tNremar&.#e$t O','O
cbNmodule.#e$t O',TO dtNtime.Value OT,'O cbNstatus.#e$t O',TO
%DateD#Ndate.Value1 OT,'O t$tNin!o.#e$t O'1O
lconn.%ommit#rans +sgBo$ OData (aved (uccess!ully.O, vbIn!ormation, +e.%aption
Else
lconn.E$ecute O/0DA#E D53@ (E# CNcodeM'O cbNcode.#e$t O',
#NempNnameM'O cbNempNname.#e$t O', #NprojNnameM'O cbNprojNname.#e$t
8/13/2019 Crm File Bca
73/100
96
CRM (A Client RelationshipManagement System)
O',#Ntas&M'O t$tNtas&.#e$t O',#Nremar&M'O t$tNremar&.#e$t O', #NmoduleM' O
cbNmodule.#e$t O ',CNtimeMTO dtNtime.Value OT, #NstatusM'O cbNstatus.#e$t
O',DNdateMTO %DateD#Ndate.Value1 OT,#Nin!oM'O t$tNin!o.#e$t O' where#NempNnameM'O cbNempNname.#e$t O'and DNdateMTO %DateD#Ndate.Value1
OT O
+sgBo$ OData +odi!y (uccess!ully.O, vbIn!ormation, +e.%aption
End I!
%learN%ontrols
stvNrec.istItems.%lear
2illNist
E$it (ub
End (ub
0rivate (ub 2illNist1
8n Err 9o#o errh
Dim l$ As istItem
Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset
(et lconn M 8pen%onlconn1
stvNrec.istItems.%lear
(et rs M lconn.E$ecuteO(EE%# 2rom D53@ 83DE3 B- [email protected]
I! rs.B82 8r rs.E82 #hen
Else
2or i M @ #o rs.3ecord%ount
(et l$ M stvNrec.istItems.Add, , stvNrec.istItems.%ount R @1
l$.(ubItems@1 M II!IsCullrsPDNdate1, OO, rsPDNdate1
l$.(ubItems=1 M II!IsCullrsPCNcode1, OO, rsPCNcode1
l$.(ubItems1 M II!IsCullrsP#NempNname1, OO, rsP#NempNname1
l$.(ubItemsJ1 M II!IsCullrsP#NprojNname1, OO, rsP#NprojNname1
l$.(ubItemsK1 M II!IsCullrsP#Nmodule1, OO, rsP#Nmodule1
l$.(ubItems)1 M II!IsCullrsP#Ntas&1, OO, rsP#Ntas&1 l$.(ubItemsL1 M II!IsCullrsP#Nstatus1, OO, rsP#Nstatus1
rs.+oveCe$t
Ce$t i
End I!
8/13/2019 Crm File Bca
74/100
96
CRM (A Client RelationshipManagement System)
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO E$it (ub
3esume
End (ub
0rivate (ub stvNrecNDbl%lic&1
Dim rs As AD8DB.3ecordset
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
cmdNsave.%aption M O+odi!yO
cmdNdel.Enabled M #ruecmdNe$it.%aption M O%ancelO
Dim l$ As istItem
(et l$ M stvNrec.(electedItem
D#Ndate.Value M l$.(ubItems@1
cbNcode.#e$t M l$.(ubItems=1
(et rs M lconn.E$ecuteO(elect !rom D53@ where CN%ode M 'O
cbNcode.#e$t O' and DNdateMTO %DateD#Ndate.Value1 OT O
I! rs.E82 8r rs.B82 #hen
Else
cbNcode.#e$t M II!IsCullrsPCNcode1, OO, rsPCNcode1
cbNempNname.#e$t M II!IsCullrsP#NempNname1, OO, rsP#NempNname1
D#Ndate.Value M II!IsCullrsPDNdate1, OO, rsPDNdate1
cbNprojNname.#e$t M II!IsCullrsP#NprojNname1, OO, rsP#NprojNname1
cbNmodule.#e$t M II!IsCullrsP#Nmodule1, OO, rsP#Nmodule1
t$tNtas&.#e$t M II!IsCullrsP#Ntas&1, OO, rsP#Ntas&1
cbNstatus.#e$t M II!IsCullrsP#Nstatus1, OO, rsP#Nstatus1
t$tNremar&.#e$t M II!IsCullrsP#Nremar&1, OO, rsP#Nremar&1
dtNtime.Value M II!IsCullrsPDNtime1, OtimeO, rsPDNtime1 t$tNin!o.#e$t M II!IsCullrsP#Nin!o1, OO, rsP#Nin!o1
End I!
End (ub
8/13/2019 Crm File Bca
75/100
96
CRM (A Client RelationshipManagement System)
0rivate (ub 2ormNoad1
2illNist
End (ub
8/13/2019 Crm File Bca
76/100
96
CRM (A Client RelationshipManagement System)
0rivate (ub 1
2ill%ombo@ O(EE%# #Nname 2rom project 83DE3 B- #NnameO, cbNprojNname
End (ub
0rivate (ub cbNprojNnameNFey0ressFeyAscii As Integer1
8n Err 9o#o errh
Dim l$ As istItem
Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset
Dim lrs As AD8DB.3ecordset
Dim rs@ As AD8DB.3ecordset
(et lconn M 8pen%onlconn1
lstvNmod.istItems.%lear
(et rs M lconn.E$ecuteO(EE%# #Nmodule, #Nstatus, #Nremar&, #NprojNname
238+ D53@ 5here #NprojNnameM'O cbNprojNname.#e$t O'O1 I! rs.B82 8r rs.E82 #hen
Else
2or i M @ #o rs.3ecord%ount
(et l$ M lstvNmod.istItems.Add, , lstvNmod.istItems.%ount R @1
8/13/2019 Crm File Bca
77/100
96
CRM (A Client RelationshipManagement System)
l$.(ubItems@1 M II!IsCullrsP#Nmodule1, OO, rsP#Nmodule1
l$.(ubItems=1 M II!IsCullrsP#Nstatus1, OO, rsP#Nstatus1
l$.(ubItems1 M II!IsCullrsP#Nremar&1, OO, rsP#Nremar&1
rs.+oveCe$t
Ce$t i
End I!
(et rs@ M lconn.E$ecuteO(EE%# CNcode !rom project where #NnameM'O
cbNprojNname.#e$t O' O1
n M II!IsCullrs@PCNcode1, OO, rs@PCNcode1
(et lrs M lconn.E$ecuteO(EE%# #Nmodule 2rom moduleN@ where 2FNcodeM'O
n O'O1 2or j M @ #o lrs.3ecord%ount
(et rs M lconn.E$ecuteO(EE%# #Nmodule, #Nstatus, #Nremar&, #NprojNname
238+ D53@ 5here #NprojNnameM'O cbNprojNname.#e$t O' O1
!lag M >
2or i M @ #o rs.3ecord%ount
I! II!IsCulllrsP#Nmodule1, OO, lrsP#Nmodule1 M II!IsCullrsP#Nmodule1, OO, rsP
#Nmodule11 #hen
!lag M @
E$it 2or
End I!
rs.+oveCe$t
Ce$t i
I! !lag S< @1 #hen
(et l$ M lstvNmod.istItems.Add, , lstvNmod.istItems.%ount R @1
l$.(ubItems@1 M II!IsCulllrsP#Nmodule1, OO, lrsP#Nmodule1
l$.(ubItems=1 M OIncompleteO
End I!
lrs.+oveCe$t
Ce$t j E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
8/13/2019 Crm File Bca
78/100
96
CRM (A Client RelationshipManagement System)
3esume
End (ub
0rivate (ub cmdNe$itN%lic&1
I! cmdNe$it.%aption S< O%ancelO #hen
/nload +e
Else
%learN%ontrols
cmdNe$it.%aption M Oe$itO
End I!
End (ub
0rivate (ub %learN%ontrols1
cbNprojNname.#e$t M OO
lstvNmod.istItems.%lear
End (ub
0rivate (ub %mdNshowN%lic&1
2illNist
cmdNe$it.%aption M O%ancelO
End (ub
0rivate (ub 2illNist1
8n Err 9o#o errh
Dim l$ As istItem
Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset
Dim lrs As AD8DB.3ecordset
Dim rs@ As AD8DB.3ecordset
(et lconn M 8pen%onlconn1 lstvNmod.istItems.%lear
(et rs M lconn.E$ecuteO(EE%# #Nmodule, #Nstatus, #Nremar&,
#NprojNname 238+ D53@ 5here #NprojNnameM'O cbNprojNname.#e$t
O'O1
8/13/2019 Crm File Bca
79/100
96
CRM (A Client RelationshipManagement System)
I! rs.B82 8r rs.E82 #hen
Else
2or i M @ #o rs.3ecord%ount (et l$ M lstvNmod.istItems.Add, , lstvNmod.istItems.%ount R @1
l$.(ubItems@1 M II!IsCullrsP#Nmodule1, OO, rsP#Nmodule1
l$.(ubItems=1 M II!IsCullrsP#Nstatus1, OO, rsP#Nstatus1
l$.(ubItems1 M II!IsCullrsP#Nremar&1, OO, rsP#Nremar&1
rs.+oveCe$t
Ce$t i
End I!
(et rs@ M lconn.E$ecuteO(EE%# CNcode !rom project where #NnameM'O cbNprojNname.#e$t O' O1
n M II!IsCullrs@PCNcode1, OO, rs@PCNcode1
(et lrs M lconn.E$ecuteO(EE%# #Nmodule 2rom moduleN@ where 2FNcodeM'O n
O'O1
2or j M @ #o lrs.3ecord%ount
(et rs M lconn.E$ecuteO(EE%# #Nmodule, #Nstatus, #Nremar&, #NprojNname
238+ D53@ 5here #NprojNnameM'O cbNprojNname.#e$t O' O1
!lag M >
2or i M @ #o rs.3ecord%ount
I! II!IsCulllrsP#Nmodule1, OO, lrsP#Nmodule1 M II!IsCullrsP#Nmodule1, OO, rsP
#Nmodule11 #hen
!lag M @
E$it 2or
End I!
rs.+oveCe$t
Ce$t i
I! !lag S< @1 #hen
(et l$ M lstvNmod.istItems.Add, , lstvNmod.istItems.%ount R @1
l$.(ubItems@1 M II!IsCulllrsP#Nmodule1, OO, lrsP#Nmodule1 l$.(ubItems=1 M OIncompleteO
End I!
lrs.+oveCe$t
Ce$t j
8/13/2019 Crm File Bca
80/100
96
CRM (A Client RelationshipManagement System)
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorOE$it (ub
3esume
End (ub
8/13/2019 Crm File Bca
81/100
96
CRM (A Client RelationshipManagement System)
0rivate (ub 1
2ill%ombo@ O(EE%# #Nname 2rom project 83DE3 B- #NnameO, cbNprojNname
End (ub
0rivate (ub cbNprojNnameNFey0ressFeyAscii As Integer1
8n Err 9o#o errh
Dim l$ As istItem
Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset
Dim lrs As AD8DB.3ecordset
Dim rs@ As AD8DB.3ecordset
(et lconn M 8pen%onlconn1 lstvNmod.istItems.%lear
(et rs M lconn.E$ecuteO(EE%# #Nmodule, #Nstatus, #Nremar&, #NprojNname 238+
D53@ 5here #NprojNnameM'O cbNprojNname.#e$t O' O1
(et rs@ M lconn.E$ecuteO(EE%# CNcode !rom project where #NnameM'O
cbNprojNname.#e$t O' O1
n M II!IsCullrs@PCNcode1, OO, rs@PCNcode1
(et lrs M lconn.E$ecuteO(EE%# #Nmodule 2rom moduleN@ where 2FNcodeM'O n
O' O1
I! rs.B82 8r rs.E82 #hen
Else
2or i M @ #o rs.3ecord%ount
I! II!IsCullrsP#Nstatus1, OO, rsP#Nstatus1 M OIncompleteO1 #hen
(et l$ M lstvNmod.istItems.Add, , lstvNmod.istItems.%ount R @1
l$.(ubItems@1 M II!IsCullrsP#Nmodule1, OO, rsP#Nmodule1
l$.(ubItems=1 M II!IsCullrsP#Nremar&1, OO, rsP#Nremar&1
End I!
rs.+oveCe$t
Ce$t i 2or j M @ #o lrs.3ecord%ount
(et rs M lconn.E$ecuteO(EE%# #Nmodule, #Nstatus, #Nremar&, #NprojNname
238+ D53@ 5here #NprojNnameM'O cbNprojNname.#e$t O' O1
!lag M >
8/13/2019 Crm File Bca
82/100
96
CRM (A Client RelationshipManagement System)
2or i M @ #o rs.3ecord%ount
I! II!IsCulllrsP#Nmodule1, OO, lrsP#Nmodule1 M II!IsCullrsP#Nmodule1, OO, rsP
#Nmodule11 #hen !lag M @
E$it 2or
'l$.(ubItems=1 M II!IsCullrsP#Nremar&1, OO, rsP#Nremar&1
End I!
rs.+oveCe$t
Ce$t i
I! !lag S< @1 #hen
(et l$ M lstvNmod.istItems.Add, , lstvNmod.istItems.%ount R @1
l$.(ubItems@1 M II!IsCulllrsP#Nmodule1, OO, lrsP#Nmodule1 End I!
lrs.+oveCe$t
Ce$t j
End I!
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
0rivate (ub cmdNe$itN%lic&1
I! cmdNe$it.%aption S< O%ancelO #hen
/nload +e
Else
%learN%ontrols
cmdNe$it.%aption M Oe$itO
End I!
End (ub
0rivate (ub %learN%ontrols1
cbNprojNname.#e$t M OO
lstvNmod.istItems.%lear
8/13/2019 Crm File Bca
83/100
96
CRM (A Client RelationshipManagement System)
End (ub
0rivate (ub %mdNshowN%lic&12illNist
cmdNe$it.%aption M O%ancelO
End (ub
0rivate (ub 2illNist1
8n Err 9o#o errh
Dim l$ As istItem
Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset
Dim lrs As AD8DB.3ecordsetDim rs@ As AD8DB.3ecordset
(et lconn M 8pen%onlconn1
lstvNmod.istItems.%lear
(et rs M lconn.E$ecuteO(EE%# #Nmodule, #Nstatus, #Nremar&, #NprojNname 238+
D53@ 5here #NprojNnameM'O cbNprojNname.#e$t O' O1
(et rs@ M lconn.E$ecuteO(EE%# CNcode !rom project where #NnameM'O
cbNprojNname.#e$t O' O1
n M II!IsCullrs@PCNcode1, OO, rs@PCNcode1
(et lrs M lconn.E$ecuteO(EE%# #Nmodule 2rom moduleN@ where 2FNcodeM'O n
O' O1
I! rs.B82 8r rs.E82 #hen
Else
2or i M @ #o rs.3ecord%ount
I! II!IsCullrsP#Nstatus1, OO, rsP#Nstatus1 M OIncompleteO1 #hen
(et l$ M lstvNmod.istItems.Add, , lstvNmod.istItems.%ount R @1
l$.(ubItems@1 M II!IsCullrsP#Nmodule1, OO, rsP#Nmodule1
l$.(ubItems=1 M II!IsCullrsP#Nremar&1, OO, rsP#Nremar&1
End I! rs.+oveCe$t
Ce$t i
2or j M @ #o lrs.3ecord%ount
8/13/2019 Crm File Bca
84/100
96
CRM (A Client RelationshipManagement System)
(et rs M lconn.E$ecuteO(EE%# #Nmodule, #Nstatus, #Nremar&,
#NprojNname 238+ D53@ 5here #NprojNnameM'O cbNprojNname.#e$t O' O1
!lag M > 2or i M @ #o rs.3ecord%ount
I! II!IsCulllrsP#Nmodule1, OO, lrsP#Nmodule1 M II!IsCullrsP#Nmodule1, OO,
rsP#Nmodule11 #hen
!lag M @
E$it 2or
'l$.(ubItems=1 M II!IsCullrsP#Nremar&1, OO, rsP#Nremar&1
End I!
rs.+oveCe$t
Ce$t i
I! !lag S< @1 #hen (et l$ M lstvNmod.istItems.Add, , lstvNmod.istItems.%ount R @1
l$.(ubItems@1 M II!IsCulllrsP#Nmodule1, OO, lrsP#Nmodule1
End I!
lrs.+oveCe$t
Ce$t j
End I!
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
8/13/2019 Crm File Bca
85/100
96
CRM (A Client RelationshipManagement System)
0rivate (ub cbNcallNrecieverN9ot2ocus1
2ill%ombo@ O(EE%# #Nname 2rom employee 83DE3 B- #NnameO,
cbNcallNreciever
End (ub
0rivate (ub cmdNdelN%lic&18n Err 9o#o errh
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
8/13/2019 Crm File Bca
86/100
96
CRM (A Client RelationshipManagement System)
ans M +sgBo$ODo -ou 3eally 5ant #o Delete #he (elected Data.O,
vb4uestion R vb-esCo, +e.%aption1
I! ans M ) #hen lconn.E$ecute ODelete 2rom %all where #NcallerM'O t$tNcaller.#e$t
O'and DNdateMTO %DatedtNdate.Value1 OT O
+sgBo$ OData Delete (uccess!ully.O, vbIn!ormation, +e.%aption
End I!
cmdNsave.%aption M OsaveO
%learN%ontrols
2illNist
E$it (ub
errh; +sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
0rivate (ub cmdNsaveN%lic&1
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
I! t$tNcaller.#e$t M OO #hen
+sgBo$ O0lease !ill the caller nameO, vb%ritical
cbNcode.(et2ocus
E$it (ub
End I!
I! cmdNsave.%aption S< O+odi!yO #hen
lconn.Begin#rans
lconn.E$ecute OIC(E3# IC#8 %all DNdate, DNtime, #Ncaller,
#NcallNreciever, #Ncomplaint1O N
OVA/E(TO %DatedtNdate.Value1 OT,TO dtNtime.Value OT,'O
t$tNcaller.#e$t O','O cbNcallNreciever.#e$t O','O t$tNcomplaint.#e$t O'1O lconn.%ommit#rans
+sgBo$ OData (aved (uccess!ully.O, vbIn!ormation, +e.%aption
Else
8/13/2019 Crm File Bca
87/100
96
CRM (A Client RelationshipManagement System)
lconn.E$ecute O/0DA#E %all (E# DNtimeMTO dtNtime.Value OT,DNdateMTO
%DatedtNdate.Value1 OT, #NcallerM'O t$tNcaller.#e$t O',#NcallNrecieverM'O
cbNcallNreciever.#e$t O',#NcomplaintM'O t$tNcomplaint.#e$t O'where #NcallerM'O t$tNcaller.#e$t O'and DNdateMTO %DatedtNdate.Value1 OT O
+sgBo$ OData +odi!y (uccess!ully.O, vbIn!ormation, +e.%aption
End I!
%learN%ontrols
lstvNrec.istItems.%lear
2illNist
E$it (ub
End (ub
0rivate (ub %learN%ontrols1
dtNdate.Value M Date
dtNtime.Value M #ime
t$tNcaller.#e$t M OO
cbNcallNreciever.#e$t M OO
t$tNcomplaint.#e$t M OO
End (ub
0rivate (ub 2illNist1
'8n Err 9o#o errh
Dim l$ As istItem
Dim lconn As AD8DB.%onnection
Dim rs As AD8DB.3ecordset
(et lconn M 8pen%onlconn1
lstvNrec.istItems.%lear
(et rs M lconn.E$ecuteO(EE%# 2rom %all 83DE3 B- %all.DNdateO1
I! rs.B82 8r rs.E82 #hen
Else
2or i M @ #o rs.3ecord%ount
(et l$ M lstvNrec.istItems.Add, , lstvNrec.istItems.%ount R @1 l$.(ubItems@1 M II!IsCullrsPDNdate1, OO, rsPDNdate1
l$.(ubItems=1 M II!IsCullrsPDNtime1, OO, rsPDNtime1
l$.(ubItems1 M II!IsCullrsP#Ncaller1, OO, rsP#Ncaller1
l$.(ubItemsJ1 M II!IsCullrsP#NcallNreciever1, OO, rsP#NcallNreciever1
8/13/2019 Crm File Bca
88/100
96
CRM (A Client RelationshipManagement System)
l$.(ubItemsK1 M II!IsCullrsP#Ncomplaint1, OO, rsP#Ncomplaint1
rs.+oveCe$t Ce$t i
End I!
E$it (ub
errh;
+sgBo$ Err.Description, vb%ritical R vbApplication+odal, OErrorO
E$it (ub
3esume
End (ub
0rivate (ub cmdNe$itN%lic&1I! cmdNe$it.%aption S< O%ancelO #hen
/nload +e
Else
cmdNsave.%aption M OsaveO
%learN%ontrols
cmdNe$it.%aption M Oe$itO
End I!
End (ub
0rivate (ub 2ormNoad1
2illNist
End (ub
0rivate (ub stvNrecNDbl%lic&1
Dim rs As AD8DB.3ecordset
Dim lconn As AD8DB.%onnection
(et lconn M 8pen%onlconn1
cmdNsave.%aption M O+odi!yO
cmdNdel.Enabled M #rue cmdNe$it.%aption
Top Related