精品人妻伦一区二区三区久久,狼友av永久网站免费极品在线,欧美日韩黄色大片,香港三日本8a三级少妇三级99

停車場(chǎng)系統(tǒng)中心收費(fèi)軟件代碼

來(lái)源:譽(yù)澄智能 2014/4/16 13:00:11??????點(diǎn)擊:

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


        //查詢是否已經(jīng)收過(guò)費(fèi)
        Close;
        SQL.Clear;
        SQL.Add('select * from JY_Park_IN_Info WHERE 卡號(hào)='''  + Edit1.Text + '''');
        Open;

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


             aCardID:=trim(Edit1.Text);
             SQL.Add('INSERT JY_Park_Rec_Info (編號(hào),卡號(hào),卡類,大小停車場(chǎng))');
             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('出場(chǎng)時(shí)間=''' + DateTimeToStr(now) + ''',');

            SQL.Add('已結(jié)算= ' + sBool[True]);
            SQL.Add(' WHERE 卡號(hào)=''' + 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');//出錯(cuò)了,怎么辦?
           end;

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

           SQL.Add('WHERE 編號(hào)=''' + 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');//出錯(cuò)了,怎么辦?
           end;


           //end;
          //end;
          end else   //第一次來(lái)付費(fèi)
           begin
           Close;
           SQL.Clear;
           SQL.Add('UPDATE JY_Park_Rec_Info SET');
           SQL.Add('出場(chǎng)時(shí)間=''' + Edit5.Text + ''',');
           SQL.Add('停車費(fèi)用=''' + Edit7.Text + ''',');
           //SQL.Add('出口編號(hào)=' + lbDev.Caption + ',');
           if czkout then
            SQL.Add('收費(fèi)員=''' + spaceuser + '''')
           else
           SQL.Add('收費(fèi)員=''' + LocalUser.Name + '''');
           //SQL.Add('大小停車場(chǎng)=''' + );
           SQL.Add('WHERE 編號(hào)=''' + 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');//出錯(cuò)了,怎么辦?
           // SQL.SaveToFile(AppDir+'\logs\' + DateTimeToStr(now)+'.txt');//出錯(cuò)了,怎么辦?
           end;


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

          //SQL.Add('UPDATE JY_Park_Card_Info SET');
          //SQL.Add('所在停車場(chǎng)=' + IntToStr(nPrkID-1) + 'WHERE 卡號(hào)=''' + 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');//出錯(cuò)了,怎么辦?
          end;
         end;
       end;
  end else  //普通收費(fèi)模式
  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 標(biāo)識(shí)=1');
    SQL.Add('WHERE 編號(hào)=''' + gSid + '''');  //
     try
       ExecSQL;
       except
        ;//showmessage('圖像標(biāo)識(shí)失敗');
      end;
     end;