📄 query_acc.ec
字号:
/* query_acc */#include </u/ebcsav/include/sav.h>$include sqlca;$include sqlda;short menu();short menusel();void addspace();void mess();char y_n();char readdv();char readst();void prt_inum();void prt_dnum();#include </u/ebcsav/include/begin>short num_c1,num_c2,num_c3,num;double x;char c;$ char s_num[2],nam[9],ter[2],cu_type[2],addres[25],statu[2], lin_num[2],s[13],fla[2];$ long a_num,pas,cr_num,ope_date,int_date,las_date,las_month;$ double amoun,interes,maint_v,balanc,inte_rat;$ short cred_type;$ long cred_num;static char *title1[7]={"0. 退出 ","1.按帐号 ","2.按凭证号 ", "3.按姓名 ","4.按金额 ","5.按地址 ","6.查密码 "};static char *remind1[7]={" 退出本程序 ", " 根据给定的帐号查询并显示相应的储户信息 ", " 根据给定的凭证号查询并显示相应的储户信息 ", " 根据给定的姓名查询并显示相应的储户信息 ", " 根据给定的金额查询并显示相应的储户信息 ", " 根据给定的地址(最多10个字节)查询并显示相应的储户信息 ", " 根据给定的帐号查询并显示相应的储户信息(包括密码) "};static short menu_row1[7]={3,3,3,3,3,3,3}, menu_col1[7]={8,17,26,37,46,55,64};static char *title2[8]={"0.返回 ","1.双整 ","2.活期 ","3.零整 ", "4.存本取息 ","5.定活两便 ","6.大额 ","7.通知 "};static char *remind2[8]={" 返回主选择单 "," 查询整存整取储户 ", " 查询活期储蓄储户 "," 查询零存整取储户 "," 查询存本取息储户 ", " 查询定活两便储户 "," 查询大额储蓄储户 "," 查询通知存款储户 "};static short menu_row2[8]={5,5,5,5,5,5,5,5}, menu_col2[8]={8,15,22,29,36,47,58,65};static char *title3[3]={"0.返回 ","1.人民币 ","2.外币 "};static char *remind3[3]={" 返回主选择单 "," 查询人民币储户 ", " 查询外币储户 "};static short menu_row3[3]={7,7,7},menu_col3[3]={8,15,24};move(0,29);$ database saving;printw("查 询 帐 户 信 息");num_c1=num_c2=num_c3=0;while(1) { move(2,0); clrtobot(); block(1,0,22,80); block(2,6,3,70); num_c1=menu(title1,remind1,menu_row1,menu_col1,6,num_c1); num_c1=menusel(title1,remind1,menu_row1,menu_col1,6,num_c1,0); if(num_c1==0) break; num=((op.type&1)==1)?7:2; block(4,6,3,(num==7)?68:26); num_c2=menu(title2,remind2,menu_row2,menu_col2,num,num_c2); num_c2=menusel(title2,remind2,menu_row2,menu_col2,num,num_c2,0); if(num_c2==0) continue; if(num_c2>2||(op.type&3)==1) num_c3=1; else if((op.type&3)==2) num_c3=2; else { block(6,6,3,28); num_c3=menu(title3,remind3,menu_row3,menu_col3,2,num_c3); num_c3=menusel(title3,remind3,menu_row3,menu_col3,2,num_c3,0); } if(num_c3==0) continue; s_num[1]='\0'; move(10,6); addstr("营业所编号: "); if((op.num&0x80)!=0) { s_num[0]=op.num&0x7f; prt_inum((long)s_num[0],2); } else { readdv(&x,2); s_num[0]=x; } switch(num_c1) { case 1: case 6: move(12,6); addstr("帐号: "); readdv(&x,9); a_num=x; switch(num_c2) { case 1: if(num_c3==1) { $ declare read_111 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from r_fix where sec_num=$s_num and acc_num=$a_num; $ open read_111; } else { $ declare read_112 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from f_fix where sec_num=$s_num and acc_num=$a_num; $ open read_112; } break; case 2: if(num_c3==1) { $ declare read_121 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from r_demand where sec_num=$s_num and acc_num=$a_num; $ open read_121; } else { $ declare read_122 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from f_demand where sec_num=$s_num and acc_num=$a_num; $ open read_122; } break; case 3: $ declare read_131 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter,$amoun, $balanc,$addres,$cr_num,$ope_date,$int_date,$statu,$fla, $las_date,$inte_rat,$interes,$las_month,$lin_num from r_dated where sec_num=$s_num and acc_num=$a_num; $ open read_131; break; case 6: $ declare read_161 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from l_fix where sec_num=$s_num and acc_num=$a_num; $ open read_161; break; case 7: $ declare read_171 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from r_call where sec_num=$s_num and acc_num=$a_num; $ open read_171; } break; case 2: move(12,6); addstr("凭证号: "); readdv(&x,7); cr_num=x; switch(num_c2) { case 1: if(num_c3==1) { $ declare read_211 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from r_fix where sec_num=$s_num and cre_num=$cr_num; $ open read_211; } else { $ declare read_212 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from f_fix where sec_num=$s_num and cre_num=$cr_num; $ open read_212; } break; case 2: if(num_c3==1) { $ declare read_221 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from r_demand where sec_num=$s_num and cre_num=$cr_num; $ open read_221; } else { $ declare read_222 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from f_demand where sec_num=$s_num and cre_num=$cr_num; $ open read_222; } break; case 3: $ declare read_231 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter,$amoun, $balanc,$addres,$cr_num,$ope_date,$int_date,$statu,$fla, $las_date,$inte_rat,$interes,$las_month,$lin_num from r_dated where sec_num=$s_num and cre_num=$cr_num; $ open read_231; break; case 6: $ declare read_261 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from l_fix where sec_num=$s_num and cre_num=$cr_num; $ open read_261; break; case 7: $ declare read_271 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from r_call where sec_num=$s_num and cre_num=$cr_num; $ open read_271; } break; case 3: move(12,6); addstr("姓名: "); readst(nam,8); switch(num_c2) { case 1: if(num_c3==1) { $ declare read_311 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from r_fix where sec_num=$s_num and name=$nam; $ open read_311; } else { $ declare read_312 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from f_fix where sec_num=$s_num and name=$nam; $ open read_312; } break; case 2: if(num_c3==1) { $ declare read_321 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from r_demand where sec_num=$s_num and name=$nam; $ open read_321; } else { $ declare read_322 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from f_demand where sec_num=$s_num and name=$nam; $ open read_322; } break; case 3: $ declare read_331 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter,$amoun, $balanc,$addres,$cr_num,$ope_date,$int_date,$statu,$fla, $las_date,$inte_rat,$interes,$las_month,$lin_num from r_dated where sec_num=$s_num and name=$nam; $ open read_331; break; case 6: $ declare read_361 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from l_fix where sec_num=$s_num and name=$nam; $ open read_361; break; case 7: $ declare read_371 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from r_call where sec_num=$s_num and name=$nam; $ open read_371; } break; case 4: move(12,6); addstr("金额: "); readdv(&amoun,13); switch(num_c2) { case 1: if(num_c3==1) { $ declare read_411 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from r_fix where sec_num=$s_num and amount=$amoun; $ open read_411; } else { $ declare read_412 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from f_fix where sec_num=$s_num and amount=$amoun; $ open read_412; } break; case 2: if(num_c3==1) { $ declare read_421 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from r_demand where sec_num=$s_num and amount=$amoun; $ open read_421; } else { $ declare read_422 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from f_demand where sec_num=$s_num and amount=$amoun; $ open read_422; } break; case 3: $ declare read_431 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter,$amoun, $balanc,$addres,$cr_num,$ope_date,$int_date,$statu,$fla, $las_date,$inte_rat,$interes,$las_month,$lin_num from r_dated where sec_num=$s_num and amount=$amoun; $ open read_431; break; case 6: $ declare read_461 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from l_fix where sec_num=$s_num and amount=$amoun; $ open read_461; break; case 7: $ declare read_471 scroll cursor for select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from r_call where sec_num=$s_num and amount=$amoun; $ open read_471; } break; case 5: move(12,6); addstr("地址(最多10个字节): "); readst(&s[1],10); s[0]='%'; num=strlen(s); s[num]='%'; s[num+1]='\0'; switch(num_c2) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -