تبلیغات
برنامه نویسی با پاسکال - سیستم بانکداری با استفاده از رکورد ها

ارائه سورس کد ها و پروژه های پاسکال تحت ویندوز!
صرفا جهت آموزش ، نه کپی برداری برای پروژه های دانشگاهی!

لطفا سورس کد های این وبلاگ را برای پرژه های دانشگاهی تون استفاده نکید ، واقعا هدف وبلاگ این نیست.
تمامی مسولیت کپی کردن و ارائه به استاد بر عهده شخص شماست نه نویسنده.

حسین

جستجو

 

سیستم بانکداری با استفاده از رکورد ها

سه شنبه 10 دی 1387   10:17 ق.ظ


نوع مطلب : سورس کدهای پاسکال ،سورس کدها و پروژه های درخواستی ،

دانلود سورس :                          سیستم بانکداری با استفاده از رکورد ها

دانلود فایل جرایی :                    سیستم بانکداری با استفاده از رکورد ها

{B A N K I N G  S Y S T E M (Records)
PROGRAMMING BY :
            HUSSEIN TAJARENEZHAD}
uses wincrt;

type
    Information = record
                firstname,lastname,accounttype : string[20];
                customercode,supply            : longint;
                profit                         : real;
    end;
    Customers = array[1..100] of information;
var
   info : information;
   i,j,sc,m : integer;
   custom : customers;
   s : integer;

procedure starting;
          begin
               writeln('                * W E L C O M E  T O  B A N K I N G  S Y S T E M *');
               writeln;
               Writeln('What You Want To Do?');
               writeln;
               writeln('  * Add Customer                      : 01');
               writeln('  * Find Customer By Last name        : 02');
               writeln('  * Find Customer By Customer Code    : 03');
               writeln('  * View All Customer                 : 04');
               writeln('  * Profit                            : 05');
               writeln('  * Delete Customer                   : 06');
               writeln('  * For Sorting Data By Last Name     : 07');
               writeln('  * For Sorting Data By Customer Code : 08');
               writeln('  * Edit Customer Infomation          : 09');
               writeln('  * View Profit Rate                  : 10');
               writeln;
               writeln('Enter Service Code :');
               readln(sc);
               clrscr;
              

          end;

procedure scan;
          var
             n,i,j : integer;
           
          begin
              
               writeln('                    * A D D  C U S T O M E R  S Y S T E M *');
               writeln;

               while n > 100 do
                     begin
                          writeln('Enter Number of Customer you want to add');
                          readln(n);
                          m:=m+n;
                         

                          if n > 100 then
                             begin
                                  writeln('You can only Enter 100 customer!');
                                  m:=m-n;
                     end;
               for i:= 1 to n do
                   begin
                        for j:= 1 to 5 do
                            begin
                                 case j of
                                      1:
                                        begin
                                             writeln('Select Accunt Type For Below Chart :');
                                             writeln('***********************************');
                                             writeln('*     Account Name     *   Code   *');
                                             writeln('***********************************');
                                             writeln('* Long Period 1 Year   :    1     *');
                                             writeln('* Long Period 2 Year   :    2     *');
                                             writeln('* Long Period 3 Year   :    3     *');
                                             writeln('* Long Period 4 Year   :    4     *');
                                             writeln('* Long Period 5 Year   :    5     *');
                                             writeln('* Short Period         :    6     *');
                                             writeln('***********************************');
                                             writeln;
                                             writeln('Enter Type Code :');
                                             readln(custom[i].accounttype);

                                             if custom[i].accounttype='1' then
                                                custom[i].accounttype:='Long Period 1 Year'

                                             else if custom[i].accounttype='2' then
                                                  custom[i].accounttype:='Long Period 2 Year'

                                             else if custom[i].accounttype='3' then
                                                  custom[i].accounttype:='Long Period 3 Year'

                                             else if custom[i].accounttype='4' then
                                                  custom[i].accounttype:='Long Period 4 Year'

                                             else if custom[i].accounttype='5' then
                                                  custom[i].accounttype:='Long Period 5 Year'

                                             else if custom[i].accounttype='6' then
                                                  custom[i].accounttype:='Short Period'
                                             else
                                                 begin
                                                      Writeln('For Your Acount Profit Not Calculate');
                                                      custom[i].accounttype:='None';
                                                 end;

                                            
                                        end;
                                      3:
                                        begin
                                             writeln('Enter Last name of Customer :');
                                             readln(custom[i].lastname);
                                        end;
                                      2:
                                        begin
                                             writeln('Enter First name of Customer :');
                                             readln(custom[i].firstname);
                                        end;
                                      4:
                                        begin
                                             writeln('Enter Customer Code :');
                                             readln(custom[i].customercode);
                                        end;
                                      5:
                                        begin
                                             writeln('Enter Customer ',custom[i].customercode,' Supply :');
                                             readln(custom[i].supply);
                                        end;
                                 end;
                            end;
                        writeln;
                        writeln('Entering Data Completed');
                        writeln;
                        write('* ',custom[i].firstname,' ',custom[i].lastname,' ',custom[i].accounttype);
                        writeln(' Accunt Sucssecfuly Created');
                        writeln;
                        if i<>n then
                           writeln('Now Enter Data of Customer ',i+1);
                   end;
                   Writeln('Entering Data for ',n,' Customer Completed');
                   writeln;
                   writeln('For Continue Press Enter');
                   readln;
                   clrscr;
                   starting;
                  
          end;{End of procedure scan}
end;

procedure searchname;
          var
             l : string[30];
             flag,sni : integer;
            
          begin
               writeln('           * S E A R C H I N G  S Y S T E M : B Y  L A S T  N A M E *');
               writeln;
               writeln('Enter last name which you want to search');
               readln(l);
               flag:= 0;
               sni:=1;
               while (sni<100) and (flag=0) do
                     begin
                          if l=custom[sni].lastname then
                             begin
                                  writeln('Data Found!');
                                  writeln;
                                  writeln('*******************************************************************************');
                                  writeln('*');
                                  writeln('* Full name     : ',custom[sni].firstname,' ',custom[sni].lastname);
                                  writeln('* Customer Code : ',custom[sni].customercode);
                                  writeln('* Supply        : ',custom[sni].supply);
                                  writeln('* Account Type  : ',custom[sni].accounttype);
                                  writeln('* Profit        : ',custom[sni].profit:8:2);
                                  writeln('*');
                                  writeln('*******************************************************************************');
                                  flag:= 1;
                             end;
                          inc(sni);
                     end;
               if flag=0 then
                  Writeln('Customer Not Found');
               writeln;
               writeln('For Continue Press Enter');
               readln;
               clrscr;
               starting;
          end;{End of procedure search name}

procedure searchcode;
          var
             cc : longint;
             flag1,sci : integer;
          begin
               writeln('        * S E A R C H I N G  S Y S T E M : B Y  C U S T O M E R  C O D E *');
               writeln;
               writeln('Enter Customer Code which you want to search');
               readln(cc);
               flag1:= 0;
               sci:=1;
               while (sci<100) and (flag1=0) do
                     begin
                          if (cc=custom[sci].customercode) then
                             begin
                                  writeln('Data Found!');
                                  writeln('*******************************************************************************');
                                  writeln('*');
                                  writeln('* Full name     : ',custom[sci].firstname,' ',custom[sci].lastname);
                                  writeln('* Customer Code : ',custom[sci].customercode);
                                  writeln('* Supply        : ',custom[sci].supply);
                                  writeln('* Account Type  : ',custom[sci].accounttype);
                                  writeln('* Profit        : ',custom[sci].profit:8:2);
                                  writeln('*');
                                  writeln('*******************************************************************************');
                                  flag1:= 1;
                             end;
                          inc(sci);
                     end;
               if flag1=0 then
                  Writeln('Customer Not Found');
               writeln;
               writeln('For Continue Press Enter');
               readln;
               clrscr;
               starting;
          end;{End of procedure search code}

procedure sortname;
          var
             index : integer;
             min   : string;
             temp  : information;
          begin
          writeln('        * S O R T I N G  D A T A  S Y S T E M  B Y  L A S T  N A M E *');
          writeln;
          for i:= 1 to m do
                  begin
                       min:= custom[i].lastname;
                       index:=i;
                       for j:= i+1 to m do

                           if custom[j].lastname< min then
                              begin
                                   min:= custom[j].lastname;
                                   index:=j;
                              end;
                           temp:=custom[index];
                           custom[index]:=custom[i];
                           custom[i]:=temp;
                  end;
                  writeln('Data sorted By Last Name');
                  writeln('For view sorted data in first page enter show service code');
                  writeln;
                  writeln('For Continue Press Enter');
                  readln;
                  clrscr;
                  starting;
                  
          end;{End Of procedure Sorting Data By Customer Last Name}

procedure sortcode;
          var
             index : integer;
             min   : longint;
             temp  : information;
          begin
          writeln('     * S O R T I N G  D A T A  S Y S T E M  B Y  C U S T O M E R  C O D E *');
          writeln;
          for i:= 1 to m do
                  begin
                       min:= custom[i].customercode;
                       index:=i;
                       for j:= i+1 to m do

                           if custom[j].customercode< min then
                              begin
                                   min:= custom[j].customercode;
                                   index:=j;
                              end;
                           temp:=custom[index];
                           custom[index]:=custom[i];
                           custom[i]:=temp;
                  end;
                 
                  writeln('Data sorted By Customer Code');
                  writeln('For view sorted data in first page enter show service code');
                  writeln;
                  writeln('For Continue Press Enter');
                  readln;
                  clrscr;
                  starting;
          end;{End Of procedure Sorting Data By Customer Code}

 

برای مشاهده ادامه سورس برنامه به ادامه مطلب بروید......

procedure show;

          begin
               writeln('        * V I E W  A L L  C U S T O M E R  A C C U N T  S Y S T E M *');
               writeln;
               writeln('*******************************************************************************');
               writeln('*   Full Name   *  Customer Code  *  Supply    *  Accunt Type    *Profit Pyear*');
               writeln('*******************************************************************************');
               for i:= 1 to m do
                   begin
                        write('  ',custom[i].firstname,' ',custom[i].lastname);
                        write(' ':5,custom[i].customercode);
                        write(' ':5,custom[i].supply);
                        write(' ':5,custom[i].accounttype);
                        writeln(' ':5,custom[i].profit:8:2);
                   end;
               writeln('*******************************************************************************');
              
                   writeln;
                   writeln('For Continue Press Enter');
                   readln;
                   clrscr;
                   starting;
          end;{End of procedure show all Customers}

procedure profit;
          begin
               writeln('            * P R O F I T  C A L C U L A T O R  S Y S T E M *');
               for i:= 1 to m+1 do
                  
                        if custom[i].accounttype='Short Period' then
                           custom[i].profit:=custom[i].supply*9/100

                        else if custom[i].accounttype='Long Period 1 Year' then
                             custom[i].profit:=custom[i].supply*15/100

                        else if custom[i].accounttype='Long Period 2 Year' then
                             custom[i].profit:=custom[i].supply*16/100

                        else if custom[i].accounttype='Long Period 3 Year' then
                             custom[i].profit:=custom[i].supply*17/100

                        else if custom[i].accounttype='Long Period 4 Year' then
                             custom[i].profit:=custom[i].supply*18/100

                        else if custom[i].accounttype='Long Period 5 Year' then
                             custom[i].profit:=custom[i].supply*19/100;
                       
                           
              
               writeln('With Below Rate Profit Calculated!');
               writeln;
               writeln('                           Profit Percent Chart');
               writeln('                      ***********************************');
               writeln('                      *     Account Name     *   Code   *');
               writeln('                      ***********************************');
               writeln('                      * Long Period 1 Year   :   15 %   *');
               writeln('                      * Long Period 2 Year   :   16 %   *');
               writeln('                      * Long Period 3 Year   :   17 %   *');
               writeln('                      * Long Period 4 Year   :   18 %   *');
               writeln('                      * Long Period 5 Year   :   19 %   *');
               writeln('                      * Short Period         :   9 %    *');
               writeln('                      ***********************************');
               writeln;
               show;
          end;{End of Perocedure Calculating Profit}

procedure delete;
          var
             id : longint;
             flag : integer;
             ans : integer;
            
          begin
               writeln('             * D E L E T I N G  C U S T O M E R  S Y S T E M *');
               writeln;
               writeln('Enter Customer Code of Customer which you want to remove :');
               readln(id);
               flag:= 0;
               i:=1;
               while (i<100) and (flag=0) do
                     begin
                          if id=custom[i].customercode then
                             begin
                                  writeln('You Select Customer with below information!');
                                  writeln;
                                  writeln('*************************************************');
                                  writeln('*');
                                  writeln('* Full name     : ',custom[i].firstname,' ',custom[i].lastname);
                                  writeln('* Customer Code : ',custom[i].customercode);
                                  writeln('* Supply        : ',custom[i].supply);
                                  writeln('* Account Type  : ',custom[i].accounttype);
                                  writeln('* Profit        : ',custom[i].profit:8:2);
                                  writeln('*');
                                  writeln('*************************************************');
                                  flag:=1;
                                  writeln;
                                  writeln;
                                  writeln('Are You sure to remove ',custom[i].firstname,' ',custom[i].lastname,' Account?');
                                  writeln('If you are agree press 0 key');
                                  readln(ans);
                                  if ans=0 then
                                     begin
                                          for j:= i to m do
                                              begin
                                                   custom[j]:=custom[j+1];
                                                  
                                              end;
                                          m:=m-1;
                                          writeln;
                                          writeln('Account sucssecfully removed!');
                                          writeln;
                                          writeln('For Continue Press Enter');
                                          readln;
                                          clrscr;
                                          starting;
                                     end
                                  else
                                      begin
                                           writeln;
                                           writeln('Removing Canceled!');
                                           writeln;
                                           writeln('For Continue Press Enter');
                                           readln;
                                           clrscr;
                                           starting;
                                      end;
                             end;
                          inc(i);
                     end;
               if flag=0 then
                  begin
                       Writeln('Customer Not Found');
                       writeln;
                       writeln('For Continue Press Enter');
                       readln;
                       clrscr;
                       starting;
                  end;
          end;{End Of Procedure Delete}

 

procedure edit;
          var
             id : longint;
             flag : integer;
             ans : integer;
            

          begin
               writeln('       * E D I T I N G  C U S T O M E R  I N F O R M A T I O N  S Y S T E M *');
               writeln;
               writeln('Enter Customer Code of Customer which you want to change information''s :');
               readln(id);
               flag:= 0;
               i:=1;
               while (i<100) and (flag=0) do
                     begin
                          if id=custom[i].customercode then
                             begin
                                  writeln('You Select Customer with below information!');
                                  writeln;
                                  writeln('*************************************************');
                                  writeln('*');
                                  writeln('* Full name     : ',custom[i].firstname,' ',custom[i].lastname);
                                  writeln('* Customer Code : ',custom[i].customercode);
                                  writeln('* Supply        : ',custom[i].supply);
                                  writeln('* Account Type  : ',custom[i].accounttype);
                                  writeln('* Profit        : ',custom[i].profit:8:2);
                                  writeln('*');
                                  writeln('*************************************************');
                                  flag:= 1;
                                  writeln;
                                  writeln;
                                 
                                  writeln('************************');
                                  writeln('*                      *');
                                  writeln('* First Name     :  1  *');
                                  writeln('* Last Name      :  2  *');
                                  writeln('* Customer Code  :  3  *');
                                  writeln('* Supply         :  4  *');
                                  writeln('* Account Type   :  5  *');
                                  writeln('*                      *');
                                  writeln('************************');
                                  writeln;
                                  writeln('Enter Code of Each Information :');
                                  readln(ans);
                                  case ans of
                                       1:
                                         begin
                                              writeln('Enter New First name of customer :');
                                              readln(custom[i].firstname);
                                              writeln('First name Changed!');


                                         end;
                                       2:
                                         begin
                                              writeln('Enter New Last name of customer :');
                                              readln(custom[i].lastname);
                                              writeln('Last name Changed!');

                                              
                                         end;
                                       3:
                                         begin
                                              writeln('Enter New Customer code customer :');
                                              readln(custom[i].customercode);
                                              writeln('Customer Code Changed!');


                                         end;
                                       4:
                                         begin
                                              writeln('Enter New Supply of customer :');
                                              readln(custom[i].supply);
                                              writeln('Supply Changed!');


                                         end;
                                       5:
                                         begin
                                              writeln('Enter New Account Type customer :');
                                              readln(custom[i].accounttype);
                                              writeln('Account Type Changed!');
                                              
                                              
                                         end
                                       else
                                           begin
                                                writeln('With Upper Code We dont Have information');
                                                writeln;
                                                writeln('For Continue Press Enter');
                                                readln;
                                                clrscr;
                                                starting;
                                           end;         
                                  end;
                            
                             end;
                          inc(i);
                     end;
               if flag=0 then
                  begin
                       Writeln('Customer Not Found');
                       writeln;
                       writeln('For Continue Press Enter');
                       readln;
                       clrscr;
                       starting;
                  end
               else
                   begin
                       writeln;
                       writeln('For Continue Press Enter');
                       readln;
                       clrscr;
                       starting;
                   end;
          end;{End OF Perucedure Edit}

procedure help;
          begin
               writeln('                            * P R O F I T  P E R C E N T *');
               writeln;
               writeln('     Profit Percent Chart');
               writeln('***********************************');
               writeln('*     Account Name     *   Code   *');
               writeln('***********************************');
               writeln('* Long Period 1 Year   :   15 %   *');
               writeln('* Long Period 2 Year   :   16 %   *');
               writeln('* Long Period 3 Year   :   17 %   *');
               writeln('* Long Period 4 Year   :   18 %   *');
               writeln('* Long Period 5 Year   :   19 %   *');
               writeln('* Short Period         :   9 %    *');
               writeln('***********************************');
               writeln;
               writeln('For Continue Press Enter');
               readln;
               clrscr;
               starting;
          end;
                 

 

procedure afterstarting;
          begin
               case sc of
                    01:
                       scan;
                    02:
                       searchname;
                    03:
                       searchcode;    
                    04:
                       show;
                    05:
                       profit;
                    06:
                       delete;
                    07:
                       sortname;
                    08:
                       sortcode;
                    09:
                       edit;
                    10:
                       help;
               else
                   begin
                        writeln('* With Code: ',sc,' We Dont Have Service!!!');
                        starting;
                   end;
                   

               end;
          end;
begin
     starting;
     s:=1;
     while s=1 do
           afterstarting;
end.{End Of Main}

{B A N K I N G  S Y S T E M (Records)
PROGRAMMING BY :
            HUSSEIN TAJARENEZHAD}


نوشته شده توسط : حسین