📄 rate_exch.ec
字号:
standend(); move(19,20); standout(); printw("是否确认删除该汇率?(y,n)"); standend(); move(19,47); c1=toupper(getch()); move(19,20); printw(" "); if(c1!='Y') { move(21,10); printw("F1 删 除"); break; } sy=hjl[j-6].sy; hl=hjl[j-6].hl; $close hlb1; $begin work; $delete from exch_rate where sy=$sy and hl=$hl; if(sqlca.sqlerrd[2] !=1) { move(19,20); standout(); printw("** %d 错误: 删除汇率表出错 **", sqlca.sqlerrd[2]); standend(); getch(); move(19,20); printw(" "); } $commit work; $open hlb1; $fetch first hlb1 into $sy,$hl; j=6; for(i=6;i<18;i++) { hread_record(i,bz); $fetch relative 1 hlb1 into $sy,$hl; bz=0; if(sqlca.sqlcode !=0) { bz+=1; bz1+=1; } } xx=6+bz1-i; $fetch relative $xx hlb1 into $sy,$hl; move(21,10); printw("F1 删 除"); break; case 1: standout(); move(21,25); printw("F2 插 入"); standend(); s=0; ok=0; ll_c1=0; jj=1; while(s==0) { switch(jj) { case 1: move(18,10); for(i=0;i<7;i++) wb_row[i]=18; ll_c1=menusel(wb,wb,wb_row,wb_col,6,ll_c1,0); jj++; break; case 2: move(18, 50); c3=readdv(&hl,14); jj=1; if(c3==17)jj=1; if(c3==16)jj=1; if(c3==3) s=1; break; } } sy=wb1[ll_c1]; standout(); move(21,57); printw("F4 退 出"); standend(); move(19,20); standout(); printw("是否确认增加该汇率?(y,n)"); standend(); move(19,47); c2=toupper(getch()); move(19,20); printw(" "); if(c2=='Y') ok=1; move(21,57); printw("F4 退 出"); if(ok==1) { $close hlb1; $begin work; $insert into exch_rate values ($sy,$hl); if(sqlca.sqlcode !=0) { move(19,20); standout(); printw("** %d 错误:插入汇率表出错 **",sqlca.sqlcode); standend(); getch(); move(19,20); printw(" "); } $commit work; $open hlb1; $fetch first hlb1 into $sy,$hl; j=6; bz=0; bz1=0; if(sqlca.sqlcode !=0) { bz+=1; bz1+=1; } for(i=6;i<18;i++) { hread_record(i,bz); $fetch relative 1 hlb1 into $sy,$hl; bz=0; if(sqlca.sqlcode !=0) { bz+=1; bz1+=1; } } xx=6+bz1-i; $fetch relative $xx hlb1 into $sy,$hl; } move(18,3); printw(" "); move(21,25); printw("F2 插 入"); break; case 2: standout(); move(21,41); printw("F3 修 改"); standend(); s=0; ok=0; jj=1; ll_c1=0; for(i=0;i<7;i++) if(wb1[i]==sy)ll_c1=i; while(s==0) { switch(jj) { case 1: move(j,10); for(i=0;i<7;i++) wb_row[i]=j; ll_c1=menusel(wb,wb,wb_row,wb_col,6,ll_c1,0); jj++; break; case 2: move(j, 50); c3=readdv(&hl,14); jj=1; if(c3==17)jj=1; if(c3==16)jj=1; if(c3==3) s=1; break; } } sy=wb1[ll_c1]; standout(); move(21,57); printw("F4 退 出"); standend(); move(19,20); standout(); printw("是否确认修改该汇率?(y,n)"); standend(); move(19,47); c2=toupper(getch()); move(19,20); printw(" "); if(c2=='Y') ok=1; move(21,57); printw("F4 退 出"); move(j,3); printw(" "); if(ok==1) { sy2=hjl[j-6].sy; hl2=hjl[j-6].hl; $close hlb1; $begin work; $update exch_rate set (sy,hl)= ($sy,$hl) where sy=$sy2 and hl=$hl2; if(sqlca.sqlerrd[2] !=1) { move(19,20); standout(); printw("** %d 错误: 修改汇率表出错 **", sqlca.sqlerrd[2]); standend(); getch(); move(19,20); printw(" "); } $commit work; $open hlb1; $fetch first hlb1 into $sy,$hl; j=6; bz=0; bz1=0; if(sqlca.sqlcode !=0) { bz+=1; bz1+=1; } for(i=6;i<18;i++) { hread_record(i,bz); $fetch relative 1 hlb1 into $sy,$hl; bz=0; if(sqlca.sqlcode !=0) { bz+=1; bz1+=1; } } xx=6+bz1-i; $fetch relative $xx hlb1 into $sy,$hl; } move(21,41); printw("F3 修 改"); break; case 3: l=0; break; } }#include </u/ebcsav/include/end>#include </u/ebcsav/include/readdv>#include </u/ebcsav/include/readst>#include </u/ebcsav/include/readch>#include </u/ebcsav/include/menusel>#include </u/ebcsav/include/mess>#include </u/ebcsav/include/addspace>#include </u/ebcsav/include/addspacef>#include </u/ebcsav/include/y_n>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -