If worker come to company 5 minutes and
- if (Int32.Parse(queryString) != 0)
- {
- //provjeravamo da li se radnik mozda prijavio prije 5 minuta, samim tim nema pravo na odjavu a ni na novu prijavu
- string commanda = "SELECT CASE WHEN (SELECT FLOOR(TIME_TO_SEC(TIMEDIFF(now(),max(VrijemeDolaska)))/60) from prijava_radnika where IdPosjetioc=" + osobaId + ") < 5 THEN 1 ELSE 0 END;";
- //MessageBox.Show(commanda);
- int broj = Int32.Parse.Execute(commanda));
- commanda = "SELECT CASE WHEN (SELECT FLOOR(TIME_TO_SEC(TIMEDIFF(now(),max(VrijemeOdlaska)))/60) from prijava_radnika where IdPosjetioc=" + osobaId + ") < 5 THEN 1 ELSE 0 END;";
- int broj2 = Int32.Parse.Execute(commanda));
- //MessageBox.Show(broj.ToString());
- if (broj == 1 || broj2 == 1)
- {
- notificationPanel.BackColor = System.Drawing.ColorTranslator.FromHtml("#FD7400");
- messageLabel.Text = "Prijava i odjava su blokirani 5 minuta \nza ovog radnika";
- textBox1.Text = "";
- }
- else
- { //rest code of app....
Rafnas T PPosted Apr 4, 2018, 6:40 AM
Rafnas T PPosted Apr 5, 2018, 2:35 AM
Goran BibicPosted Apr 5, 2018, 2:30 AM
Rafnas T PPosted Apr 5, 2018, 2:25 AM
Goran BibicPosted Apr 5, 2018, 2:22 AM
Rafnas T PPosted Apr 5, 2018, 2:13 AM
Goran BibicPosted Apr 5, 2018, 2:11 AM
Rafnas T PPosted Apr 5, 2018, 2:02 AM
Goran BibicPosted Apr 5, 2018, 1:33 AM
Rafnas T PPosted Apr 5, 2018, 1:29 AM
Goran BibicPosted Apr 5, 2018, 1:22 AM
Rafnas T PPosted Apr 5, 2018, 1:21 AM
Goran BibicPosted Apr 4, 2018, 1:32 PM
Goran BibicPosted Apr 4, 2018, 9:47 AM
Rafnas T PPosted Apr 4, 2018, 8:30 AM
Rafnas T PPosted Apr 4, 2018, 8:27 AM
Goran BibicPosted Apr 4, 2018, 7:57 AM
Rafnas T PPosted Apr 4, 2018, 7:45 AM
Rafnas T PPosted Apr 4, 2018, 6:30 AM
Goran BibicPosted Apr 4, 2018, 6:21 AM
Goran BibicPosted Apr 4, 2018, 6:20 AM
Rafnas T PPosted Apr 4, 2018, 6:20 AM
Goran BibicPosted Apr 4, 2018, 6:12 AM
Rafnas T PPosted Apr 4, 2018, 6:09 AM
Goran BibicPosted Apr 4, 2018, 6:08 AM
Rafnas T PPosted Apr 4, 2018, 6:03 AM