📄 dem_open.ec
字号:
/* 活期开户 */#include </u/ebcsav/include/sav.h>$include sqlca;$include sqlda;void addspace();void addspacef();void mess();char y_n();char readdv();char readst();char readch();long ac_num();void prt_inum();void prt_dnum();void prtf_inum();void prtf_dnum();short num_time();void delay();#include </u/ebcsav/include/begin>short n=1,flag,ti,p=0;double x;unsigned char c;char st[30];$ char s_num[2],nam[9],cu_type[2],addres[25],statu[2],l_num[2];$ long a_num,pas,cr_num,ope_date,int_date,las_date;$ double amoun;$ short cred_type;$ long cred_num,b_num;$ char ope_num[2],s_type[2],r_type[2];move(0,25);$ database saving;printw("活 期 储 蓄 开 户");s_num[0]=op.num&0x7f;s_num[1]='\0';s_type[1]='\0';r_type[0]=9;r_type[1]='\0';l_num[0]=1;l_num[1]='\0';nam[0]='\0';cu_type[0]=((op.type&1)==1)?'R':'U';cu_type[1]='\0';amoun=0.0;addres[0]='\0';statu[1]='\0';pas=0;$ declare blot scroll cursor for select blot_num from r_blot;$ declare blot1 scroll cursor for select blot_num from f_blot;move(23,16);standout();mess(1);standend();amoun=0.0;move(3,10);addstr("帐 号: ");move(3,48);prt_inum(s_num[0],2);addstr("-");move(5,10);addstr("姓 名: ");move(7,10);addstr("密 码: ");move(9,10);addstr("币 种: ");if((op.type&3)==1) { move(9,48); addstr("人民币"); }move(11,10);addstr("金 额: ");move(13,10);addstr("地 址: ");move(15,10);addstr("凭 证 号: ");while(1) { $ begin work; p=0; while(1) { switch(n) { case 1: move(5,20); c=readst(st,8); if(c==10) strcpy(nam,st); move(5,20); addspace(10); move(5,48); printw("%-8s",nam); if(c==10||c==13||c==25) n=2; else if(c==5) n=7; else if(c==4) n=10; break; case 2: move(7,20); c=readdv(&x,7); if(c==10) pas=x; move(7,20); addspace(10); move(7,48); printw("%d",pas); if(c==10||c==13||c==25) { if((op.type&3)==1) n=4; else n=3; } else if(c==24) n=1; else if(c==5) n=7; else if(c==4) n=10; break; case 3: move(17,2); if((op.type&1)==1) addstr("请选择: R-人民币"); move(18,2); if((op.type&2)==2) printw("请选择: U-美元 J-日元 H-港元 M-德国马克 P-英镑 F-法国法郎 C-加拿大元"); move(9,20); c=readch(); if(isprint(c)) cu_type[0]=c; move(9,48); flag=0; if((op.type&1)==1&&toupper(cu_type[0])=='R') { printw("%-10s","人民币"); flag=1; } if((op.type&2)==2&&flag==0) { switch(toupper(cu_type[0])) { case 'U': printw("%-10s","美元"); flag=1; break; case 'J': printw("%-10s","日元"); flag=1; break; case 'H': printw("%-10s","港元"); flag=1; break; case 'M': printw("%-10s","德国马克"); flag=1; break; case 'P': printw("%-10s","英镑"); flag=1; break; case 'F': printw("%-10s","法国法郎"); flag=1; break; case 'C': printw("%-10s","加拿大元"); flag=1; } } move(17,2); addspace(34); move(18,2); addspace(76); move(9,20); addspace(2); if(flag==0); else if(c==24) n=2; else if(c==5) n=7; else if(c==4) n=10; else n=4; break; case 4: move(11,20); c=readdv(&x,11); if(c==10) amoun=x; move(11,20); addspace(12); move(11,48); prt_dnum(amoun,13); if(c==10||c==13||c==25) n=5; else if(c==24) n=3; else if(c==5) n=7; else if(c==4) n=10; break; case 5: move(13,20); c=readst(st,24); if(c==10) strcpy(addres,st); move(13,20); addspace(26); move(13,48); printw("%-24s",addres); if(c==10||c==13||c==25) n=6; else if(c==24) n=4; else if(c==5) n=7; else if(c==4) n=10; break; case 6: move(15,20); c=readdv(&x,7); if(c==10) cr_num=x; move(15,20); addspace(10); move(15,48); prt_inum(cr_num,7); if(c==10||c==13||c==25) n=7; else if(c==24) n=5; else if(c==5) n=7; else if(c==4) n=10; break; case 7: move(20,20); mess(5); c=y_n('Y','N','C'); move(20,20); addspace(42); if(c=='C') n=1; else if(c=='Y') { ope_num[0]=op_num; ope_num[1]='\0'; if(toupper(cu_type[0])=='R') cred_type=2; else cred_type=12; s_type[0]=cred_type; cred_num=cr_num; move(20,20); $ select cre_num from credential where op_num=$ope_num and cre_type=$cred_type and cre_num=$cr_num; if(sqlca.sqlcode!=0) { mess(11); mess(2); n=6; break; } cred_num+=100000000; $ update credential set cre_num=$cred_num where op_num=$ope_num and cre_type= $cred_type and cre_num=$cr_num; if(sqlca.sqlerrd[2]!=1) { addstr("写"); mess(10); printw("(%d), ",sqlca.sqlcode); p=1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -