productdialog.cs
来自「很好呀!这是我们学校老师让做的学期末的课程设计」· CS 代码 · 共 116 行
CS
116 行
using System;
using System.Data;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace WindowsApplication2
{
public class ProductDialog : Orphean.WinFormHelper.Framework.BaseForms.LookupDialog
{
private DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
private DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
private System.ComponentModel.IContainer components = null;
private DataGridViewTextBoxColumn ProductId;
private DataGridViewTextBoxColumn ProductName;
private string _selectId;
public string SelectID
{
get
{
return _selectId;
}
}
public ProductDialog()
{
// This call is required by the Windows Form Designer.
InitializeComponent();
// TODO: Add any initialization after the InitializeComponent call
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
#region Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProductDialog));
this.ProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.gridLookup)).BeginInit();
this.SuspendLayout();
//
// gridLookup
//
this.gridLookup.AccessibleDescription = null;
this.gridLookup.AccessibleName = null;
this.gridLookup.AllowUserToAddRows = false;
this.gridLookup.AllowUserToDeleteRows = false;
resources.ApplyResources(this.gridLookup, "gridLookup");
this.gridLookup.BackgroundImage = null;
this.gridLookup.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.ProductId,
this.ProductName});
this.gridLookup.Font = null;
this.gridLookup.MultiSelect = false;
this.gridLookup.RowTemplate.Height = 24;
//
// ProductId
//
this.ProductId.DataPropertyName = "PRODUCT_ID";
resources.ApplyResources(this.ProductId, "ProductId");
this.ProductId.Name = "ProductId";
this.ProductId.ReadOnly = true;
//
// ProductName
//
this.ProductName.DataPropertyName = "PRODUCT_NAME";
resources.ApplyResources(this.ProductName, "ProductName");
this.ProductName.Name = "ProductName";
this.ProductName.ReadOnly = true;
//
// ProductDialog
//
this.AccessibleDescription = null;
this.AccessibleName = null;
resources.ApplyResources(this, "$this");
this.BackgroundImage = null;
this.Font = null;
this.Icon = null;
this.Name = "ProductDialog";
((System.ComponentModel.ISupportInitialize)(this.gridLookup)).EndInit();
this.ResumeLayout(false);
}
#endregion
protected override void ProcessOK()
{
if (DataSource.Current != null)
_selectId = (string)((DataRowView)((BindingSource)DataSource).Current)["PRODUCT_ID"];
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?