⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pt_acc.ec

📁 这是一个使用 informix esql/c 技术开发的银行程序的部分代码。
💻 EC
📖 第 1 页 / 共 2 页
字号:
/*   pt_acc     */#include </u/ebcsav/include/sav.h>$include sqlca;$include sqlda;short menu();short menusel();void addspace();void addspacef();void mess();char readdv();char readch();void prt_inum();void prtf_inum();void prtf_dnum();FILE *pf_l;#include </u/ebcsav/include/begin>short num_c1,num_c2,num_c3,num,flag,l,pa,pab,pac;double x;char c;$ char s_num[2],nam[9],ter[2],cu_type[2],cu_type1[2],cu_type2[2],  addres[25],statu[2],lin_num[2],s[13],fla[2];$ long a_num,a_num1,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[3]={"0.  退  出 ","1.可存取户 ","2.已 销 户 "};static char *remind1[3]={"  退出本程序  ","  打印可存取帐户的信息  ",  "  打印已销帐户的信息  "};static short menu_row1[3]={3,3,3},menu_col1[3]={8,19,30};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;cu_type1[1]='\0';cu_type2[1]='\0';ter[1]='\0';while(1)  {    move(2,0);    clrtobot();    block(1,0,22,80);    block(2,6,3,38);    num_c1=menu(title1,remind1,menu_row1,menu_col1,2,num_c1);    num_c1=menusel(title1,remind1,menu_row1,menu_col1,2,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;    if(num_c3==2)      {        flag=0;        cu_type1[0]=' ';        while(flag==0)          {            move(10,2);            if((op.type&2)==2) printw("请选择: U-美元  J-日元  H-港元  M-德国马克  P-英镑  F-法国法郎  C-加拿大元");            c=readch();            if(isprint(c)) cu_type1[0]=toupper(c);            switch(cu_type1[0])              {                case 'U':                case 'J':                case 'H':                case 'M':                case 'P':                case 'F':                case 'C':                  flag=1;              }          }      }    else cu_type1[0]='R';    cu_type2[0]=tolower(cu_type1[0]);    if(num_c2==1||num_c2==3||num_c2==6)      {        flag=0;        ter[0]=' ';        while(flag==0)          {            move(12,2);            if(num_c2==1&&num_c3==1)              addstr(              "请选择: C-三个月  F-六个月  1-一年  2-二年  3-三年  5-五年");            else if(num_c2==1&&num_c3==2)               addstr("请选择: A-一个月  C-三个月  F-六个月  1-一年  2-二年");            else if(num_c2==3)               addstr("请选择: 1-一年  3-三年  5-五年");            else if(num_c2==6)               addstr("请选择: A-一个月  C-三个月  F-六个月  I-九个月  1-一年");            c=readch();            if(isprint(c)) ter[0]=toupper(c);            if(num_c2==1&&num_c3==1)              {                switch(ter[0])                  {                    case 'C':                    case 'F':                    case '1':                    case '2':                    case '3':                    case '5':                      flag=1;                  }              }            else if(num_c2==1&&num_c3==2)               {                switch(ter[0])                  {                    case 'A':                    case 'C':                    case 'F':                    case '1':                    case '2':                      flag=1;                  }              }            else if(num_c2==3)               {                switch(ter[0])                  {                    case '1':                    case '3':                    case '5':                      flag=1;                  }              }            else if(num_c2==6)               {                switch(ter[0])                  {                    case 'A':                    case 'C':                    case 'F':                    case 'I':                    case '1':                      flag=1;                  }              }          }        ter[0]=(ter[0]>'9')?(ter[0]-64):(ter[0]-48)*12;      }    s_num[1]='\0';    move(14,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;      }    move(16,6);    addstr("起始帐号:           ");    readdv(&x,9);    a_num1=x;    move(18,6);    addstr("页    数:           ");    readdv(&x,2);    pac=x;    move(20,6);    addstr("起始页号:           ");    readdv(&x,4);    pab=x;    if(num_c1==1)      {        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_num1 and                     term=$ter and status<>"E" and status<>"B";                  $ 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_num1 and                     (cur_type=$cu_type1 or cur_type=$cu_type2) and                     term=$ter and status<>"E" and status<>"B";                  $ 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_num1 and                     status<>"E" and status<>"B";                  $ 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_num1 and                     (cur_type=$cu_type1 or cur_type=$cu_type2) and                     status<>"E" and status<>"B";                  $ 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_num1 and                 term=$ter and status<>"E" and status<>"B";              $ 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_num1 and                 term=$ter and status<>"E" and status<>"B";              $ 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_num1 and                 status<>"E" and status<>"B";              $ open read_171;          }      }    else      {        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 acc_num>=$a_num1 and                     term=$ter and status="E";                  $ 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 acc_num>=$a_num1 and                     (cur_type=$cu_type1 or cur_type=$cu_type2) and                     term=$ter and status="E";                  $ 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 acc_num>=$a_num1 and                     status="E";                  $ 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 acc_num>=$a_num1 and                     (cur_type=$cu_type1 or cur_type=$cu_type2) and                     status="E";                  $ 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 acc_num>=$a_num1 and                 term=$ter and status="E";              $ 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,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -