示例#1
0
        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();
        }
示例#2
0
 public AdminLog(ConnectSQL consql, string reason)
 {
     InitializeComponent();
     cs          = consql;
     this.reason = reason;
     granted     = "NO";
 }
示例#3
0
        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;
        }