public Rules(ConnectSQL conssql) { InitializeComponent(); cs = conssql; listView.Items.Clear(); SqlConnection cnn = new SqlConnection(cs.ConStr); cnn.Open(); SqlDataReader dataReader; SqlCommand cmd = cnn.CreateCommand(); string sql = "SElECT RuleID, RuleDescription FROM RuleTable"; cmd = new SqlCommand(sql, cnn); dataReader = cmd.ExecuteReader(); while (dataReader.Read()) { ListViewItem line = new ListViewItem(dataReader.GetValue(0).ToString()); line.SubItems.Add(dataReader.GetValue(1).ToString()); listView.Items.Add(line); } cnn.Close(); dataReader.Close(); cmd.Dispose(); }
public AdminLog(ConnectSQL consql, string reason) { InitializeComponent(); cs = consql; this.reason = reason; granted = "NO"; }
public StudentList(ConnectSQL consql) { InitializeComponent(); cs = consql; search = false; comboBoxType.Items.AddRange(new string[] { "StudentID", "First Name", "Last Name", "Email", "Daily Points", "Totla Points", "PinCode" }); LoadList(); }
public Authentication(ConnectSQL consql, string name) { InitializeComponent(); labelName.Text = name; this.name = name; cs = consql; if (Form1.connected == true) { ws = new WebSocket(); ws.connect(Form1.LocalIP, Form1.LocalPort, Form1.RemoteIP, Form1.RemotePort); } }
public UpdateInfoForm(ConnectSQL consql, string i, string f, string l, string e, string d, string t, string c) { InitializeComponent(); cs = consql; ID = i; labelID.Text = i; textBoxF.Text = f; textBoxL.Text = l; textBoxE.Text = e; labelD.Text = d; textBoxT.Text = t; textBoxC.Text = c; }