You are on page 1of 19

Haut du formulaire

VB, VB.NET
ASP.NET,ASP

C, C++

ColdFusion

PHP
Javascript

Delphi
Flash
Java

Graphisme

Derniers codes
Outils
Divers
Connexion

C#
Mobilit

Ce site au dma

Irc

Assembleur

rrage

CS

SQL
Foxpro
Python
Regex
Flex
Windev

Rechercher

Trouver un fichier de
code source :

Version Franaise -

English Version

Informations sur ce code source


Annonces Google
La Gestion Locative MBM

Gestion Location Assurance loyer


+ de 500 agences partout en France
www.locagestion.com
Top 10 logiciels ERP

Comaparaisons et analyses des


meilleurs ERP. Rapide et Gratuit !
ERP.TechnologyEvaluation.com/FR
Embarcadero Codegear

Nouvelles versions RAD Studio XE


Delphi XE , C++ Builder XE
microsigma.fr/embarcadero
Code Source GESTION D'UNE PHARMACIE
Auteur che_guevara
Fichier Fournisseur.frm en Visual Basic, VB6, VB.NET, VB 2005, VB
Publi le 15/07/2006
Mis jour le 17/07/2006
Pour tous les dtails sur ce code source cliquez ici :
GESTION D'UNE PHARMACIE avec Visual Basic, VB6, VB.NET, VB 2005, VB
Pour consulter la liste des fichiers du zip, cliquez ici

Fichier : Fournisseur.frm
Nombre de lignes : 495 lignes
1.
2.

3.

VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"

4.

5.
6.
7.
8.

9.

Begin VB.Form Fournisseur


BackColor

&H00000000&

BorderStyle

Caption

"Fournissuer"

'Fixed Single

10.

11.
12.

13.
14.
15.
16.
17.
18.
19.
20.
21.
22.

ClientHeight

6885

ClientLeft

45

ClientTop

435

ClientWidth

10875

ForeColor

&H00000000&

Icon

"Fournisseur.frx":0000

25.

LinkTopic

"Form1"

27.

MaxButton

'False

MinButton

'False

ScaleHeight

6885

ScaleWidth

10875

23.
24.
26.
28.

29.
30.
31.
32.
33.
34.

35.

StartUpPosition =

'Windows Default

36.

37.

Begin VB.ComboBox Combo1

38.
39.
40.
41.
42.
43.
44.

Height

315

Left

6000

TabIndex

15

45.

Text

"Combo1"

46.
47.
48.

Top

4200

Visible

Width

1600

49.
50.
51.
52.

53.

'False

End

54.

55.
56.
57.
58.

Begin VB.CommandButton Valider


BackColor

&H00FFFFFF&

59.

Caption

"Valider"

60.
61.
62.

BeginProperty Font

63.

Name

"Comic Sans MS"

Size

9.75

Charset

Weight

700

Underline

'False

73.

Italic

'False

75.

Strikethrough

'False

64.
65.
66.
67.
68.
69.
70.

71.
72.
74.
76.
77.
78.
79.
80.
81.
82.

EndProperty
Height

375

Left

1800

83.
84.
85.
86.
87.
88.
89.
90.

91.

MaskColor

&H00000000&

TabIndex

14

Top

6360

Width

3375

End

92.

93.
94.
95.
96.

Begin VB.CommandButton add


BackColor

&H00FFFFFF&

97.

Caption

"Ajouter"

98.
99.
100.

BeginProperty Font

101.

Name

102.
103.
104.
105.
106.
107.
108.

"Comic Sans MS"

Size

9.75

Charset

Weight

700

109.

Underline

'False

111.

Italic

'False

113.

Strikethrough

'False

110.
112.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.

EndProperty
Height

375

Left

9120

MaskColor

&H00000000&

TabIndex

13

Top

6360

Width

1575

129.

End

131.

Begin VB.CommandButton delete_fournisseur

130.
132.
133.
134.

135.
136.
137.
138.

139.
140.
141.
142.
143.
144.
145.
146.

BackColor

Caption

&H00FFFFFF&
=

"Supprimer"

BeginProperty Font
Name

"Comic Sans MS"

Size

9.75

Charset

Weight

700

147.

Underline

'False

149.

Italic

'False

Strikethrough

'False

148.
150.

151.
152.

153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.

167.

EndProperty
Height

375

Left

7440

MaskColor

&H00000000&

TabIndex

12

Top

6360

Width

1575

End

168.

169.
170.
171.
172.

Begin VB.CommandButton update_fournisseur


BackColor

173.
174.
175.
176.

Caption

&H00FFFFFF&
=

"Modifier"

BeginProperty Font

177.

Name

178.
179.
180.
181.
182.
183.
184.

"Comic Sans MS"

Size

9.75

Charset

Weight

700

185.

Underline

'False

187.

Italic

'False

189.

Strikethrough

'False

186.
188.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.

EndProperty
Height

375

Left

5640

MaskColor

&H00000000&

TabIndex

11

Top

6360

Width

1575

205.

End

207.

Begin MSFlexGridLib.MSFlexGrid msf

206.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.

Height

3255

Left

120

TabIndex

10

Top

120

Width

10575

_ExtentX

18653

_ExtentY

5741

_Version

393216

225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.

Cols

FixedCols

BackColor

ForeColor

16777215

BackColorFixed

16777215

ForeColorSel

-2147483638

BackColorBkg

16777215

GridColor

16777215

GridLineWidth

BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}

245.

Name

246.
247.
248.
249.
250.
251.
252.

"Comic Sans MS"

Size

8.25

Charset

Weight

700

253.

Underline

'False

255.

Italic

'False

Strikethrough

'False

"Comic Sans MS"

254.
256.

257.
258.
259.
260.

261.

EndProperty
End

262.

263.
264.
265.
266.

Begin VB.TextBox Text1


BeginProperty Font

267.

Name

268.
269.
270.
271.
272.
273.
274.

Size

8.25

Charset

Weight

700

275.

Underline

'False

277.

Italic

'False

Strikethrough

'False

276.
278.

279.
280.
281.
282.
283.
284.
285.
286.
287.
288.
289.
290.
291.
292.
293.
294.

295.

EndProperty
Height

375

Index

Left

1800

TabIndex

Top

5880

Width

3375

End

296.

297.
298.
299.
300.

Begin VB.TextBox Text1


BeginProperty Font

301.

Name

302.
303.
304.
305.
306.
307.
308.

"Comic Sans MS"

Size

8.25

Charset

Weight

700

309.

Underline

'False

311.

Italic

'False

Strikethrough

'False

310.
312.

313.
314.
315.
316.
317.
318.
319.
320.
321.
322.
323.
324.
325.
326.
327.
328.

329.

EndProperty
Height

375

Index

Left

1800

TabIndex

Top

5400

Width

3375

End

330.

331.
332.
333.
334.

Begin VB.TextBox Text1


BeginProperty Font

335.

Name

336.
337.
338.
339.
340.
341.
342.

"Comic Sans MS"

Size

8.25

Charset

Weight

700

343.

Underline

'False

345.

Italic

'False

Strikethrough

'False

344.
346.

347.
348.
349.
350.
351.
352.
353.
354.
355.
356.

EndProperty
Height

735

Index

Left

1800

357.
358.
359.
360.
361.
362.
363.
364.

365.

MultiLine

-1

TabIndex

Top

4560

Width

3375

End

'True

366.

367.
368.
369.
370.

Begin VB.TextBox Text1


BeginProperty Font

371.

Name

372.
373.
374.
375.
376.
377.
378.

"Comic Sans MS"

Size

8.25

Charset

Weight

700

379.

Underline

'False

381.

Italic

'False

Strikethrough

'False

380.
382.

383.
384.
385.
386.
387.
388.
389.
390.
391.
392.
393.
394.
395.
396.
397.
398.

399.

EndProperty
Height

375

Index

Left

1800

TabIndex

Top

4080

Width

3375

End

400.

401.
402.
403.
404.

Begin VB.TextBox Text1


BeginProperty Font

405.

Name

406.
407.
408.
409.
410.
411.
412.

"Comic Sans MS"

Size

8.25

Charset

Weight

700

413.

Underline

'False

415.

Italic

'False

Strikethrough

'False

414.
416.

417.
418.
419.
420.
421.
422.
423.
424.
425.
426.
427.
428.
429.
430.
431.
432.

433.

EndProperty
Height

375

Index

Left

1800

TabIndex

Top

3600

Width

3375

End

434.

435.

Begin VB.Label Label1

436.
437.
438.

BackColor

439.
440.
441.
442.

Caption

&H80000012&
=

"Telephone

:"

BeginProperty Font

443.

Name

444.
445.
446.
447.
448.
449.
450.

"Comic Sans MS"

Size

9.75

Charset

Weight

700

451.

Underline

'False

453.

Italic

'False

Strikethrough

'False

452.
454.

455.
456.
457.
458.
459.
460.
461.
462.
463.
464.
465.
466.
467.
468.
469.
470.
471.
472.

473.

EndProperty
ForeColor

&H00FFFFFF&

Height

375

Index

Left

240

TabIndex

Top

5880

Width

2055

End

474.

475.
476.
477.
478.

479.
480.
481.
482.

Begin VB.Label Label1


BackColor

&H80000012&

Caption

"Ville

:"

BeginProperty Font

483.
484.
485.
486.
487.
488.
489.
490.

Name

"Comic Sans MS"

Size

9.75

Charset

Weight

700

491.

Underline

'False

493.

Italic

'False

495.

Strikethrough

'False

492.
494.
496.
497.
498.
499.
500.
501.
502.
503.
504.
505.
506.

EndProperty
ForeColor

&H00FFFFFF&

Height

375

Index

Left

240

507.
508.
509.
510.
511.
512.

513.

TabIndex

Top

5400

Width

2055

End

514.

515.
516.
517.
518.

Begin VB.Label Label1


BackColor

519.
520.
521.
522.

Caption

&H80000012&
=

"Adresse

:"

BeginProperty Font

523.

Name

524.
525.
526.
527.
528.
529.
530.

"Comic Sans MS"

Size

9.75

Charset

Weight

700

531.

Underline

'False

533.

Italic

'False

535.

Strikethrough

'False

532.
534.
536.
537.
538.
539.
540.
541.
542.
543.
544.
545.
546.
547.
548.
549.
550.
551.
552.

EndProperty
ForeColor

&H00FFFFFF&

Height

375

Index

Left

240

TabIndex

Top

4560

Width

2055

553.

End

555.

Begin VB.Label Label1

554.
556.
557.
558.

559.
560.
561.
562.

563.
564.
565.
566.
567.
568.
569.
570.

BackColor

Caption

&H80000012&
=

"Raison Sociale :"

BeginProperty Font
Name

"Comic Sans MS"

Size

9.75

Charset

Weight

700

571.

Underline

'False

573.

Italic

'False

Strikethrough

'False

572.
574.

575.
576.

577.
578.
579.
580.
581.
582.
583.
584.
585.
586.
587.
588.
589.
590.
591.
592.

593.

EndProperty
ForeColor

&H00FFFFFF&

Height

375

Index

Left

240

TabIndex

Top

4080

Width

2055

End

594.

595.
596.
597.
598.

Begin VB.Label Label1


BackColor

599.
600.
601.
602.

Caption

&H80000012&
=

"Code

:"

BeginProperty Font

603.

Name

604.
605.
606.
607.
608.
609.
610.

"Comic Sans MS"

Size

9.75

Charset

Weight

700

611.

Underline

'False

613.

Italic

'False

615.

Strikethrough

'False

612.
614.
616.
617.
618.
619.
620.
621.
622.
623.
624.
625.
626.
627.
628.
629.
630.
631.
632.

633.

EndProperty
ForeColor

&H00FFFFFF&

Height

375

Index

Left

240

TabIndex

Top

3600

Width

2055

End

634.
635.End
636.

637.Attribute

VB_Name = "Fournisseur"

638.

639.Attribute

VB_GlobalNameSpace = False

641.Attribute

VB_Creatable = False

640.
642.

643.Attribute

VB_PredeclaredId = True

645.Attribute

VB_Exposed = False

644.
646.

647.Option

Explicit

648.

649.Dim

titre As Variant

651.Dim

taille As Variant

650.
652.

653.Dim

i As Integer

655.Dim

tmp As Integer

654.
656.

657.Dim

req As String

658.

659.Private

Sub Form_Load()

660.

661.Dim

rs As Recordset

662.

663.titre

= Array("Code", "Raison Sociale", "Adresse", "Ville", "Tel")


664.
665.taille = Array(1000, 1600, 4000, 1855, 2000)
666.
667.
668.

669.For

i = 0 To 4
670.
671.msf.ColWidth(i) = taille(i)
672.
673.msf.TextMatrix(0, i) = titre(i)
674.
675.Next
676.

677.Valider.Visible

= False

678.

679.delete_fournisseur.Enabled

= False

681.update_fournisseur.Enabled

= False

680.
682.

683.Set

db = OpenDatabase("c:\pharm.mdb")

684.

685.Set

rs = db.OpenRecordset("Fournisseur")
686.
687.msf.Rows = 1
688.

689.While

(Not rs.EOF)

690.

691.

If Not IsNull(rs) Then


692.
693.
msf.AddItem rs(0) & Chr(9) & rs(1) & Chr(9) & rs(2) & Chr(9) & rs(3) &
Chr(9) & rs(4) & Chr(9)
694.

695.

Combo1.AddItem rs(0) & " | " & rs(1)

696.

697.

End If
698.
699.
rs.MoveNext
700.
701.Wend
702.

703.rs.Close
704.

705.End

Sub

706.

707.Private

Sub msf_Click()

708.

709.Combo1.Visible

= True
710.
711.Combo1.Left = msf.CellLeft + msf.Left

712.
713.Combo1.Top = msf.CellTop + msf.Top
714.

715.End

Sub

716.

717.Private

Sub Text1_Change(Index As Integer)


718.
719.'Text1(2).SelStart = 0
720.

721.Text1(2).SelLength

= Len(Text1(2))
722.
723.'Text1(3).SelStart = 0
724.

725.Text1(3).SelLength

= Len(Text1(3))

726.

727.End

Sub

728.

729.Private

Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)

730.

731.Dim

i As Integer

733.

If (KeyAscii = 13) Or (KeyAscii = 9) Then

732.
734.

735.

If (Index < 4) Then

736.
737.
738.

Text1(Index + 1).SetFocus

739.

Else

740.
741.
742.

Text1(0).SetFocus

743.

End If

744.

745.

End If

746.

747.End

Sub

748.

749.Private

Sub add_click()

750.

751.Valider.Visible

= True

752.

753.For

i = 0 To 4
754.
755.
Text1(i).Text = ""
756.
757.Next
758.

759.Text1(0).Enabled

= True

760.
761.Text1(0).SetFocus
762.

763.End

Sub

764.

765.Private

Sub Combo1_Click()

766.

767.Dim

rs As Recordset

768.

769.Dim

crit As String

771.Dim

pos As Integer

770.
772.

773.pos

= InStr(1, Combo1.Text, "|", 1)


774.
775.crit = Mid(Combo1.Text, 1, pos - 1)
776.

777.delete_fournisseur.Enabled

= True

778.

779.update_fournisseur.Enabled

= True

780.

781.Set rs = db.OpenRecordset("SELECT
CodeFournisseur like '" & crit & "'")
782.
783.For

FROM

Fournisseur

WHERE

i = 0 To 4

784.

785.

If Not IsNull(rs(i)) Then

786.
787.
788.

Text1(i).Text = rs(i)

789.

Else

790.
791.
792.

Text1(i).Text = ""

793.

End If

794.
795.Next
796.

797.rs.Close
798.

799.Text1(0).Enabled

= False

800.
801.Text1(1).SetFocus
802.

803.Combo1.Visible

= False

804.

805.End

Sub

806.
807.
808.
809.
810.
811.
812.

813.Private

Sub delete_Fournisseur_Click()

814.

815.Dim

ok2 As Boolean

817.Dim

rs_del As Recordset

816.
818.

819.Dim

rs_sup As Recordset

821.Set

rs_del = db.OpenRecordset("SELECT * FROM LotStock ")

820.
822.

823.ok2

= True

824.

825.While

(Not rs_del.EOF)

826.

827.

If (rs_del(5) = Text1(0).Text) Then ok2 = False


828.
829.
rs_del.MoveNext
830.
831.Wend
832.

833.If

(ok2 = True) Then

834.

835.Set rs_sup = db.OpenRecordset("SELECT


CodeFournisseur like '" & Text1(0).Text & "'")
836.
837.If

FROM

Fournisseur

(MsgBox("tes vous sr de bien vouloir supprimer ce fournisseur ", _

838.

839.
840.
841.
842.

WHERE

vbYesNoCancel + vbQuestion, "Suppression") = vbYes) Then


rs_sup.Delete

843.
844.
845.
846.
847.
848.

msf.Clear
Combo1.Clear
Form_Load

849.

For i = 0 To 4

850.
851.
852.

Text1(i).Text = ""

853.

Next

854.
855.
856.

Text1(0).SetFocus

857.End

If

858.
859.Else
860.

861.

tmp = MsgBox("ATTENTION vous ne pouvez pas supprimer ce fournisseur "

& _
862.

863.
"parceque ces medicaments existe toujours dans votre stock !",
vbInformation, "Suppression")
864.
865.End

If

867.End

Sub

866.
868.

869.Private

Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

870.

871.db.Close
872.

873.End

Sub

874.

875.Private

Sub update_Fournisseur_Click()

876.

877.Dim

rs As Recordset

878.

879.If (MsgBox("tes vous sr de bien vouloir enregistr ces modifications a


ce Fournisseur", _
880.
881.

vbQuestion + vbYesNoCancel, "Modification") = vbYes) Then

882.

883.
Set rs = db.OpenRecordset("SELECT
CodeFournisseur = '" & Text1(0).Text & "'")
884.
885.
rs.Edit
886.
887.
888.
889.
890.

For i = 0 To 4
rs(i) = Text1(i).Text

891.
892.
893.
894.
895.
896.

Next
rs.Update
Combo1.Clear

897.
898.
899.
900.

Combo1.Text = "Listes des Fournisseurs"


Form_Load

901.End

If

902.

903.End
904.
905.
906.

Sub

FROM

Fournisseur

WHERE

907.Private

Sub Valider_Click()

908.

909.Dim

rs_fou As Recordset

911.Dim

ok As Boolean

910.
912.

913.Set

rs_fou = db.OpenRecordset("Fournisseur")

914.

915.ok

= True

916.

917.If

(Mid(Text1(0).Text, 1, 1) <> "F") Or (Len(Text1(0).Text) > 10) Then

918.

919.
tmp = MsgBox("Code erron veuillez le retaper et l'initi pas F !", ,
"Validation")
920.
921.
Text1(0).SetFocus
922.
923.Else
924.
925.While

(Not rs_fou.EOF)

926.

927.

If rs_fou(0) = Text1(0).Text Then

928.

929.

ok = False

930.

931.

End If
932.
933.
rs_fou.MoveNext
934.
935.Wend
936.

937.If

(ok = True) Then

938.

939.

If (Text1(1).Text = "") Or (Text1(2).Text = "") Or (Text1(3).Text =

"") Then
940.

941.
tmp = MsgBox("L'un des champs n'es pas bien saisie veuillez les
resaisir !", , "Erreur de saisie")
942.
943.

Else

944.

945.
If (MsgBox("tes vous sure de vouloir ajouter ce fournisseur ?",
vbYesNoCancel + vbQuestion, "Validation") = vbYes) Then
946.
947.
req
=
"INSERT
(CodeFournisseur,RaisonSociale,Adresse,Ville,Tel)" & _
948.
949.

" VALUES

INTO

Fournisseur

('" & Text1(0).Text & "','" & Text1(1).Text & "','" &

Text1(2).Text & _
950.

951.
952.
953.
954.

955.
956.
957.
958.
959.
960.

961.
962.
963.
964.

965.
966.
967.

"','" & Text1(3).Text & "','" & Text1(4).Text & "')"


db.Execute req
Combo1.AddItem Text1(0).Text & " | " & Text1(1).Text
msf.AddItem Text1(0) & Chr(9) & Text1(1) & Chr(9) & Text1(2) & _
Chr(9) & Text1(3) & Chr(9) & Text1(4) & Chr(9)
For i = 0 To 4
Text1(i).Text = ""
Next
Text1(0).SetFocus

968.

969.

End If

971.

End If

970.

972.
973.Else
974.

975.
tmp = MsgBox("Le code de Fournisseur que vous avez tapez existe deja
veuillez le rectifier !", , "Erreur Code")
976.
977.
Text1(0).SetFocus
978.
979.End

If

981.End

If

980.
982.

983.End

Sub

984.
985.
986.
987.
988.
989.

Liste des fichiers du ZIP


Fichier
Fournisseur.frm

Fournisseur.frx
frmAbout.frm

frmAbout.frx
frmSplash.frm

frmSplash.frx

Gesstion d'une pharmacie.PDM

Gesstion d'une pharmacie.vbp

Gesstion d'une pharmacie.vbw


MDIForm1.frm

MDIForm1.frx
Medicament.frm

Medicament.frx

Module1.bas

MSSCCPRJ.SCC

pharm.mdb

Projet1.vbw
Stock.frm

Stock.frx
Vente.frm

Vente.frx

Pour tlcharger le zip au complet, veuillez vous rendre sur cette page :
Tlcharger GESTION D'UNE PHARMACIE

Dveloppement ralis par Nicolas SOREL (Nix) et Emmanuel (EBArtSoft) avec l'aide de Cyril DURAND,
Merci Vincent pour ses prcieux conseils
CodeS-SourceS.com Toute reproduction mme partielle est interdite sauf accord crit du Webmaster
CodeS-SourceS.com est une marque dpose tous droits rservs
Temps d'xcution de la page : 0,05 sec

Bas du formulaire

Banque d'images

Blogs de dveloppeurs

Offres d'emploi pour dveloppeurs

Tlcharger des logiciels

Groupes

Comparer les prix

TechnoS-SourceS

You might also like