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

📄 hand_fix1.ec

📁 这是一个使用 informix esql/c 技术开发的银行程序的部分代码。
💻 EC
📖 第 1 页 / 共 2 页
字号:
/*   fix_open   */#include </u/ebcsav/include/sav.h>$include sqlca;$include sqlda;void addspace();void addspacef();double get_rate();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();void prtf_upper();short num_time();#include </u/ebcsav/include/begin>short n=1,flag,ti,year1,month1;double x;long k;unsigned char c;char st[30];$ char s_num[2],nam[9],ter[2],cu_type[2],addres[25],statu[2],s_type[2];$ long a_num,pas,cr_num,ope_date,int_date,las_date,b_num;$ double amoun,interes,maint_v;$ short cred_type;$ long cred_num;$ char ope_num[2];move(0,25);$ database saving;printw("整  存  整  取  储  蓄  移  植");s_num[0]=op.num&0x7f;s_num[1]='\0';nam[0]='\0';s_type[1]='\0';cu_type[0]=((op.type&1)==1)?'R':'U';cu_type[1]='\0';ter[0]='1';ter[1]='\0';amoun=0.0;addres[0]='\0';statu[1]='\0';pas=0;$ declare blot1 scroll cursor for select blot_num from r_blot;$ declare blot2 scroll cursor for select blot_num from f_blot;while(1)  {    move(23,16);    standout();    mess((short)1);    standend();    amoun=0.0;    move(3,10);    addstr("帐    号: ");    move(3,20);    c=readdv(&x,9);    if(c==10) a_num=x;    move(3,20);    addspace(15);    move(3,48);    prt_inum((long)(op.num&0x7f),2);    addstr("-");    move(3,52);    prt_inum(a_num,9);    move(4,10);    addstr("姓    名: ");    move(5,10);    addstr("密    码: ");    move(6,10);    addstr("币    种: ");    if((op.type&3)==1)      {        move(6,48);        addstr("人民币");      }    move(7,10);    addstr("期    限: ");    move(8,10);    addstr("金    额: ");    move(9,10);    addstr("地    址: ");    move(10,10);    addstr("凭 证 号: ");    move(11,10);    addstr("起息日期: ");    move(12,10);    addstr("利    率: ");    move(13,10);    addstr("是否自动转存(Y/N)? ");    while(1)      {        switch(n)          {            case 1:              move(4,20);              c=readst(st,8);              if(c==10) strcpy(nam,st);              move(4,20);              addspace(10);              move(4,48);              printw("%-8s",nam);              if(c==10||c==13||c==25) n=2;              else if(c==5) n=11;              else if(c==4) n=12;              break;            case 2:              move(5,20);              c=readdv(&x,7);              if(c==10) pas=x;              move(5,20);              addspace(10);              move(5,48);              printw("%7d",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=11;              else if(c==4) n=12;              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(6,20);              c=readch();              if(isprint(c)) cu_type[0]=c;              move(6,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(6,20);              addspace(2);              if(flag==0);              else if(c==24) n=2;              else if(c==5) n=11;              else if(c==4) n=12;              else n=4;              break;            case 4:              move(17,2);              if(toupper(cu_type[0])=='R') addstr("请选择: C-三个月  F-六个月  1-一年  2-二年  3-三年  5-五年");              else addstr("请选择: A-一个月  C-三个月  F-六个月  1-一年  2-二年");              move(7,20);              c=readch();              if(isprint(c)) ter[0]=c;              flag=0;              move(7,48);              if(toupper(cu_type[0])=='R')                {                  switch(ter[0])                    {                      case 'C':                      case 'F':                        printw("%1d个月    ",ter[0]-64);                        flag=1;                        break;                      case '1':                      case '2':                      case '3':                      case '5':                        printw("%1d年    ",ter[0]-48);                        flag=1;                    }                }              else                {                  switch(ter[0])                    {                      case 'A':                      case 'C':                      case 'F':                        printw("%1d个月    ",ter[0]-64);                        flag=1;                        break;                      case '1':                      case '2':                        printw("%1d年    ",ter[0]-48);                        flag=1;                    }                }              move(17,2);              addspace(76);              move(7,20);              addspace(2);              if(flag==0);              else if(c==24)                {                  if((op.type&3)==1) n=2;                  else n=3;                }              else if(c==5) n=11;              else if(c==4) n=12;              else n=5;              break;            case 5:              move(8,20);              c=readdv(&x,11);              if(c==10) amoun=x;              move(8,20);              addspace(12);              move(8,48);              prt_dnum(amoun,13);              if(amoun<10.0||amoun>=100000000.0);              else if(c==10||c==13||c==25) n=6;              else if(c==24) n=4;              else if(c==5) n=11;              else if(c==4) n=12;              break;            case 6:              move(9,20);              c=readst(st,24);              if(c==10) strcpy(addres,st);              move(9,20);              addspace(26);              move(9,48);              printw("%-24s",addres);              if(c==10||c==13||c==25) n=7;              else if(c==24) n=5;              else if(c==5) n=11;              else if(c==4) n=12;              break;            case 7:              move(10,20);              c=readdv(&x,7);              if(c==10) cr_num=x;              move(10,20);              addspace(10);              move(10,48);              prt_inum(cr_num,7);              if(c==10||c==13||c==25) n=8;              else if(c==24) n=6;              else if(c==5) n=11;              else if(c==4) n=12;              break;            case 8:

⌨️ 快捷键说明

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