📄 frmdepinfo.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace 人力资源管理系统
{
/// <summary>
/// frmDepInfo 的摘要说明。
/// </summary>
public class frmDepInfo : System.Windows.Forms.Form
{
internal System.Windows.Forms.DataGrid dgdDepInfo;
internal System.Windows.Forms.ToolBar ToolBar1;
internal System.Windows.Forms.ToolBarButton tbbSave;
internal System.Windows.Forms.ImageList ImageList1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private 人力资源管理系统.DataSet1 dataSet11;
private System.ComponentModel.IContainer components;
public frmDepInfo()
{
//
// 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()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmDepInfo));
this.dgdDepInfo = new System.Windows.Forms.DataGrid();
this.ToolBar1 = new System.Windows.Forms.ToolBar();
this.tbbSave = new System.Windows.Forms.ToolBarButton();
this.ImageList1 = new System.Windows.Forms.ImageList(this.components);
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.dataSet11 = new 人力资源管理系统.DataSet1();
((System.ComponentModel.ISupportInitialize)(this.dgdDepInfo)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
this.SuspendLayout();
//
// dgdDepInfo
//
this.dgdDepInfo.CaptionVisible = false;
this.dgdDepInfo.DataMember = "";
this.dgdDepInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgdDepInfo.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dgdDepInfo.Location = new System.Drawing.Point(0, 0);
this.dgdDepInfo.Name = "dgdDepInfo";
this.dgdDepInfo.Size = new System.Drawing.Size(408, 285);
this.dgdDepInfo.TabIndex = 12;
//
// ToolBar1
//
this.ToolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.tbbSave});
this.ToolBar1.ButtonSize = new System.Drawing.Size(23, 22);
this.ToolBar1.DropDownArrows = true;
this.ToolBar1.ImageList = this.ImageList1;
this.ToolBar1.Location = new System.Drawing.Point(0, 0);
this.ToolBar1.Name = "ToolBar1";
this.ToolBar1.ShowToolTips = true;
this.ToolBar1.Size = new System.Drawing.Size(408, 28);
this.ToolBar1.TabIndex = 13;
this.ToolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.ToolBar1_ButtonClick);
//
// tbbSave
//
this.tbbSave.ImageIndex = 0;
this.tbbSave.ToolTipText = "保存修改记录或新增记录";
//
// ImageList1
//
this.ImageList1.ImageSize = new System.Drawing.Size(16, 16);
this.ImageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ImageList1.ImageStream")));
this.ImageList1.TransparentColor = System.Drawing.Color.Transparent;
//
// sqlDataAdapter1
//
this.sqlDataAdapter1.DeleteCommand = this.sqlDeleteCommand1;
this.sqlDataAdapter1.InsertCommand = this.sqlInsertCommand1;
this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand1;
this.sqlDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "组织机构编码表", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("类别", "类别"),
new System.Data.Common.DataColumnMapping("单位地址", "单位地址"),
new System.Data.Common.DataColumnMapping("单位电话号码", "单位电话号码"),
new System.Data.Common.DataColumnMapping("开户银行", "开户银行"),
new System.Data.Common.DataColumnMapping("帐号", "帐号"),
new System.Data.Common.DataColumnMapping("开户全称", "开户全称"),
new System.Data.Common.DataColumnMapping("单位编号", "单位编号"),
new System.Data.Common.DataColumnMapping("拼音编码", "拼音编码")})});
this.sqlDataAdapter1.UpdateCommand = this.sqlUpdateCommand1;
//
// sqlDeleteCommand1
//
this.sqlDeleteCommand1.CommandText = @"DELETE FROM 组织机构编码表 WHERE (单位编号 = @Original_单位编号) AND (单位地址 = @Original_单位地址 OR @Original_单位地址 IS NULL AND 单位地址 IS NULL) AND (单位电话号码 = @Original_单位电话号码 OR @Original_单位电话号码 IS NULL AND 单位电话号码 IS NULL) AND (帐号 = @Original_帐号 OR @Original_帐号 IS NULL AND 帐号 IS NULL) AND (开户全称 = @Original_开户全称 OR @Original_开户全称 IS NULL AND 开户全称 IS NULL) AND (开户银行 = @Original_开户银行 OR @Original_开户银行 IS NULL AND 开户银行 IS NULL) AND (拼音编码 = @Original_拼音编码 OR @Original_拼音编码 IS NULL AND 拼音编码 IS NULL) AND (类别 = @Original_类别 OR @Original_类别 IS NULL AND 类别 IS NULL)";
this.sqlDeleteCommand1.Connection = this.sqlConnection1;
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_单位编号", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "单位编号", System.Data.DataRowVersion.Original, null));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -