⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ope_manage.cs

📁 学生管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;

namespace chaxun
{
	/// <summary>
	/// Ope_manage 的摘要说明。
	/// </summary>
	public class Ope_manage : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button btnIncrease;
		private System.Windows.Forms.Button btnModification;
		private System.Windows.Forms.Button btndelete;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.Button button4;
		private System.Windows.Forms.DataGrid dataGrid1;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.TextBox textBox1;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.TextBox textBox2;
		private System.Windows.Forms.TextBox textBox3;
		private System.Windows.Forms.TextBox textBox4;
		private System.Windows.Forms.Button button3;
		private System.Windows.Forms.GroupBox groupBox3;
		private System.Windows.Forms.GroupBox groupBox4;
		private System.Windows.Forms.GroupBox groupBox5;


		private SqlDataAdapter thisAdapter;
		private DataSet mydataset;	
		BindingManagerBase bManager;
		private System.Windows.Forms.TextBox txtID;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public Ope_manage()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			SqlConnection thisConnection=new SqlConnection("integrated security=SSPI;data source=.;persist security info=False;initial catalog=xxgcx");  
			thisAdapter=new SqlDataAdapter("	SELECT xh as 用户ID,xm as 用户姓名 ,mm as 用户密码, Op_level 用户权限 from student",thisConnection);
			SqlCommandBuilder thisBuilder=new SqlCommandBuilder(thisAdapter);
			mydataset=new DataSet();
			thisAdapter.Fill(mydataset,"student");

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.btnIncrease = new System.Windows.Forms.Button();
			this.btnModification = new System.Windows.Forms.Button();
			this.btndelete = new System.Windows.Forms.Button();
			this.button1 = new System.Windows.Forms.Button();
			this.button2 = new System.Windows.Forms.Button();
			this.button4 = new System.Windows.Forms.Button();
			this.dataGrid1 = new System.Windows.Forms.DataGrid();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.textBox2 = new System.Windows.Forms.TextBox();
			this.textBox3 = new System.Windows.Forms.TextBox();
			this.textBox4 = new System.Windows.Forms.TextBox();
			this.button3 = new System.Windows.Forms.Button();
			this.groupBox3 = new System.Windows.Forms.GroupBox();
			this.groupBox4 = new System.Windows.Forms.GroupBox();
			this.groupBox5 = new System.Windows.Forms.GroupBox();
			this.txtID = new System.Windows.Forms.TextBox();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
			this.groupBox1.SuspendLayout();
			this.groupBox2.SuspendLayout();
			this.SuspendLayout();
			// 
			// btnIncrease
			// 
			this.btnIncrease.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnIncrease.Location = new System.Drawing.Point(18, 37);
			this.btnIncrease.Name = "btnIncrease";
			this.btnIncrease.Size = new System.Drawing.Size(54, 38);
			this.btnIncrease.TabIndex = 11;
			this.btnIncrease.Text = "添加";
			this.btnIncrease.Click += new System.EventHandler(this.btnIncrease_Click);
			// 
			// btnModification
			// 
			this.btnModification.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnModification.Location = new System.Drawing.Point(18, 100);
			this.btnModification.Name = "btnModification";
			this.btnModification.Size = new System.Drawing.Size(54, 37);
			this.btnModification.TabIndex = 12;
			this.btnModification.Text = "修改";
			this.btnModification.Click += new System.EventHandler(this.btnModification_Click);
			// 
			// btndelete
			// 
			this.btndelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btndelete.Location = new System.Drawing.Point(18, 162);
			this.btndelete.Name = "btndelete";
			this.btndelete.Size = new System.Drawing.Size(54, 37);
			this.btndelete.TabIndex = 13;
			this.btndelete.Text = "删除";
			this.btndelete.Click += new System.EventHandler(this.btndelete_Click);
			// 
			// button1
			// 
			this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.button1.Location = new System.Drawing.Point(102, 12);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(54, 38);
			this.button1.TabIndex = 14;
			this.button1.Text = "上一条";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// button2
			// 
			this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.button2.Location = new System.Drawing.Point(18, 12);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(54, 38);
			this.button2.TabIndex = 15;
			this.button2.Text = "下一条";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// button4
			// 
			this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.button4.Location = new System.Drawing.Point(240, 299);
			this.button4.Name = "button4";
			this.button4.Size = new System.Drawing.Size(54, 31);
			this.button4.TabIndex = 17;
			this.button4.Text = "确定";
			this.button4.Click += new System.EventHandler(this.button4_Click);
			// 
			// dataGrid1
			// 
			this.dataGrid1.DataMember = "";
			this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid1.Location = new System.Drawing.Point(6, 6);
			this.dataGrid1.Name = "dataGrid1";
			this.dataGrid1.PreferredColumnWidth = 100;
			this.dataGrid1.ReadOnly = true;
			this.dataGrid1.Size = new System.Drawing.Size(300, 218);
			this.dataGrid1.TabIndex = 18;
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.btnIncrease);
			this.groupBox1.Controls.Add(this.btnModification);
			this.groupBox1.Controls.Add(this.btndelete);
			this.groupBox1.Location = new System.Drawing.Point(312, 0);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(84, 224);
			this.groupBox1.TabIndex = 19;
			this.groupBox1.TabStop = false;
			// 
			// groupBox2
			// 
			this.groupBox2.Controls.Add(this.button1);
			this.groupBox2.Controls.Add(this.button2);
			this.groupBox2.Location = new System.Drawing.Point(222, 230);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(174, 56);
			this.groupBox2.TabIndex = 20;
			this.groupBox2.TabStop = false;
			// 
			// textBox1
			// 
			this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.textBox1.Location = new System.Drawing.Point(96, 230);
			this.textBox1.Name = "textBox1";
			this.textBox1.Size = new System.Drawing.Size(114, 21);
			this.textBox1.TabIndex = 21;
			this.textBox1.Text = "";
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(18, 230);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(66, 18);
			this.label1.TabIndex = 22;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -