मैं कर रहा हूँ एक बिट खो दिया है मैं नहीं जानता कि कैसे प्रदर्शित करने के लिए एक अधिसूचना के बाद एक. चलो कहते हैं, उदाहरण के लिए, मेरे वर्तमान समय है "23/11/2021 08:00" और मैं चाहता हूँ करने के लिए एक अनुस्मारक बनाने के लिए "23/11/2021 09:30" पहली बार अधिसूचना ऊपर चबूतरे लेकिन अगर मैं बनाने के लिए एक और अनुस्मारक के लिए "23/11/2021 09:35" सूचना दिखाई नहीं जब तक मैं इस कार्यक्रम को बंद करने के बाद पहले अनुस्मारक अधिसूचना प्रदर्शित किया गया है और उदाहरण के लिए यदि उपयोगकर्ता सेट की तुलना में अधिक 1 अनुस्मारक है कि एक ही तारीख और समय तो केवल 1 अधिसूचना प्रदर्शित किया जाना चाहिए.
धन्यवाद.
यह क्या है मेरे रूप की तरह लग रहा है
Imports System.Data.OleDb
Public Class frmReminder
Private CurrentReminderID As Integer = -1
Private Sub frmReminder_Load(sender As Object, e As EventArgs) Handles MyBase.Load
BtnClear.PerformClick()
Timer1.Enabled = True
Timer2.Enabled = True
End Sub
Dim CurrentDateTime As Date
Dim ReminderDateTime As Date
Public Sub ShowNotification()
Notification.ShowBalloonTip(1000, "Reminder", "Customer Order Due!", ToolTipIcon.None)
End Sub
Private Sub DateTimeVariable()
CurrentDateTime = Date.Now
CurrentDateTime = FormatDateTime(DateTime.Now, DateFormat.GeneralDate)
ReminderDateTime = FormatDateTime(ReminderDateTime, DateFormat.GeneralDate)
If CurrentDateTime = ReminderDateTime Then
ShowNotification()
Else
If DbConnect() Then
Dim SQLCmd As New OleDbCommand
With SQLCmd
.Connection = cn
.CommandText = "SELECT ReminderDate FROM TblReminder"
Dim rs As OleDbDataReader = .ExecuteReader()
ReminderDateTime = (rs(0))
End With
End If
cn.Close()
End If
End Sub
Private Sub BtnClear_Click(sender As Object, e As EventArgs) Handles BtnClear.Click
Label6.Text = ""
TxtCustName.Text = ""
TxtDeviceInfo.Text = ""
TxtPrice.Text = ""
TxtReminderDateTime.ResetText()
CurrentReminderID = -1
End Sub
Private Sub BtnSetReminder_Click(sender As Object, e As EventArgs) Handles BtnSetReminder.Click
If TxtCustName.Text.Length < 1 Then
MessageBox.Show("Customer name is empty!" & vbCrLf, "Reminder", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
TxtCustName.Focus()
ElseIf TxtDeviceInfo.Text.Length < 1 Then
MessageBox.Show("Device Information is empty!" & vbCrLf, "Reminder", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
TxtDeviceInfo.Focus()
ElseIf TxtPrice.Text.Length < 1 Then
MessageBox.Show("No price entered!" & vbCrLf, "Reminder", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
TxtPrice.Focus()
ElseIf DbConnect() Then
Dim SQLCmd As New OleDbCommand
If CurrentReminderID = -1 Then
With SQLCmd
.Connection = cn
.CommandText = "Insert into TblReminder (CustomerName, DeviceInfo, RepairPrice, ReminderDate)"
.CommandText &= "Values (@CustomerName, @DeviceInfo, @RepairPrice, @ReminderDate)"
.Parameters.AddWithValue("@CustomerName", TxtCustName.Text)
.Parameters.AddWithValue("@DeviceInfo", TxtDeviceInfo.Text)
.Parameters.AddWithValue("@RepairPrice", TxtPrice.Text)
.Parameters.AddWithValue(" @ReminderDate", TxtReminderDateTime.Text)
.ExecuteNonQuery()
.CommandText = "Select @@Identity"
CurrentReminderID = .ExecuteScalar
Label6.Text = CurrentReminderID
'ShowNotification()
End With
End If
End If
End Sub
Private Sub TxtCustName_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TxtCustName.KeyPress
If Not Char.IsLetter(e.KeyChar) Then 'Checks if key pressed isn't a digit
If Asc(e.KeyChar) <> Keys.Back Then 'Checks the key pressed wasn't Backspace
e.Handled = True 'It doesn't take any further action
End If
End If
End Sub
Private Sub TxtPrice_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TxtPrice.KeyPress
If Not Char.IsDigit(e.KeyChar) Then 'Checks if key pressed isn't a digit
If Asc(e.KeyChar) <> Keys.Back Then 'Checks the key pressed wasn't Backspace
e.Handled = True 'It doesn't take any further action
End If
End If
End Sub
Private Sub Notification_Click(sender As Object, e As EventArgs) Handles Notification.Click
frmReminderInfo.Show()
End Sub
Private Sub Notification_BalloonTipClicked(sender As Object, e As EventArgs) Handles Notification.BalloonTipClicked
frmReminderInfo.Show()
End Sub
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
DateTimeVariable()
End Sub
Private Sub BtnOpenReminders_Click(sender As Object, e As EventArgs) Handles BtnOpenReminders.Click
frmReminderInfo.Show()
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
TxtCurrentDateTime.Text = Date.Now.ToString("dd/MM/yyyy HH:mm")
End Sub
End Class