//only deaf can access, deaf button(log in deaf) private void button2_Click(object sender, EventArgs e) { deaf C = new deaf(textBox1.Text, textBox2.Text); DataTable d = C.getDeafId(); if (C.login()) { //var report = DateTime.Now //insert to database string sql = " INSERT INTO [reports] ([userName],[activityTime])"; string sql2 = "VALUES ('" + textBox1.Text + "',getdate())"; DBFunctions.ChangTable(sql + sql2); /* * List <Report> reports = select by id(deaf id) * reports[i].report in loop * / */ // MessageBox.Show("LOGIN Done"); this.Hide(); deafPage ss = new deafPage(); ss.Show(); } else { MessageBox.Show("Please check you Username and Password"); } }
//only deaf can access, deaf button(log in deaf) private void button2_Click(object sender, EventArgs e) { deaf C = new deaf(textBox1.Text, textBox2.Text); DataTable d = C.getDeafId(); if (C.login()) { // MessageBox.Show("LOGIN Done"); this.Hide(); deafPage ss = new deafPage(); ss.Closed += (s, args) => this.Close(); ss.Show(); } else { MessageBox.Show("Please check you Username and Password"); } }