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

📄 changefriend.cs

📁 问题定义 随着生活水平的日益提高
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data;

namespace 通讯录
{
	/// <summary>
	/// 更改或删除通讯录信息
	/// </summary>
	public class changefriend : System.Windows.Forms.Form
	{
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.ComboBox cmbsearch;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Button btnsearch;
		private System.Windows.Forms.ComboBox cmbsearch2;
		private System.Windows.Forms.TextBox txtsearchvalue;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.PictureBox pictureBox1;
		private System.Windows.Forms.Label label11;
		private System.Windows.Forms.Label label12;
		private System.Windows.Forms.TextBox txtnowaddress;
		private System.Windows.Forms.TextBox txtfamilyaddress;
		private System.Windows.Forms.Label label8;
		private System.Windows.Forms.Label label13;
		private System.Windows.Forms.Label label14;
		private System.Windows.Forms.TextBox txtothers;
		private System.Windows.Forms.TextBox txtname;
		private System.Windows.Forms.TextBox txtimages;
		private System.Windows.Forms.TextBox txtmobilephone;
		private System.Windows.Forms.TextBox txttelephone;
		private System.Windows.Forms.TextBox txtadddate;
		private System.Windows.Forms.TextBox txtqq;
		private System.Windows.Forms.Button btnchange;
		private System.Windows.Forms.Button btndel;
		private System.Windows.Forms.Button btnexit;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		SqlConnection searchcon;
		DataSet ds=new DataSet();
		private System.Windows.Forms.TextBox txtemail;
		private System.Windows.Forms.Button btnnext;
		private System.Windows.Forms.Button btnpre;
		int j=0;//当前显示的记录序号
		int count=0;//查询到的总共记录数目
		private System.Windows.Forms.Label label3;
		private System.ComponentModel.Container components = null;
	

		public changefriend()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// 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()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(changefriend));
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.txtsearchvalue = new System.Windows.Forms.TextBox();
			this.cmbsearch2 = new System.Windows.Forms.ComboBox();
			this.btnsearch = new System.Windows.Forms.Button();
			this.cmbsearch = new System.Windows.Forms.ComboBox();
			this.label1 = new System.Windows.Forms.Label();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.label3 = new System.Windows.Forms.Label();
			this.txtqq = new System.Windows.Forms.TextBox();
			this.txtadddate = new System.Windows.Forms.TextBox();
			this.txtemail = new System.Windows.Forms.TextBox();
			this.txttelephone = new System.Windows.Forms.TextBox();
			this.txtmobilephone = new System.Windows.Forms.TextBox();
			this.txtimages = new System.Windows.Forms.TextBox();
			this.txtname = new System.Windows.Forms.TextBox();
			this.txtothers = new System.Windows.Forms.TextBox();
			this.txtfamilyaddress = new System.Windows.Forms.TextBox();
			this.txtnowaddress = new System.Windows.Forms.TextBox();
			this.label12 = new System.Windows.Forms.Label();
			this.label11 = new System.Windows.Forms.Label();
			this.pictureBox1 = new System.Windows.Forms.PictureBox();
			this.label10 = new System.Windows.Forms.Label();
			this.label9 = new System.Windows.Forms.Label();
			this.label7 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.label13 = new System.Windows.Forms.Label();
			this.label14 = new System.Windows.Forms.Label();
			this.btnchange = new System.Windows.Forms.Button();
			this.btndel = new System.Windows.Forms.Button();
			this.btnexit = new System.Windows.Forms.Button();
			this.btnnext = new System.Windows.Forms.Button();
			this.btnpre = new System.Windows.Forms.Button();
			this.groupBox1.SuspendLayout();
			this.groupBox2.SuspendLayout();
			this.SuspendLayout();
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.txtsearchvalue);
			this.groupBox1.Controls.Add(this.cmbsearch2);
			this.groupBox1.Controls.Add(this.btnsearch);
			this.groupBox1.Controls.Add(this.cmbsearch);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
			this.groupBox1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.groupBox1.ForeColor = System.Drawing.Color.Red;
			this.groupBox1.Location = new System.Drawing.Point(0, 0);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(752, 72);
			this.groupBox1.TabIndex = 4;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "被操作纪录查询";
			// 
			// txtsearchvalue
			// 
			this.txtsearchvalue.ForeColor = System.Drawing.Color.Black;
			this.txtsearchvalue.Location = new System.Drawing.Point(408, 25);
			this.txtsearchvalue.Name = "txtsearchvalue";
			this.txtsearchvalue.Size = new System.Drawing.Size(152, 23);
			this.txtsearchvalue.TabIndex = 8;
			this.txtsearchvalue.Text = "";
			// 
			// cmbsearch2
			// 
			this.cmbsearch2.Items.AddRange(new object[] {
															"等于",
															"类似"});
			this.cmbsearch2.Location = new System.Drawing.Point(264, 26);
			this.cmbsearch2.Name = "cmbsearch2";
			this.cmbsearch2.Size = new System.Drawing.Size(104, 22);
			this.cmbsearch2.TabIndex = 7;
			this.cmbsearch2.Text = "等于";
			// 
			// btnsearch
			// 
			this.btnsearch.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnsearch.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.btnsearch.ForeColor = System.Drawing.Color.Black;
			this.btnsearch.Location = new System.Drawing.Point(592, 17);
			this.btnsearch.Name = "btnsearch";
			this.btnsearch.Size = new System.Drawing.Size(96, 32);
			this.btnsearch.TabIndex = 6;
			this.btnsearch.Text = "查询";
			this.btnsearch.Click += new System.EventHandler(this.btnsearch_Click);
			// 
			// cmbsearch
			// 
			this.cmbsearch.Items.AddRange(new object[] {
														   "姓名",
														   "电话号码",
														   "手机号码",
														   "qq号码",
														   "电子邮件"});
			this.cmbsearch.Location = new System.Drawing.Point(98, 26);
			this.cmbsearch.Name = "cmbsearch";
			this.cmbsearch.Size = new System.Drawing.Size(128, 22);
			this.cmbsearch.TabIndex = 5;
			this.cmbsearch.Text = "姓名";
			// 
			// label1
			// 
			this.label1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label1.ForeColor = System.Drawing.Color.Black;
			this.label1.Location = new System.Drawing.Point(8, 29);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(80, 23);
			this.label1.TabIndex = 4;
			this.label1.Text = "查询条件:";
			// 
			// groupBox2
			// 
			this.groupBox2.Controls.Add(this.label3);
			this.groupBox2.Controls.Add(this.txtqq);
			this.groupBox2.Controls.Add(this.txtadddate);
			this.groupBox2.Controls.Add(this.txtemail);
			this.groupBox2.Controls.Add(this.txttelephone);
			this.groupBox2.Controls.Add(this.txtmobilephone);
			this.groupBox2.Controls.Add(this.txtimages);
			this.groupBox2.Controls.Add(this.txtname);
			this.groupBox2.Controls.Add(this.txtothers);
			this.groupBox2.Controls.Add(this.txtfamilyaddress);
			this.groupBox2.Controls.Add(this.txtnowaddress);
			this.groupBox2.Controls.Add(this.label12);
			this.groupBox2.Controls.Add(this.label11);
			this.groupBox2.Controls.Add(this.pictureBox1);
			this.groupBox2.Controls.Add(this.label10);
			this.groupBox2.Controls.Add(this.label9);
			this.groupBox2.Controls.Add(this.label7);
			this.groupBox2.Controls.Add(this.label6);
			this.groupBox2.Controls.Add(this.label2);
			this.groupBox2.Controls.Add(this.label8);
			this.groupBox2.Controls.Add(this.label13);
			this.groupBox2.Controls.Add(this.label14);
			this.groupBox2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.groupBox2.ForeColor = System.Drawing.Color.Red;
			this.groupBox2.Location = new System.Drawing.Point(1, 74);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(751, 296);
			this.groupBox2.TabIndex = 5;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "查询结果";
			// 
			// label3
			// 
			this.label3.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label3.ForeColor = System.Drawing.Color.Blue;
			this.label3.Location = new System.Drawing.Point(120, 24);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(544, 24);
			this.label3.TabIndex = 22;
			this.label3.Text = "label3";
			// 
			// txtqq
			// 
			this.txtqq.Location = new System.Drawing.Point(608, 168);
			this.txtqq.Name = "txtqq";
			this.txtqq.Size = new System.Drawing.Size(128, 23);
			this.txtqq.TabIndex = 21;
			this.txtqq.Text = "";
			// 
			// txtadddate
			// 
			this.txtadddate.Location = new System.Drawing.Point(120, 160);
			this.txtadddate.Name = "txtadddate";
			this.txtadddate.Size = new System.Drawing.Size(136, 23);
			this.txtadddate.TabIndex = 20;
			this.txtadddate.Text = "";
			// 
			// txtemail
			// 
			this.txtemail.Location = new System.Drawing.Point(608, 112);
			this.txtemail.Name = "txtemail";
			this.txtemail.Size = new System.Drawing.Size(128, 23);
			this.txtemail.TabIndex = 19;
			this.txtemail.Text = "";
			// 
			// txttelephone
			// 
			this.txttelephone.Location = new System.Drawing.Point(120, 112);
			this.txttelephone.Name = "txttelephone";
			this.txttelephone.Size = new System.Drawing.Size(136, 23);
			this.txttelephone.TabIndex = 18;
			this.txttelephone.Text = "";
			// 
			// txtmobilephone
			// 
			this.txtmobilephone.Location = new System.Drawing.Point(608, 64);
			this.txtmobilephone.Name = "txtmobilephone";
			this.txtmobilephone.Size = new System.Drawing.Size(128, 23);
			this.txtmobilephone.TabIndex = 17;
			this.txtmobilephone.Text = "";
			// 
			// txtimages
			// 
			this.txtimages.Location = new System.Drawing.Point(360, 64);
			this.txtimages.Name = "txtimages";
			this.txtimages.Size = new System.Drawing.Size(136, 23);
			this.txtimages.TabIndex = 16;
			this.txtimages.Text = "";
			this.txtimages.TextChanged += new System.EventHandler(this.txtimages_TextChanged);
			// 
			// txtname
			// 
			this.txtname.Location = new System.Drawing.Point(120, 72);
			this.txtname.Name = "txtname";
			this.txtname.Size = new System.Drawing.Size(136, 23);
			this.txtname.TabIndex = 15;
			this.txtname.Text = "";
			// 
			// txtothers
			// 
			this.txtothers.Location = new System.Drawing.Point(120, 256);
			this.txtothers.Name = "txtothers";
			this.txtothers.Size = new System.Drawing.Size(616, 23);
			this.txtothers.TabIndex = 14;
			this.txtothers.Text = "";
			// 
			// txtfamilyaddress
			// 
			this.txtfamilyaddress.Location = new System.Drawing.Point(448, 208);
			this.txtfamilyaddress.Name = "txtfamilyaddress";
			this.txtfamilyaddress.Size = new System.Drawing.Size(288, 23);
			this.txtfamilyaddress.TabIndex = 13;
			this.txtfamilyaddress.Text = "";
			// 
			// txtnowaddress
			// 
			this.txtnowaddress.Location = new System.Drawing.Point(120, 208);
			this.txtnowaddress.Name = "txtnowaddress";
			this.txtnowaddress.Size = new System.Drawing.Size(240, 23);
			this.txtnowaddress.TabIndex = 12;
			this.txtnowaddress.Text = "";
			// 
			// label12
			// 
			this.label12.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label12.ForeColor = System.Drawing.Color.Black;
			this.label12.Location = new System.Drawing.Point(16, 256);
			this.label12.Name = "label12";
			this.label12.Size = new System.Drawing.Size(80, 23);
			this.label12.TabIndex = 11;
			this.label12.Text = "备注信息:";
			// 
			// label11
			// 
			this.label11.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label11.ForeColor = System.Drawing.Color.Black;
			this.label11.Location = new System.Drawing.Point(368, 208);
			this.label11.Name = "label11";
			this.label11.Size = new System.Drawing.Size(88, 23);
			this.label11.TabIndex = 10;
			this.label11.Text = "家庭地址:";
			// 
			// pictureBox1
			// 
			this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
			this.pictureBox1.Location = new System.Drawing.Point(408, 96);
			this.pictureBox1.Name = "pictureBox1";
			this.pictureBox1.Size = new System.Drawing.Size(88, 96);
			this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
			this.pictureBox1.TabIndex = 9;
			this.pictureBox1.TabStop = false;
			// 
			// label10
			// 
			this.label10.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label10.ForeColor = System.Drawing.Color.Black;
			this.label10.Location = new System.Drawing.Point(16, 160);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(80, 23);
			this.label10.TabIndex = 8;
			this.label10.Text = "添加日期:";
			// 
			// label9
			// 
			this.label9.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label9.ForeColor = System.Drawing.Color.Black;
			this.label9.Location = new System.Drawing.Point(272, 72);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(56, 23);
			this.label9.TabIndex = 7;
			this.label9.Text = "照片:";
			// 
			// label7
			// 
			this.label7.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label7.ForeColor = System.Drawing.Color.Black;
			this.label7.Location = new System.Drawing.Point(528, 120);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(64, 23);
			this.label7.TabIndex = 5;
			this.label7.Text = "Email:";
			// 
			// label6
			// 
			this.label6.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label6.ForeColor = System.Drawing.Color.Black;
			this.label6.Location = new System.Drawing.Point(528, 168);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(56, 23);
			this.label6.TabIndex = 4;
			this.label6.Text = "QQ:";
			// 
			// label2
			// 
			this.label2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label2.ForeColor = System.Drawing.Color.Black;
			this.label2.Location = new System.Drawing.Point(16, 208);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(64, 23);
			this.label2.TabIndex = 0;
			this.label2.Text = "现居地:";
			// 
			// label8
			// 
			this.label8.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label8.ForeColor = System.Drawing.Color.Black;
			this.label8.Location = new System.Drawing.Point(520, 64);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(62, 24);
			this.label8.TabIndex = 3;
			this.label8.Text = "手机:";
			// 
			// label13
			// 
			this.label13.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));

⌨️ 快捷键说明

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