蜜臀AV一区二区,国产午夜福利100集发布,女人18片毛片60分钟,中文字幕精品无码一区二区

停車場系統(tǒng)中心收費軟件代碼

來源:譽澄智能 2014/4/16 13:00:11??????點擊:

 if conf.CenterPay then  //中心收費模式  admin
  begin
    if not imgOpen.Enabled then Exit;
    if not bCanOpen then Exit;
    //先寫歷史停車記錄
    with qryRec do
    begin
        //////////////////
        //設備所在停車場查詢
        Close;
        SQL.Clear;
        SQL.Add('SELECT * FROM JY_Park_Mech_info');
        SQL.Add('WHERE 編號=' + lbDev.Caption);
        Open;
        nPrkID := FieldByName('所屬停車場編號').AsInteger;


        //查詢是否已經收過費
        Close;
        SQL.Clear;
        SQL.Add('select * from JY_Park_IN_Info WHERE 卡號='''  + Edit1.Text + '''');
        Open;

       // if RecordCount>0 then
        if FieldByName('已結算').AsBoolean then
          begin  //也結算過的,必須重新采用插入新的出場記錄
             sID := GetID();
             Close;
             SQL.Clear;


             aCardID:=trim(Edit1.Text);
             SQL.Add('INSERT JY_Park_Rec_Info (編號,卡號,卡類,大小停車場)');
             SQL.Add('VALUES (''' + sID + ''',''' + aCardID + ''',' + IntToStr(2) + ','
                                + inttostr(nPrkID) + ')');
             try
                ExecSQL;
             except
                    SQL.SaveToFile(AppDir+'\logs\' + FormatDateTime('YYYYMMddHHmmss',now)+'.txt');
             end;
              Close;
            SQL.Clear;
            SQL.Add('UPDATE JY_Park_IN_Info SET');
            SQL.Add('出場時間=''' + DateTimeToStr(now) + ''',');

            SQL.Add('已結算= ' + sBool[True]);
            SQL.Add(' WHERE 卡號=''' + Edit1.Text +'''');

            try
            ExecSQL;
           except
           // SQL.SaveToFile(AppDir+'\logs\' + DateTimeToStr(now)+'.txt');
             DecodeDate(now, mdt.year, mdt.month, mdt.day);
             DecodeTime(now, mdt.hour, mdt.minute, mdt.second,t);
             str1:=floattostr(mdt.year)+'Y'+floattostr(mdt.month)+'M'+floattostr(mdt.day);
             str2:='D'+floattostr(mdt.hour)+'H'+floattostr(mdt.minute)+'M'+floattostr(mdt.second)+'S';
             SQL.SaveToFile(AppDir+'\logs\' + str1+str2+'.txt');//出錯了,怎么辦?
           end;

           Close;                  //更新記錄
           SQL.Clear;
           SQL.Add('UPDATE JY_Park_Rec_Info SET');
           SQL.Add('出場時間=''' + Edit5.Text + ''',');
           SQL.Add('停車費用=''' + Edit7.Text + ''',');
           //SQL.Add('出口編號=' + lbDev.Caption + ',');
           if czkout then
            SQL.Add('收費員=''' + spaceuser + '''')
           else
           SQL.Add('收費員=''' + LocalUser.Name + '''');

           SQL.Add('WHERE 編號=''' + sID + '''');
           try
            ExecSQL;
           except
            DecodeDate(now, mdt.year, mdt.month, mdt.day);
            DecodeTime(now, mdt.hour, mdt.minute, mdt.second,t);
            str1:=floattostr(mdt.year)+'Y'+floattostr(mdt.month)+'M'+floattostr(mdt.day);
            str2:='D'+floattostr(mdt.hour)+'H'+floattostr(mdt.minute)+'M'+floattostr(mdt.second)+'S';
            SQL.SaveToFile(AppDir+'\logs\' + str1+str2+'.txt');//出錯了,怎么辦?
           end;


           //end;
          //end;
          end else   //第一次來付費
           begin
           Close;
           SQL.Clear;
           SQL.Add('UPDATE JY_Park_Rec_Info SET');
           SQL.Add('出場時間=''' + Edit5.Text + ''',');
           SQL.Add('停車費用=''' + Edit7.Text + ''',');
           //SQL.Add('出口編號=' + lbDev.Caption + ',');
           if czkout then
            SQL.Add('收費員=''' + spaceuser + '''')
           else
           SQL.Add('收費員=''' + LocalUser.Name + '''');
           //SQL.Add('大小停車場=''' + );
           SQL.Add('WHERE 編號=''' + gSid + '''');
           try
            ExecSQL;
           except
           DecodeDate(now, mdt.year, mdt.month, mdt.day);
           DecodeTime(now, mdt.hour, mdt.minute, mdt.second,t);
           str1:=floattostr(mdt.year)+'Y'+floattostr(mdt.month)+'M'+floattostr(mdt.day);
           str2:='D'+floattostr(mdt.hour)+'H'+floattostr(mdt.minute)+'M'+floattostr(mdt.second)+'S';
           SQL.SaveToFile(AppDir+'\logs\' + str1+str2+'.txt');//出錯了,怎么辦?
           // SQL.SaveToFile(AppDir+'\logs\' + DateTimeToStr(now)+'.txt');//出錯了,怎么辦?
           end;


          Close;
          SQL.Clear;
          SQL.Add('UPDATE JY_Park_IN_Info SET');
          SQL.Add('出場時間=''' + DateTimeToStr(now) + ''',');
          //SQL.Add('出口編號= ''' + IntToStr(nPrkID)+ ''',');
          SQL.Add('已結算= ' + sBool[True]);
          SQL.Add(' WHERE 卡號=''' + Edit1.Text +''' AND ');
          SQL.Add('所在停車場 >= ' + IntToStr(nPrkID));

          //SQL.Add('UPDATE JY_Park_Card_Info SET');
          //SQL.Add('所在停車場=' + IntToStr(nPrkID-1) + 'WHERE 卡號=''' + Edit1.Text + '''');
          try
            ExecSQL;
          except
           // SQL.SaveToFile(AppDir+'\logs\' + DateTimeToStr(now)+'.txt');
           DecodeDate(now, mdt.year, mdt.month, mdt.day);
           DecodeTime(now, mdt.hour, mdt.minute, mdt.second,t);
           str1:=floattostr(mdt.year)+'Y'+floattostr(mdt.month)+'M'+floattostr(mdt.day);
           str2:='D'+floattostr(mdt.hour)+'H'+floattostr(mdt.minute)+'M'+floattostr(mdt.second)+'S';
           SQL.SaveToFile(AppDir+'\logs\' + str1+str2+'.txt');//出錯了,怎么辦?
          end;
         end;
       end;
  end else  //普通收費模式
  begin
    if not imgOpen.Enabled then Exit;
    if not bCanOpen then Exit;

    with qrypic  do
    begin
    close;
    SQL.Clear;                                                                //
    SQL.Add('UPDATE JY_Park_New_Picture SET 標識=1');
    SQL.Add('WHERE 編號=''' + gSid + '''');  //
     try
       ExecSQL;
       except
        ;//showmessage('圖像標識失敗');
      end;
     end;