.


:




:

































 

 

 

 


if strtoint(currtostr(d))<13 then




Begin

result:=''+currtostr(m)+'/'+currtostr(d)+'/'+currtostr(g)+'';

End

Else

Begin

result:=''+currtostr(d)+'/'+currtostr(m)+'/'+currtostr(g)+'';

end;

end;


 

: FMain.Data2(dtp.Date). .

 

, . .

. , . FZapros. ToolBar. DataTimePicker Combobox, . DBGrid. DataModule DataSource, , , DBGrid . . :

 


dm.Temp2.Active:=false;

dm.Temp2.CommandText:='select fio_st,nazv_zv,avg(oc_ej) FROM kadri,zvanie,eljur,uchgr WHERE (id_ug = id_ug_st) AND (id_st = id_st_ej) AND (id_zv = id_zv_st) AND (data_ej BETWEEN #'+fmain.data2(fzapros.dtp1.date)+'# AND #'+fmain.data2(fzapros.dtp2.date)+'#) AND (nazv_ug = "'+fzapros.cb.Text+'") GROUP BY fio_st, nazv_zv';

dm.Temp2.Active:=true;

 


, . , 28.

28

 

- . , DBFrid Chart Additional. Chart1 Add, . Pie . :

 


procedure TFotchet.ToolButton5Click(Sender: TObject);

var oc:string;

Begin

if cb.Text='' then

Begin

showmessage(' ');

exit;

end;

chart1.Series[0].Clear;

oc:='2';

While strtoint(oc)<= 5 do

Begin

dm.Temp4.Active:=false;

dm.Temp4.CommandText:='select count(oc_ej) FROM kadri,eljur,uchgr WHERE (id_ug = id_ug_st) AND (id_st = id_st_ej) AND (data_ej BETWEEN #'+fmain.data2(fotchet.dtp1.date)+'# AND #'+fmain.data2(fotchet.dtp2.date)+'#) AND (nazv_ug = "'+fotchet.cb.Text+'") AND (oc_ej = '+oc+')';

dm.Temp4.Active:=true;

Fotchet.Chart1.Series[0].AddY(dm.TEMP4.Fields[0].asinteger,oc);

oc:=inttostr(strtoint(oc)+1);

end;

end;


 

29.

 

29

 

. . Fpass Pass. . 30.

30

 

. Project\options. Form MainForm FPass. 31.

 

31

 

Main OnShow : dm.Conn.Connected:=true; OnShow FPass. . :

 


dm.Conn.Connected:=true;

dm.temp4.Active:=false;

dm.temp4.CommandText:='Select name FROM PAss';

dm.temp4.Active:=true;

While not dm.temp4.Eof do

Begin

cb.Items.Add(dm.temp4.Fields[0].AsString);

dm.temp4.Next;

end;


 

FPass. . . :

 


if application.MessageBox( ?',' ', mb_yesno+mb_iconQuestion)=idyes then

Begin

application.Terminate;

End


 

namePol. . . , .

 


{1}if (cb.Text='') OR (e.Text='') then showmessage( ')

Else

Begin

{4} dm.temp4.Active:=false;

{5} dm.temp4.CommandText:='Select * FROM Pass WHERE (name = "'+cb.Text+'") AND (pass = "'+e.Text+'")';

{6} dm.temp4.Active:=true;

{7} if dm.temp4.Fields[0].AsString='' then showmessage(' ')

Else

Begin

{10} if cb.Text='' then

Begin

{12} fpass.Hide;

{13} fmain.Show;

{14} dm.N13.Visible:=false;

{15} dm.N11.Visible:=false;

{16} namePol:=cb.Text;

End

Else

Begin

{20} fpass.Hide;

{21} fmain.Show;

{22} namePol:=cb.Text;

{23} end;

{24} end;

{25} end;

 


 

{1} ,

{4}-{6}

{7} ,

{10} , ,

{12}

{13}

{14,15}

.

 

Fmain CloseQuery , .

 

. - , . Image Additional. , , . Load , . , 30.

30 -

 

, . , , !

 

http://vk.com/id4560920:)

 





:


: 2016-09-03; !; : 354 |


:

:

, .
==> ...

1562 - | 1359 -


© 2015-2024 lektsii.org - -

: 0.023 .