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

📄 customerdialog.cs

📁 很好呀!这是我们学校老师让做的学期末的课程设计
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication2
{
	public partial class CustomerDialog : Form
	{
		private string _selectId;

		public string SelectID
		{
			get
			{
				return _selectId;
			}
		}

		public CustomerDialog()
		{
			InitializeComponent();
		}

		private void button1_Click(object sender, EventArgs e)
		{
			if (dataGridView1.DataSource is BindingSource && ((BindingSource)dataGridView1.DataSource).Current != null)
				_selectId = (string)((DataRowView)((BindingSource)dataGridView1.DataSource).Current)["CUSTOMER_ID"];
			this.DialogResult = DialogResult.OK;
			Close();
		}

		private void button2_Click(object sender, EventArgs e)
		{
			Close();
		}

		public void InitializeForm(BindingSource dataSource)
		{
			dataGridView1.AutoGenerateColumns = false;
			dataGridView1.DataSource = dataSource;
		}

		private void CustomerDialog_Load(object sender, EventArgs e)
		{

		}

		private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
		{
			button1_Click(this, EventArgs.Empty);
		}
	}
}

⌨️ 快捷键说明

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