private void add_to_history(){
         String sHistory = Cbm_history.getSelectedItem().toString();
         System.out.println("sHistory:" + sHistory + ", file name " + file_path);
         if(!sHistory.isEmpty())
         {
            String name[]   = sHistory.split("<>");
            boolean        found = false;
            int count = 1;
            ten_khach_hang.setText(name[1]);

            try{
               FileInputStream in = new FileInputStream(file_path);
               try (BufferedReader bufffile = new BufferedReader(new InputStreamReader(in, "UTF8"))) 
               {
                   String strLine;
                   strLine = bufffile.readLine();
                   OUTER:
                   while (strLine != null) {                       
                       if(strLine.contains(sHistory))
                       {
                           found = true;
                           clear_Paid_list();
                           clear_table(dm_hoa_don);
                       }
                       if (found) {
                           switch (strLine.substring(0, 3)) {
                               case "---":
                                   {
                                       String sdata[] = strLine.substring(3).split("<>");
                                       Vector  sVector = new Vector();
                                       sVector.add(count++);
                                       sVector.add(sdata[0]);  //ma sp
                                       sVector.add(sdata[1]);  //ten sp
                                       sVector.add(sdata[4]);  //gia s
                                       sVector.add(sdata[5]);  //gia l
                                       sVector.add(sdata[2]);  //so luong
                                       sVector.add(sdata[3]);  // tien
                                       sVector.add(Boolean.TRUE);
                                       dm_hoa_don.addRow(sVector);
                                       dm_hoa_don.fireTableDataChanged();
                                       Paid_MaSP.add(sdata[0]);
                                       Paid_TenSP.add(sdata[1]);
                                       Paid_GiaSSP.add(Double.parseDouble(sdata[4]));
                                       Paid_GiaLSP.add(Double.parseDouble(sdata[5]));
                                       Paid_SoLuongSP.add(Double.parseDouble(sdata[2]));
                                       Paid_TongGiaSP.add(Double.parseDouble(sdata[3]));
                                       display_text_paylist();
                                       break;
                                   }
                               case "==>":
                                   {
                                       Vector  sVector = new Vector();
                                       sVector.add(null);
                                       sVector.add(null);
                                       sVector.add(null);
                                       sVector.add(null);
                                       sVector.add(null);
                                       sVector.add("1");  //so luong
                                       sVector.add("1.11");  // tien
                                       sVector.add(Boolean.FALSE);
                                       dm_hoa_don.addRow(sVector);
                                       cal_price_items();
                                       calculate_total_price();
                                       break;
                                   }
                               case "==-": //no cu
                               {
                                   No_cu.setText(strLine.substring(3));
                                   break OUTER;
                               }
                           }
                       }
                       strLine = bufffile.readLine();
                   }
               }
               in.close();
           }catch (Exception e){//Catch exception if any
               System.err.println("Error: " + e.getMessage());
           }
         }
     }