home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
tema
/
SW602
/
Winbase
/
EShop_start
/
TESTYINP.PGM
< prev
next >
Wrap
Text File
|
2000-03-21
|
7KB
|
225 lines
{$$3220786601 . }INCLUDE
cursor Dskbezdopr;
procedure test_obchinp(id_obchodnika:integer);
/*********************************************************************/
var
u:untyped;
irec:trecnum;
pommail, pomtyp, pomlog:string[80];
okobch:Boolean;
begin //0
okobch:=False;
u:=id_obchodnika;
irec:=Look_up(OBCHODNICI,"id_obchodnika",u);
if irec<>-1 then
begin //1
pommail:=OBCHODNICI[irec].MAIL_ADRES;
if strlength(pommail)>5 then
begin //2
pomtyp:=OBCHODNICI[irec].mailtyp;
if ((pomtyp="Intenet") OR (pomtyp="MAIL602")) then
begin //3
pomlog:=OBCHODNICI[irec].logname;
if strlength(pomlog)>0 then okobch:=true;
end; //3
end; //2
end; //1
end; //0
procedure test_cenik(id_form:window_id; kod_zbozi:string[15];dph, vyrobce:integer);
/********************************************************************************************/
var
irec:trecnum;
begin //0
if ((kod_zbozi<>"") AND (dph<>NONEINTEGER) ) then
begin //1
if sys_par[0].vyrobci then
begin //2
if (vyrobce<>NONEINTEGER) then
begin //3
if Commit_view(ID_FORM,false,true) then Close_view(ID_FORM);
sys_par[0].id_last_c:=sys_par[0].id_last_c+1
end //3
else Info_box("UPOZORN╠N═", "nezadali jste v²robce");
end //2
else
begin //2
if Commit_view(ID_FORM,false,true) then Close_view(ID_FORM);
sys_par[0].id_last_c:=sys_par[0].id_last_c+1
end; //2
end //1
else
begin //1
Info_box("UPOZORN╠N═", "nezadali jste vÜechny ·daje pot°ebnΘ k zalo₧enφ novΘ polo₧ky cenφku");
// Roll_back_view(ID_FORM);
end; //1
end; //0
procedure test_default(id_form:window_id);
/*********************************************************************/
var
pom:integer;
pomstr, info:string[255];
begin //0
info:="V default hodnotßch musφ b²t zadßny vÜechny hodnoty. Chybφ zadat:";
pomstr:="";
if default_hodnoty[0].DPH=NONEINTEGER then pomstr:=pomstr+" DPH ";
if default_hodnoty[0].DEAL_SK=NONEINTEGER then pomstr:=pomstr+", dealerskß skupina ";
if default_hodnoty[0].ZP_DOPRAV =NONEINTEGER then pomstr:=pomstr+", zp∙sob dopravy a platby ";
if default_hodnoty[0].TYP_UZIV=NONEINTEGER then pomstr:=pomstr+", typ u₧ivatele ";
// if default_hodnoty[0].RABATOVA_METODA =NONEINTEGER then pomstr:=pomstr+", rabatovß metoda";
if default_hodnoty[0].OBCHODNIK =NONEINTEGER then pomstr:=pomstr+", obchodnφk";
if default_hodnoty[0].JEDNOTKA=NONEINTEGER then pomstr:=pomstr+", jednotka";
if default_hodnoty[0].ROUND_ID =NONEINTEGER then pomstr:=pomstr+", zp∙sob zaokrouhlenφ";
// if default_hodnoty[0].PLATBA =NONEINTEGER then pomstr:=pomstr+", formulß°";
if strlength(pomstr)>0 then Info_box(info,pomstr)
else Close_view(ID_FORM);
end; //0
procedure test_dopr(id_form:window_id);
/*********************************************************************/
var
pom, pocet, i:integer;
pomstr, info, pomstr2 :string[255];
begin //0
info:="Ka₧dΘ dealerskΘ skupin∞ je t°eba vybrat alespo≥ 1 zp∙sob dopravy a platby. Chybφ zadat:";
pomstr:="";
if Open_cursor(Dskbezdopr) then Signalize
else begin Rec_cnt(Dskbezdopr, pocet);
if pocet>0 then
begin
for i:=0 to pocet-1 do
begin
pomstr2:=Dskbezdopr[i].deal_skupina;
pomstr:=pomstr+", "+ pomstr2;
end;
end;
close_cursor(Dskbezdopr);
end;
if strlength(pomstr)>0 then Info_box(info,pomstr)
else Close_view(ID_FORM);
end; //0
procedure test_licence(liccis:string[25]);
/*********************************************************************/
var
pom, pocet, i:integer;
pomstr, info, pomstr2 :string[255];
ok:boolean;
begin //0
STRTRIM(liccis);
Upcase(liccis);
pom:=-1;
if ((strlength(liccis)=21) AND (Pref("WDE",liccis))) then pom:=ValidSerNumC(liccis);
if pom=0 then ok:=true else ok:=false;
if NOT ok then
begin
info:="Chybn∞ zadanΘ licenΦnφ Φφslo, program bude nadßle pracovat s omezenφmi pro LITE verzi";
pomstr:=liccis;
if strlength(liccis)>0 then Info_box(info,pomstr);
pomtr:=0;
sys_par[0].mailovat:=false;
end
else
pomtr:=5;
end; //0
procedure testlic();
/*********************************************************************/
var
pom, pocet, i:integer;
pomstr, info, pomstr2 :string[255];
ok:boolean;
licnum:string[25];
begin //0
pom:=-1;
licnum:=SYS_PAR[0].liccis;
STRTRIM(licnum);
Upcase(licnum);
if ((strlength(licnum)=21) AND (Pref("WDE",licnum))) then pom:=ValidSerNumC(licnum);
if pom=0 then
begin pomtr:=5; ok:=true end
else begin pomtr:=0; ok:=false; end;
if NOT ((Current_application.=."_demo") OR (Current_application.=."_DEMO")) then
begin if NOT ok then Open_view("*licenceok",NO_REDIR,MODAL_VIEW,0,0,nil); end;
end; //0
procedure browser1();
/*********************************************************************/
var
chybaB, chybaF :integer;
browser: string[254];
f:file;
begin
if rewrite(f,"c:\findbrow.htm") then
begin
Close(f);
chybaF:=FindExecutable("findbrow.htm","C:\", browser);
delete_file("c:\findbrow.htm");
end;
if (chybaF>32) then
begin
chybaB:=Exec(browser, "HTTP:\\www.SOFTWARE602.CZ\eshop\");
end;
if chybaB<32 then Info_box('Chyba p°i spouÜt∞nφ browseru',int2str(chybaB));
end;
procedure browser2();
/*********************************************************************/
var
chybaB, chybaF :integer;
browser: string[254];
f:file;
begin
if rewrite(f,"c:\findbrow.htm") then
begin
Close(f);
chybaF:=FindExecutable("findbrow.htm","C:\", browser);
delete_file("c:\findbrow.htm");
end;
if (chybaF>32) then
begin
chybaB:=Exec(browser, "http://www.software602.cz/produkty/eshop/eshop.htm");
end;
if chybaB<32 then Info_box('Chyba p°i spouÜt∞nφ browseru',int2str(chybaB));
end;
procedure browser3();
/*********************************************************************/
var
chybaB, chybaF :integer;
browser: string[254];
f:file;
begin
if rewrite(f,"c:\findbrow.htm") then
begin
Close(f);
chybaF:=FindExecutable("findbrow.htm","C:\", browser);
delete_file("c:\findbrow.htm");
end;
if (chybaF>32) then
begin
chybaB:=Exec(browser, "http://www.software602.cz/registrace/");
end;
if chybaB<32 then Info_box('Domovskß strßnka - Chyba p°i spouÜt∞nφ browseru',int2str(chybaB));
end;