-
Notifications
You must be signed in to change notification settings - Fork 1
/
uImportarExcel.dfm
293 lines (293 loc) · 6.38 KB
/
uImportarExcel.dfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
object frmPrincipal: TfrmPrincipal
Left = 0
Top = 0
Caption = 'Importar dados de excel'
ClientHeight = 523
ClientWidth = 940
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poDesktopCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object stgImportExcel: TStringGrid
Left = 8
Top = 96
Width = 385
Height = 375
TabOrder = 0
end
object btnImportarArq: TButton
Left = 8
Top = 487
Width = 75
Height = 25
Caption = 'Importar'
TabOrder = 1
OnClick = btnImportarArqClick
end
object dbgGravaBanco: TDBGrid
Left = 399
Top = 8
Width = 533
Height = 249
TabOrder = 2
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'Tahoma'
TitleFont.Style = []
end
object btnEnviaBanco: TButton
Left = 280
Top = 490
Width = 113
Height = 25
Caption = 'Gravar no Banco'
TabOrder = 3
OnClick = btnEnviaBancoClick
end
object pgrProgresso: TProgressBar
Left = 399
Top = 488
Width = 533
Height = 27
TabOrder = 4
end
object dbgBanco: TDBGrid
Left = 399
Top = 263
Width = 533
Height = 208
DataSource = dtsProdutorers
TabOrder = 5
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'Tahoma'
TitleFont.Style = []
end
object btnSelecionar: TButton
Left = 104
Top = 489
Width = 153
Height = 25
Caption = 'Selecionar'
TabOrder = 6
OnClick = btnSelecionarClick
end
object pnlSelecionar: TPanel
Left = 0
Top = 0
Width = 393
Height = 81
BevelOuter = bvNone
TabOrder = 7
object GroupBox1: TGroupBox
Left = 0
Top = 0
Width = 393
Height = 81
Align = alClient
Caption = 'Escolher dados para importar'
TabOrder = 0
object rdbEstado: TRadioButton
Left = 16
Top = 27
Width = 113
Height = 17
Caption = 'Estado'
TabOrder = 0
OnClick = rdbEstadoClick
end
object rdbMunicipio: TRadioButton
Left = 16
Top = 50
Width = 113
Height = 17
Caption = 'Municipio'
TabOrder = 1
OnClick = rdbMunicipioClick
end
object rdbProdutor: TRadioButton
Left = 200
Top = 24
Width = 113
Height = 17
Caption = 'Produtor'
TabOrder = 2
OnClick = rdbProdutorClick
end
end
end
object ImportExcel: TImportExcel
Left = 184
Top = 168
end
object oplBuscaAqu: TOpenDialog
Left = 296
Top = 8
end
object qrydadosexcel: TFDQuery
Connection = FDConnection1
SQL.Strings = (
'select'
' p.idprodutor,'
' p.produtor,'
' p.cpf,'
' p.area_ha,'
' p.endereco,'
' p.municipio'
''
'from tbl_produtor p'
''
'order by p.produtor ')
Left = 432
Top = 32
object qrydadosexcelIDPRODUTOR: TIntegerField
AutoGenerateValue = arAutoInc
FieldName = 'IDPRODUTOR'
Origin = 'IDPRODUTOR'
ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
Required = True
end
object qrydadosexcelPRODUTOR: TWideStringField
FieldName = 'PRODUTOR'
Origin = 'PRODUTOR'
Size = 200
end
object qrydadosexcelCPF: TWideStringField
FieldName = 'CPF'
Origin = 'CPF'
Size = 16
end
object qrydadosexcelAREA_HA: TIntegerField
FieldName = 'AREA_HA'
Origin = 'AREA_HA'
end
object qrydadosexcelENDERECO: TWideStringField
FieldName = 'ENDERECO'
Origin = 'ENDERECO'
Size = 200
end
object qrydadosexcelMUNICIPIO: TWideStringField
FieldName = 'MUNICIPIO'
Origin = 'MUNICIPIO'
Size = 150
end
end
object FDConnection1: TFDConnection
Params.Strings = (
'Database=C:\ImportaExcel\BIN\Banco\BANCOIMPORTA.FDB'
'User_Name=SYSDBA'
'Password=masterkey'
'Protocol=TCPIP'
'Server=127.0.0.1'
'Port=3060'
'CharacterSet=UTF8'
'DriverID=FB')
Connected = True
LoginPrompt = False
Left = 456
Top = 472
end
object FDPhysFBDriverLink1: TFDPhysFBDriverLink
Left = 616
Top = 472
end
object FDGUIxWaitCursor1: TFDGUIxWaitCursor
Provider = 'Forms'
Left = 536
Top = 472
end
object dtsProdutorers: TDataSource
DataSet = qrydadosexcel
Left = 432
Top = 88
end
object qryEstado: TFDQuery
Connection = FDConnection1
SQL.Strings = (
'select'
' e.idest,'
' e.cod_uf,'
' e.estado'
'from tblestado e'
''
'order by e.estado')
Left = 64
Top = 280
object qryEstadoIDEST: TIntegerField
AutoGenerateValue = arAutoInc
FieldName = 'IDEST'
Origin = 'IDEST'
ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
Required = True
end
object qryEstadoCOD_UF: TIntegerField
FieldName = 'COD_UF'
Origin = 'COD_UF'
end
object qryEstadoESTADO: TWideStringField
FieldName = 'ESTADO'
Origin = 'ESTADO'
Size = 120
end
end
object dtsEstado: TDataSource
DataSet = qryEstado
Left = 144
Top = 280
end
object dtsMunicipio: TDataSource
DataSet = qryMunicpio
Left = 144
Top = 352
end
object qryMunicpio: TFDQuery
Connection = FDConnection1
SQL.Strings = (
'select'
' m.idmunc,'
' m.cod_uf,'
' m.cod_ibge,'
' m.municipio,'
' m.uf'
'from tblmunicipio m'
''
'order by m.cod_uf, m.municipio')
Left = 64
Top = 376
object qryMunicpioIDMUNC: TIntegerField
AutoGenerateValue = arAutoInc
FieldName = 'IDMUNC'
Origin = 'IDMUNC'
ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
Required = True
end
object qryMunicpioCOD_UF: TIntegerField
FieldName = 'COD_UF'
Origin = 'COD_UF'
end
object qryMunicpioCOD_IBGE: TIntegerField
FieldName = 'COD_IBGE'
Origin = 'COD_IBGE'
end
object qryMunicpioMUNICIPIO: TWideStringField
FieldName = 'MUNICIPIO'
Origin = 'MUNICIPIO'
Size = 250
end
object qryMunicpioUF: TWideStringField
FieldName = 'UF'
Origin = 'UF'
FixedChar = True
Size = 2
end
end
end