-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathalerts.cs
66 lines (57 loc) · 2 KB
/
alerts.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace NewPOS
{
public partial class alerts : Form
{
public alerts()
{
InitializeComponent();
}
private void alerts_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'database1DataSet.tblProduct' table. You can move, or remove it, as needed.
this.tblProductTableAdapter1.Fill(this.database1DataSet.tblProduct);
// TODO: This line of code loads data into the 'summaryreport.tblProduct' table. You can move, or remove it, as needed.
this.tblProductTableAdapter.Fill(this.summaryreport.tblProduct);
if (Properties.Settings.Default.Alerts == "Yes")
{
enablealerts.Checked = true;
}
if (Properties.Settings.Default.Alerts == "No")
{
enablealerts.Checked = false;
}
}
private void dataGridView1_DataMemberChanged(object sender, EventArgs e)
{
tblProductTableAdapter1.Update(this.database1DataSet.tblProduct);
}
private void dataGridView1_BindingContextChanged(object sender, EventArgs e)
{
tblProductTableAdapter1.Update(this.database1DataSet.tblProduct);
}
private void dataGridView1_Validated(object sender, EventArgs e)
{
tblProductTableAdapter1.Update(this.database1DataSet.tblProduct);
}
private void enablealerts_CheckedChanged(object sender, EventArgs e)
{
if (enablealerts.Checked == true)
{
Properties.Settings.Default.Alerts = "Yes";
}
if (enablealerts.Checked == false)
{
Properties.Settings.Default.Alerts = "No";
}
}
}
}