Компилирую интерфейс, ругается, что "Не найден интерфейс ISECURITY_NORM". Хотя компилю этот фейс вместе и с интерфейсом normzapas. Через внешние интерфейсы он тоже не появляется.
Код: Выделить всё
#include %src%\src\vipInterface.h;
!#include %src%\src\GetKau.vih
!#include %src%\src\Galnet.ccm;
interface Normzapas 'Нормы страхового запаса';
!#include %src%\src\GetKau.var
show at (,,92,25);
const
cmPrintDoc = 3440;
end;
var
nr,mcnrec,katednrec,katpodrnrec,linenrec,formatnrec,katstannrec,ctitle,titlenrec,specnrec: comp;
pptitlenrec,unitm:comp;
wkl,grant_s, check_del, checkspecif,check_screen:boolean;
res,check_i : word;
nmc:string;
pdate, pbdate, pedate : date;
statusnnrec:comp;
UnMea,plancopy:string;
somewindow:longint;
n:longint;
begindate,enddate:date;
sort1,teh_poteri,dek1,dek2,dek3,summ_plan,poludek1,poludek2,poludek3,summ_polu:double;
sum_gresbordur,gresbordur1,gresbordur2,gresbordur3:double;
sum_vstavka,vstavka1,vstavka2,vstavka3:double;
maxi,maxs:word;
butpick:longInt;
nomer_plana,formatname:string;
linia_name,podrasd,titlenpp:string;
status_plana,old_status,old_linia :comp;
create view normz
var status,linia_filter,grup_filter,format_filter, nomer_plana: word;
x:integer;
fldselect:longint;
linia,gruppa,etalon,format,titlenrec,specifnrec,specifnrec2,specifnrec3, pmc:comp;
(Vsego,meash)
as select katpodr.name,normzapas.npp, *
from normzapas, normzapasspec, katpodr, katmc, x$users, katpodr katpodr_2//, katmc katmc_2
where(( normzapas.cpodrazd==katpodr.nrec
and normzapas.atl_nrec == normzapasspec.cnorm
and normzapasspec.cmc==katmc.nrec
and normzapas.atl_owner==x$users.atl_nrec
and katpodrnrec == katpodr_2.nrec
! and katmc.nrec == katmc_2.nrec
! and pmc == katmc.nrec
))
order by normzapas.npp;
window NormCorrect 'Редактирование норм';
show at(,,,28);
toolbar F_Common::tbPrintDoc;
handleevent
cmPrintDoc:
{
UpdateTable();
res:=RunInterface('ireport',titlenrec);
}
end;
screen sCornormzapas(,,sci1EnEsc); //SciAqaSwitchItemName
show at (,,,10);
table katpodr;
bevel be1 {1,0,110,10,bsRaised, bsFrame};
fields
normzapas.pdate :protect;
normzapas.pbdate:noprotect;
normzapas.pedate:noprotect;
normzapas.npp:protect,noPickButton; //:noprotect; //(,,sciAQACancel1)
katpodr.name :pickButton, protect;
status : [ list 'item 1', 'item 2', 'item 3' ];
<<
Дата Начало действия Конец действия
.@@@@@@@@@ .@@@@@@@@@ .@@@@@@@@@
Номер Структурное подразделение
.@@@@@@@@@@@@ .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Статус .@@@@@@@@@@@@@@@@@@@@@
>>
end;
! browse bCornormzapas(,,Sci13478Esc )//F1,F4,F7,F8,Esc//(,,sci178EnEsc)
browse bCornormzapas(,,Sci178EnEsc )//F1,F4,F7,F8,Esc//(,,sci178EnEsc) sci1478EnEscTreeI
show at (,11,,22)
table normzapasspec;
fields
katmc.name 'Наименование МЦ' : [20], pickButton;
normzapasspec.kol 'Количество':[5,'666.88'],noprotect,noPickButton;
end;
procedure grants();
{
if(iSecurity_norm::fSecurityPolicy(sGetTune('USER.descr'),normzapas.atl_nrec,normzapas.cstatus) = FALSE )
{
cfsSetProp('bnormzapas','StatusCtx', Sci17EnEsc);
cfsSetProp('bCornormzapas','StatusCtx',sciAQACancel1);
cfsSetProp('status','StatusCtx',SciAqaSwitchItemName);
SetFormat(sCornormzapas);
// cfsSetProp('sCorPPlan_nogrant','StatusCtx',sciAQACancel1);
// SetFieldOption(#ppspecif.npp,ofProtected);
grant_s:=false;
// message('grant_s false');
}
else if(iSecurity_norm::fSecurityPolicy(sGetTune('USER.descr'),normzapas.atl_nrec,normzapas.cstatus) = true )
{
if( getfirst x$users where (( sGetTune('USER.descr') == x$users.XU$LOGINNAME )) = tsOk )
{
// cfsSetCurrentContainer('Plan.PlanCorrect.sCorPPlan');
// cfsCreateObject('button', 'sCorPPlan', 'Etalons', false, butpick);
if (x$users.xu$type=1)
{
// SetFieldOption(#ppspecif.npp,ofSelectable);
// if (x$users.xu$type=1 and x$users.xu$loginname='pivovarchukaa')
// {
//message('full_grants');
cfsSetProp('Bnormzapas','StatusCtx',Sci178EnEsc);
SetFormat(sCornormzapas);
cfsSetProp('bCornormzapas','StatusCtx',Sci13478Esc);
cfsSetProp('sCornormzapas','StatusCtx',SciAqaSwitchItemName);
// }
// message('grant_s true');
}
else
{
//message('grants');
cfsSetProp('Bnormzapas','StatusCtx',Sci178EnEsc);
SetFormat(sCorPPlan);
cfsSetProp('bCornormzapas','StatusCtx',Sci13478Esc);
cfsSetProp('sCornormzapas','StatusCtx',SciAqaSwitchItemName);
}
grant_s:=true;
}
}
rescanpanel(#normzapas);
}
tableevent table normzapasspec
cmSetDefault:
{
set normzapasspec.cnorm :=normzapas.atl_nrec
}
cmUpdateRecord :
{ //if grant_s=false
//{
update current normzapasspec;
//}
}
cminsertrecord:
{
insert current normzapasspec;
UpDatePanels();
}
cmDeleteRecord :
{
Delete Current normzapasspec;
}
end;
end;
browse bnormzapas(,,Sci178EnEsc)
table normzapas;
fields
normzapas.pdate 'Дата' : [15] , protect, noAutoSize;
normzapas.npp 'Номер' : [25], protect, noAutoSize;
katpodr.name 'Подразделение' : [25] , protect, noAutoSize;
x$users.xu$fullname 'Создатель':[20],protect,noAutoSize;
end;
//end;
tableevent table normzapas
cmSetDefault: {
normzapas.pdate:=Cur_Date();
normzapas.cpodrazd:=0;
normzapas.npp := 1;
SetModified(true);
UpDateTableWithInserted
PutCommand(cmDefault);
}
cmUpdateRecord :{ //if grant_s=false
//{
update current normzapas;
//}
}
cmInsertRecord :{
insert current normzapas;
! insert current normzapasspec;
UpDatePanels();
}
cmDeleteRecord :
{
if Message('Удалить нормы?', yesButton + noButton) = cmYes
{
Delete Current normzapas;
Delete Current normzapasspec;
}
}
cmCheckRecord:
{
MakeValid(#normzapas);
if isvalid(#normzapas)
{
update current normzapas;
}
if isnew
{
Putcommand(cmInsertRecord);
}
}
cmCheckField:
{
updatetable;
SetModified(true);
case CurField of
#normzapas.pbdate:
{
update current normzapas;
RescanPanel(#normzapas);
}
#normzapas.pedate:
{
update current normzapas;
RescanPanel(#normzapas);
}
#normzapas.pdate:
{
update current normzapas;
RescanPanel(#normzapas);
}
#normzapas.npp:
{
update current normzapas;
RescanPanel(#normzapas);
}
end;
}
end;
handleEvent
cmInit:
{
RescanPanel(Scornormzapas);
Rescanpanel(#normzapas);
}
cmPick:
{
Updatetable();
case CurField of
#katpodr.name:
{
katpodrnrec:=normzapas.cpodrazd;
res:=RunInterface('Z_KATPODR::GETANYPODR',katpodrnrec);
normzapas.cpodrazd:=katpodrnrec
update current normzapas;
if getfirst katpodr where((normzapas.cpodrazd==katpodr.nrec))=tsOk
{
}
RescanPanel(#normzapas);
}
#katmc.name:
{
pmc := normzapasspec.cmc;
res := runinterface('L_MCU::GetSomeMC_KatMC', pmc, false, -12345);//вызов интерфейса выбора МЦ без ввода количества
! res := runinterface('L_MCU::GetSomeMC', pmc);
! res := runinterface('iGetKau.GetCodeKau', pmc);
normzapasspec.cmc := pmc;
update current normzapasspec;
if getfirst katmc where((normzapasspec.cmc==katmc.nrec))=tsOk
{
}
RescanPanel(#normzapasspec);
}
end;
}
cmCheckField : update current normzapas;
cmCancel:
{
}
cmPrintDoc:
{
UpdateTable();
res:=RunInterface('ireport',titlenrec);
}
cmClose:
{
CloseWindow(cmDefault);
}
cmDefault:
{
PutCommand(cmCheckField);
runwindowmodal(NormCorrect);
Rescanpanel(#normzapas);
}
cmInsert:
{
! message('cminsert1');
! titlenrec:=normzapas.atl_nrec;
! maxs:=normzapas.npp;
! specnrec:=normzapas.npp;
!! _loop normzapas where ((titlenrec==normzapas.atl_nrec))
!! {
! if (maxs<normzapas.npp) or (maxs=normzapas.npp)
! {
! message('cminsert2');
! normzapas.npp:=normzapas.npp+1;
! update current normzapas;
! }
!// maxs:=maxs+1;
!! }
! maxs:=maxs+1;
}
cmDelete:
{
}
cmDone:
{
rescanpanel(#normzapas);
}
end;
end.