|
void GunlukGorevleriOlustur; var LBugun: String; LVarMi: Boolean; LQry: TClSQLiteQuery; LQry2: TClSQLiteQuery; { LBugun = FormatDateTime('yyyy-mm-dd', Now);
try LQry = Clomosy.DBSQLiteQueryWith( 'SELECT ID FROM TblGorevler WHERE Tarih=' + QuotedStr(LBugun) + ' AND AcilMi=0 LIMIT 1' ); LQry.OpenOrExecute; LVarMi = LQry.Found; LQry.Free;
if not (LVarMi) { LQry2 = Clomosy.DBSQLiteQueryWith('SELECT * FROM TblSabitGorevler'); LQry2.OpenOrExecute;
while (not LQry2.Eof) { Clomosy.DBSQLiteQuery.Sql.Text = 'INSERT INTO TblGorevler (AtananPersonelID, Lokasyon, Aciklama, QRKodu, PlanlananSaat, BaslangicSaati, BitisSaati, Durum, DurumNotu, Tarih, AcilMi) VALUES (' + IntToStr(LQry2.FieldByName('PersonelID').AsInteger) + ', ' + QuotedStr(LQry2.FieldByName('Lokasyon').AsString) + ', ' + QuotedStr('Sabit görev') + ', ' + QuotedStr(LQry2.FieldByName('QRKodu').AsString) + ', ' + QuotedStr(LQry2.FieldByName('PlanlananSaat').AsString) ', ' + QuotedStr('-') + ', ' + QuotedStr('-') + ', ' + QuotedStr('Bekliyor') + ', ' + QuotedStr('-') + ', ' + QuotedStr(LBugun) + ', ' + '0)'; Clomosy.DBSQLiteQuery.OpenOrExecute; LQry2.Next; }
LQry2.Free; } except ShowMessage('Günlük görev oluşturma hatası: ' + LastExceptionMessage); } } bu kodda hata var ama bulamadım. yardımcı olabilirmisiniz. https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496" integrity="sha512-ZE9pZaUXND66v380QUtch/5sE9tPFh2zg45pR2PB0CVkCtOREv2AJKkSidISWkysEuQ0EH8faUU5du78bx87UQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">
|