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

📄 pr_rate.ec

📁 这是一个使用 informix esql/c 技术开发的银行程序的部分代码。
💻 EC
字号:
#include </u/ebcsav/include/sav.h>$include sqlca;$include sqlda;char readdv();void addspace();void addspacef();char y_n();void mess();char readst();short menu();short menusel();char readch();#include </u/ebcsav/include/begin>$int syh,syh1,syh2,rq,x1,x2;$char lmc[30];$double ll; $ int xx;$short y,m,sm,sd,wy,wm,wd;$double bl;$short sy;$double hl;  $int yer,mon,da,da2,m1,m2,m3,yer3,mon3,da3;double yer1,mon1,da1; int fl,i,ii,j,k,q;     char *llxz1[7]={"  整存整取  ","  活    期  ","  零存整取  ","  存本取息  ","  定活两变  ","  大额存款  ","  通知存款  "};     char *llxz[7]={"整存整取","活    期","零存整取","存本取息","定活两变","大额存款","通知存款"};     short llxz_row[7]={7,7,7,7,7,7,7},      llxz_col[7]={39,39,39,39,39,39,39};short ll_c,ll_c1; char *wwb[7]={"美      元"," 加拿大元 ","日      元","港      元"," 法国法朗 "," 德国马克 ","英      镑"}; int wwb1[7]={21,3,10,8,6,13,15};char c,c1,c3;$ char select_1[150];char *wb[4]={" 退    出 "," 利 率 表 "," 保值率表 "," 汇 率 表 "};short   wb_row[4]={3,4,5,6}, wb_col[4]={7,7,7,7};move(0,30);standout();printw(" 打 印 处 理 ");standend();block(2,5,6,14);ll_c=menu(wb,wb,wb_row,wb_col,3,ll_c);ll_c=menusel(wb,wb,wb_row,wb_col,3,ll_c,0); $database saving; fl=op.type&0x03;if(ll_c!=0&&ll_c!=3){move(3,20);standout();printw(" 是否分段打印 ? ");standend();c=y_n('Y','Y','N');if(c=='Y')  {move(5,20);standout();printw("起始时间:    年  月  日 截止时间:    年  月  日");standend(); do { move(5,29); c3=readdv(&yer1,4); yer=yer1;     }while(yer>year||yer<1900); do { move(5,35); c3=readdv(&mon1,2); mon=mon1;     }while(mon<1||mon>12); m1=yer%400; m2=yer%100; m3=yer%4; if(mon==1||mon==3||mon==5||mon==7||mon==8||mon==10||mon==12) da2=31; else if(mon!=2) da2=30;      else if(m1==0||m2!=0&&m3==0) da2=29;           else da2=28;       do{ move(5,39); c3=readdv(&da1,2); da=da1;    }while(da<1||da>da2); x1=yer*10000+mon*100+da; do { move(5,53); c3=readdv(&yer1,4); yer3=yer1;     }while(yer3>year||yer3<yer); do { move(5,59); c3=readdv(&mon1,2); mon3=mon1;     }while(mon3<=0||mon3>=13); m1=yer3%400; m2=yer3%100; m3=yer3%4; if(mon3==1||mon3==3||mon3==5||mon3==7||mon3==8||mon3==10||mon3==12) da2=31; else if(mon3!=2) da2=30;      else if(m1==0||m2!=0&&m3==0) da2=29;           else da2=28;       do{ move(5,63); c3=readdv(&da1,2); da3=da1;    }while(da3<=0||da3>da2); x2=yer3*10000+mon3*100+da3;   } }switch(ll_c){case 0:       break;case 1: switch(fl)          {          case 0:return;                 break;          case 1:                if(c=='N')                 strcpy(select_1,  " select *  from inter_rate where syh>180000 and syh<190000");                else                {                move(7,20);                standout();                printw(" 是否分储种打印 ? ");                standend();                c1=y_n('Y','Y','N');                  if(c1=='N')                 strcpy(select_1,  " select *  from inter_rate where syh>180000 and syh<190000 and rq >= ? and rq <= ?");                 else                    {             ll_c1=0;        ll_c1=menusel(llxz,llxz1,llxz_row,llxz_col,6,ll_c1,0);             syh1=180000+(ll_c1+1)*100;             syh2=syh1+99;             if(ll_c1==3||ll_c1==4) return;                 strcpy(select_1,  " select *  from inter_rate where syh>= ? and syh<= ? and rq >= ? and rq <= ?");                     }                 }                 break;          case 2:                if(c=='N')                 strcpy(select_1, " select * from inter_rate where syh<180000 or syh>190000");                else                 strcpy(select_1, " select * from inter_rate where (syh<180000 or syh>190000) and rq >= ? and rq <= ?");                 break;          case 3:                if(c=='N')                 strcpy(select_1, " select * from inter_rate");                 else                 strcpy(select_1, " select * from inter_rate where rq >= ? and  rq <= ?");                  break;          }        $ prepare hb from  $select_1;        $ declare llb1 scroll cursor for hb;        move(19,20);    if(sqlca.sqlcode!=0)      {        addstr("申请");        mess((short)9);        printw("(%d), ",sqlca.sqlcode);        mess((short)3);        getch();        return;      }if(c=='Y') if(c1=='Y') $ open llb1 using $syh1,$syh2,$x1,$x2; else $ open llb1 using $x1,$x2;else $ open llb1; if(sqlca.sqlcode !=0)  {    printw("** %d 错误: 打开利率表出错 **",sqlca.sqlcode);   getch();   return;   }$fetch llb1 into $syh,$lmc,$ll,$rq;k=syh/100;j=0;while(sqlca.sqlcode!=SQLNOTFOUND){printf("%c%c%c%c\n",27,'[','5','i');for(i=0;i<25;i++)printf(" ");printf("%c%c%c%c << 利 率 表 >> %c%c%c%c\n",27,'[',28,'p',27,']',28,'q');printf("\n");printf(" 制表日期: %d 年 %d 月 %d 日\n",year,month,day);printf("┏━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\n");printf("┃   储     蓄     种     类    │   月    利    率   │   调    息    日   ┃\n");printf("┠───────────────┼──────────┼──────────┨\n");i=0;  while(i<46&&sqlca.sqlcode!=SQLNOTFOUND)  {    printf("┃ %s│       %7.3f      │      %8d      ┃\n",lmc,ll,rq);    i++;    $fetch llb1 into $syh,$lmc,$ll,$rq;   if(k!=(syh/100))    {     printf("┠───────────────┼──────────┼──────────┨\n");    k=syh/100;    i++;    }  }printf("┗━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛\n");j++;printf("\n");printf("                                  第 %d 页\n",j);printf("%c%c%c%c%c\n",12,27,'[','4','i');}      break;case 2: switch(fl)          {          case 0:          case 2:return;                 break;          case 1:          case 3:                if(c=='N')                 strcpy(select_1, " select * from maint_rate");                 else                 strcpy(select_1, " select * from maint_rate where y>= ?  and y<= ?");                  break;          }        $ prepare bhb from  $select_1;        $ declare blb1 scroll cursor for bhb;        move(19,20);    if(sqlca.sqlcode!=0)      {        addstr("申请");        mess((short)9);        printw("(%d), ",sqlca.sqlcode);        mess((short)3);        getch();        return;      }if(c=='Y')$ open blb1 using $yer,$yer3;else $ open blb1; if(sqlca.sqlcode !=0)  {    printw("** %d 错误: 打开保值率表出错 **",sqlca.sqlcode);   getch();   return;   }$fetch blb1 into $ y, $ m, $bl,$sy,$sm,$sd,$wy,$wm,$wd;k=y;j=0;while(sqlca.sqlcode!=SQLNOTFOUND){printf("%c%c%c%c\n",27,'[','5','i');for(i=0;i<25;i++)printf(" ");printf("%c%c%c%c<<保值率表>>%c%c%c%c\n",27,'[',28,'p',27,']',28,'q');printf("\n");printf(" 制表日期: %d 年 %d 月 %d 日\n",year,month,day);printf("┏━━━━━━━┯━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\n");printf("┃   登记时间   │ 保  值   率  │  三年期起息时间    │   五年期起息时间   ┃\n");printf("┠───────┼───────┼──────────┼──────────┨\n");i=0;  while(i<46&&sqlca.sqlcode!=SQLNOTFOUND)  {    printf("┃ %4d年%2d月 │    %7.3f   │   %4d年%2d月%2d日   │   %4d年%2d月%2d日   ┃\n",y,m,bl,sy,sm,sd,wy,wm,wd);    i++;$fetch blb1 into $ y, $ m, $bl,$sy,$sm,$sd,$wy,$wm,$wd;   if(k!=y)    {printf("┠───────┼───────┼──────────┼──────────┨\n");    k=y;    i++;    }  }printf("┗━━━━━━━┷━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛\n");j++;printf("\n");printf("                                  第 %d 页\n",j);printf("%c%c%c%c%c\n",12,27,'[','4','i');}      break;case 3: switch(fl)          {          case 0:          case 1:return;                 break;          case 2:          case 3:                 strcpy(select_1, " select * from exch_rate");                  break;          }        $ prepare hhb from  $select_1;        $ declare hlb1 scroll cursor for hhb;        move(19,20);    if(sqlca.sqlcode!=0)      {        addstr("申请");        mess((short)9);        printw("(%d), ",sqlca.sqlcode);        mess((short)3);        getch();        return;      } $ open hlb1; if(sqlca.sqlcode !=0)  {    printw("** %d 错误: 打开汇率表出错 **",sqlca.sqlcode);   getch();   return;   }$fetch hlb1 into $sy,$hl;          j=0;while(sqlca.sqlcode!=SQLNOTFOUND){printf("%c%c%c%c\n",27,'[','5','i');for(i=0;i<25;i++)printf(" ");printf("%c%c%c%c<<汇 率 表>>%c%c%c%c\n",27,'[',28,'p',27,']',28,'q');printf("\n");printf(" 制表日期: %d 年 %d 月 %d 日\n",year,month,day);printf("┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n");printf("┃   币            种                               人民币兑换率  ( 元 )    ┃\n");printf("┠─────────────────────────────────────┨\n");i=0;  while(i<46&&sqlca.sqlcode!=SQLNOTFOUND)  { q=10; for(ii=0;ii<7;ii++)  if(wwb1[ii]==sy) q=ii; if(q!=10)      {    printf("┃      %10s                                     %8.3f             ┃\n",wwb[q],hl);    i++;       }    $fetch hlb1 into $sy,$hl;            }printf("┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n");j++;printf("\n");printf("                                  第 %d 页\n",j);printf("%c%c%c%c%c\n",12,27,'[','4','i');}      break;}#include </u/ebcsav/include/end>#include </u/ebcsav/include/menu>#include </u/ebcsav/include/menusel>#include </u/ebcsav/include/mess>#include </u/ebcsav/include/type_op>#include </u/ebcsav/include/edit_op>#include </u/ebcsav/include/addspace>#include </u/ebcsav/include/y_n>#include </u/ebcsav/include/readch>#include </u/ebcsav/include/readdv>#include </u/ebcsav/include/readst>

⌨️ 快捷键说明

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