-
Notifications
You must be signed in to change notification settings - Fork 0
/
ULHelpDesk.pas
61 lines (51 loc) · 1.56 KB
/
ULHelpDesk.pas
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
unit ULHelpDesk;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ULGenerico, FMTBcd, DB, SqlExpr, Provider, DBClient, StdCtrls, Grids,
DBGrids, Buttons, PngBitBtn, ExtCtrls;
type
TfrmLChamados = class(TfrmLGenerico)
cdsTabCOD_CHAMADO: TIntegerField;
cdsTabDAT_CHAMADO: TDateField;
cdsTabCOD_CLIE: TIntegerField;
cdsTabVEICULO: TStringField;
cdsTabASSUNTO_ALEGADO: TStringField;
cdsTabSOLUCAO: TStringField;
cdsTabSTATUS_CHAMADO: TStringField;
cdsTabNOME: TStringField;
txtConsulta: TEdit;
Label1: TLabel;
procedure btConsultarClick(Sender: TObject);
procedure btEditarClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmLChamados: TfrmLChamados;
implementation
uses UFuncoes, UChamado;
{$R *.dfm}
procedure TfrmLChamados.btConsultarClick(Sender: TObject);
begin
sql := 'SELECT * FROM CHAMADOS C, COMPRADOR CC WHERE C.COD_CLIE = CC.COD_COMP';
if not Vazio(txtConsulta.Text) then begin
sql := sql + ' AND CC.NOME LIKE ' +QuotedStr('%'+txtConsulta.Text+'%');
end;
inherited;
end;
procedure TfrmLChamados.btEditarClick(Sender: TObject);
begin
inherited;
Application.CreateForm(TfrmChamados, frmChamados);
frmChamados.cdsTab.Close;
frmChamados.sqlTab.Close;
frmChamados.sqlTab.ParamByName('COD_CHAMADO').AsInteger := cdsTabCOD_CHAMADO.AsInteger;
frmChamados.cdsTab.Open;
frmChamados.Cod_Padrao := cdsTabCOD_CHAMADO.AsInteger;
frmChamados.Campo := 'COD_CHAMADO';
frmChamados.ShowModal;
end;
end.