




已阅读5页,还剩11页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.OleDb;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication2 public partial class Form1 : Form public Form1() InitializeComponent(); private void pictureBox1_Click(object sender, EventArgs e) public static string kaohao, password; OleDbConnection conn = new OleDbConnection(); OleDbCommand comm = new OleDbCommand(); OleDbDataAdapter adapter = new OleDbDataAdapter(); DataSet ds = new DataSet(); private void Form1_Load(object sender, EventArgs e) if (timer1 .Enabled =false ) timer1 .Enabled =true ; private void button1_Click_1(object sender, EventArgs e) kaohao = txthao.Text; password = txtmima.Text; string connString = Provider=Microsoft.Jet.OleDb.4.0;Data Source=user.mdb; OleDbConnection conn = new OleDbConnection(connString); string oledb = string.Format(select count(*) from user where kaohao=0 and password=1 , kaohao , password ); try conn .Open() ; OleDbCommand comm =new OleDbCommand (oledb ,conn ); int num =(int )comm .ExecuteScalar(); if (num 0) this.Hide(); form form = new form(); form.Show(); else MessageBox.Show(考号、密码可能不准确!, 登录失败, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txthao.Text = ; txtmima.Text = ; txthao.Focus(); finally conn.Close(); private void button2_Click(object sender, EventArgs e) this.Close(); private void texthao_TextChanged(object sender, EventArgs e) private void label1_Click(object sender, EventArgs e) private void timer1_Tick(object sender, EventArgs e) int t; t = label1.Top + label1.Height; label1.Top = label1.Top - 2; if (t = progressBar1.Minimum) progressBar1.Value -= 1; /a = i - 60; /b = i - 3600; switch (i) case 600: MessageBox.Show(离考试结束还有十分钟,请您把握好时间, 错误, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); break; private void progressBar1_Click(object sender, EventArgs e) private void btntext_Click(object sender, EventArgs e) private void tabPage2_Click(object sender, EventArgs e) private void tabPage1_Click(object sender, EventArgs e) private void radioButton3_CheckedChanged(object sender, EventArgs e) private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) private void linkLabel12_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) private void linkLabel12_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e) int n = 0; int s1 = 1; private void button3_Click(object sender, EventArgs e) if (n = 1) n = n - 1; else button2.Enabled = false; button3.Enabled = true; s1 = s1 -1 ; textBox2.Text = s1.ToString(); textonlyBindingSource.MovePrevious(); private void textBox3_TextChanged(object sender, EventArgs e) private void splitContainer2_Panel1_Paint(object sender, PaintEventArgs e) private void fileTextBox_TextChanged(object sender, EventArgs e) private void fileLabel_Click(object sender, EventArgs e) private void textTextBox_TextChanged_1(object sender, EventArgs e) int c = 0; int s2 = 1; private void button6_Click(object sender, EventArgs e) if (c = 1) c -= 1; else button6.Enabled = false; button7.Enabled = true; s2 =s2 -1; textBox3 .Text = s2.ToString(); /chooseBindingSource.MoveNext(); chooseBindingSource.MovePrevious(); private void button7_Click(object sender, EventArgs e) if (c = 2) c += 1; else button7.Enabled = false; button6.Enabled = true; s2 = s2 += 1; textBox3.Text = s2 .ToString(); chooseBindingSource.MoveNext(); int t = 0; int s3 = 1; private void button4_Click(object sender, EventArgs e) if (t = 1) t -= 1; else button5.Enabled = false; button4.Enabled = true; s3 = s3 - 1; textBox5 .Text =s3.ToString (); fileBindingSource.MovePrevious(); private void aTextBox_TextChanged(object sender, EventArgs e) private void aLabel_Click(object sender, EventArgs e) private void textonlyBindingNavigatorSaveItem_Click(object sender, EventArgs e) this.Validate(); this.textonlyBindingSource.EndEdit(); this.tableAdapterManager.UpdateAll(this.textonlyDataSet); private void chooseBindingNavigatorSaveItem_Click(object sender, EventArgs e) this.Validate(); this.chooseBindingSource.EndEdit(); this.tableAdapterManager.UpdateAll(this.textonlyDataSet); private void fileBindingNavigatorSaveItem_Click(object sender, EventArgs e) this.Validate(); this.fileBindingSource.EndEdit(); this.tableAdapterManager.UpdateAll(this.textonlyDataSet); private void textBox2_TextChanged(object sender, EventArgs e) private void textonlyBindingNavigator_RefreshItems(object sender, EventArgs e) private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) private void textTextBox_TextChanged_2(object sender, EventArgs e) private void textBox6_TextChanged(object sender, EventArgs e) int a=119; private void timer2_Tick(object sender, EventArgs e) a = a - 1; if (a = 0) a = a + 120; if (a=120) textonlyBindingSource.MoveNext(); if (a =120) button2.Enabled = false; int b = 119; private void timer3_Tick(object sender, EventArgs e) b = b - 1; if (b = 0) b = b + 120; if (b = 120) chooseBindingSource.MoveNext(); if (b = 120) button6.Enabled = false; int q = 119; private void timer4_Tick(object sender, EventArgs e) q = q - 1; if (q = 0) q = q + 120; if (q = 120) fileBindingSource.MoveNext(); if (q = 120) button5. Enabled = false; private void rad1_CheckedChanged(object sender, EventArgs e) private void label14_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e) /信息保存 MessageBox.Show(确认保存?, 信息确认, MessageBoxButtons.OK, MessageBoxIcon.Warning); this.Validate(); this.textonlyBindingSource.EndEdit(); this.tableAdapterManager.UpdateAll(this.textonlyDataSet); /this.textonlyTableAdapter.Update(this.textonlyDataSet.textonly); private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e) private void fileTextBox_TextChanged_1(object sender, EventArgs e) private void textTextBox_TextChanged_3(object sender, EventArgs e) private void bTextBox_TextChanged(object sender, EventArgs e) private void textBox1_TextChanged(object sender, EventArgs e) private void bindingNavigatorDeleteItem_Click(object sender, EventArgs e) private void aTextBox_TextChanged_1(object sender, EventArgs e) private void button8_Click(object sender, EventArgs e) /信息保存 MessageBox.Show(确认保存?, 信息确认, MessageBoxButtons.OK, MessageBoxIcon.Warning); this.Validate(); this.textonlyBindingSource.EndEdit(); this.tableAdapterManager.UpdateAll(this.textonlyDataSet); this.textonlyTableAdapter.Update(this.textonlyDataSet.textonly); private void button11_Click(object sender, EventArgs e) Form Form4 = new Form4(); Form4.Show(); this.Hide(); Form4成绩查询界面作用:查询本次考试成绩 。所用控件:一个datagritview,一个button控件设计思路:详细内容:属性较特殊的需要说明。代码如下:using System;usin
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 医用设备试题及答案
- 整式试卷测试题及答案
- 招标采购岗试题及答案
- 高一物理期末考试题及答案
- 新沂教编考试试题及答案
- 2025年噶尔县教育系统招聘教师考试笔试试题(含答案)
- 2025年达州市农科院招聘考试笔试试题(含答案)
- 2025年医学装备相关知识培训考核题(含答案)
- 2024年民航安全隐患排查治理长效机制建设大比武指南试题及答案
- (2025)全国水利安全生产知识竞赛题库及参考答案
- T-HAS 141-2024 合成超硬材料用叶蜡石
- 股权转让股东会决议范本
- 合作社和公司合作协议书(2篇)
- 医药代表大客户管理经验分享
- 教师安全教育培训内容
- 人教版八年级下册地理2024-2025学年八年级下册地理期末综合测试卷(二)(含答案)
- 密态深度学习-记录
- 医院医学院医疗机构培训《烧伤病人护理教学查房》课件
- 家政服务协议书范本
- 中小学生研学旅行投标方案(技术方案)
- 成人手术后疼痛评估与护理-中华护理学会团体标准2023 2
评论
0/150
提交评论