OrgInfo.cs
资源名称:VCSDB.rar [点击查看]
上传用户:hjieqiu
上传日期:2013-05-11
资源大小:16494k
文件大小:21k
源码类别:
企业管理
开发平台:
C#
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- namespace 人力资源管理系统
- {
- /// <summary>
- /// OrgInfo 的摘要说明。
- /// </summary>
- public class OrgInfo : System.Windows.Forms.Form
- {
- private System.Windows.Forms.DataGrid dataGrid1;
- private System.Windows.Forms.ToolBar toolBar1;
- private System.Windows.Forms.ToolBarButton tbarBtnSave;
- private System.Windows.Forms.ImageList imageList1;
- private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
- private System.Windows.Forms.DataGridTableStyle dataGridTableStyle1;
- private System.Windows.Forms.DataGridTextBoxColumn 单位地址;
- private System.Windows.Forms.DataGridTextBoxColumn 单位电话号码;
- private System.Windows.Forms.DataGridTextBoxColumn 开户银行;
- private System.Windows.Forms.DataGridTextBoxColumn 帐号;
- private System.Windows.Forms.DataGridTextBoxColumn 开户全称;
- private 人力资源管理系统.DataSet1 dataSet11;
- private System.Windows.Forms.DataGridTextBoxColumn 单位名称;
- private System.Windows.Forms.DataGridTextBoxColumn 拼音编码;
- private System.Windows.Forms.ToolBarButton toolBarQuit;
- private System.Data.SqlClient.SqlConnection sqlConnection1;
- 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.ComponentModel.IContainer components;
- public OrgInfo()
- {
- //
- // 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(OrgInfo));
- this.dataGrid1 = new System.Windows.Forms.DataGrid();
- this.dataSet11 = new 人力资源管理系统.DataSet1();
- this.dataGridTableStyle1 = new System.Windows.Forms.DataGridTableStyle();
- this.单位名称 = new System.Windows.Forms.DataGridTextBoxColumn();
- this.拼音编码 = new System.Windows.Forms.DataGridTextBoxColumn();
- this.单位地址 = new System.Windows.Forms.DataGridTextBoxColumn();
- this.单位电话号码 = new System.Windows.Forms.DataGridTextBoxColumn();
- this.开户银行 = new System.Windows.Forms.DataGridTextBoxColumn();
- this.帐号 = new System.Windows.Forms.DataGridTextBoxColumn();
- this.开户全称 = new System.Windows.Forms.DataGridTextBoxColumn();
- this.toolBar1 = new System.Windows.Forms.ToolBar();
- this.tbarBtnSave = new System.Windows.Forms.ToolBarButton();
- this.toolBarQuit = 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();
- ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
- this.SuspendLayout();
- //
- // dataGrid1
- //
- this.dataGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.dataGrid1.CaptionVisible = false;
- this.dataGrid1.DataMember = "组织机构编码表";
- this.dataGrid1.DataSource = this.dataSet11;
- this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
- this.dataGrid1.Location = new System.Drawing.Point(0, 40);
- this.dataGrid1.Name = "dataGrid1";
- this.dataGrid1.Size = new System.Drawing.Size(568, 360);
- this.dataGrid1.TabIndex = 0;
- this.dataGrid1.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] {
- this.dataGridTableStyle1});
- //
- // dataSet11
- //
- this.dataSet11.DataSetName = "DataSet1";
- this.dataSet11.Locale = new System.Globalization.CultureInfo("zh-CN");
- //
- // dataGridTableStyle1
- //
- this.dataGridTableStyle1.AllowSorting = false;
- this.dataGridTableStyle1.AlternatingBackColor = System.Drawing.Color.LightGray;
- this.dataGridTableStyle1.DataGrid = this.dataGrid1;
- this.dataGridTableStyle1.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] {
- this.单位名称,
- this.拼音编码,
- this.单位地址,
- this.单位电话号码,
- this.开户银行,
- this.帐号,
- this.开户全称});
- this.dataGridTableStyle1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
- this.dataGridTableStyle1.MappingName = "组织机构编码表";
- //
- // 单位名称
- //
- this.单位名称.Format = "";
- this.单位名称.FormatInfo = null;
- this.单位名称.HeaderText = "单位名称";
- this.单位名称.MappingName = "单位名称";
- this.单位名称.NullText = "";
- this.单位名称.Width = 75;
- //
- // 拼音编码
- //
- this.拼音编码.Format = "";
- this.拼音编码.FormatInfo = null;
- this.拼音编码.HeaderText = "拼音编码";
- this.拼音编码.MappingName = "拼音编码";
- this.拼音编码.NullText = "";
- this.拼音编码.Width = 75;
- //
- // 单位地址
- //
- this.单位地址.Format = "";
- this.单位地址.FormatInfo = null;
- this.单位地址.HeaderText = "单位地址";
- this.单位地址.MappingName = "单位地址";
- this.单位地址.NullText = "";
- this.单位地址.Width = 75;
- //
- // 单位电话号码
- //
- this.单位电话号码.Format = "";
- this.单位电话号码.FormatInfo = null;
- this.单位电话号码.HeaderText = "单位电话号码";
- this.单位电话号码.MappingName = "单位电话号码";
- this.单位电话号码.NullText = "";
- this.单位电话号码.Width = 75;
- //
- // 开户银行
- //
- this.开户银行.Format = "";
- this.开户银行.FormatInfo = null;
- this.开户银行.HeaderText = "开户银行";
- this.开户银行.MappingName = "开户银行";
- this.开户银行.NullText = "";
- this.开户银行.Width = 75;
- //
- // 帐号
- //
- this.帐号.Format = "";
- this.帐号.FormatInfo = null;
- this.帐号.HeaderText = "帐号";
- this.帐号.MappingName = "帐号";
- this.帐号.NullText = "";
- this.帐号.Width = 75;
- //
- // 开户全称
- //
- this.开户全称.Format = "";
- this.开户全称.FormatInfo = null;
- this.开户全称.HeaderText = "开户全称";
- this.开户全称.MappingName = "开户全称";
- this.开户全称.NullText = "";
- this.开户全称.Width = 75;
- //
- // toolBar1
- //
- this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
- this.tbarBtnSave,
- this.toolBarQuit});
- 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(568, 41);
- this.toolBar1.TabIndex = 24;
- this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
- //
- // tbarBtnSave
- //
- this.tbarBtnSave.ImageIndex = 0;
- this.tbarBtnSave.Text = "保存修改";
- this.tbarBtnSave.ToolTipText = "保存修改";
- //
- // toolBarQuit
- //
- this.toolBarQuit.ImageIndex = 1;
- this.toolBarQuit.Text = "退出";
- this.toolBarQuit.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));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_单位名称", System.Data.SqlDbType.VarChar, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "单位名称", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_单位地址", System.Data.SqlDbType.VarChar, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "单位地址", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_单位电话号码", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "单位电话号码", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_帐号", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "帐号", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_开户全称", System.Data.SqlDbType.VarChar, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "开户全称", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_开户银行", System.Data.SqlDbType.VarChar, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "开户银行", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_拼音编码", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "拼音编码", System.Data.DataRowVersion.Original, null));
- //
- // sqlConnection1
- //
- this.sqlConnection1.ConnectionString = "workstation id=localhost;Integrated Security=SSPI;Database=hrmbook;";
- //
- // sqlInsertCommand1
- //
- this.sqlInsertCommand1.CommandText = "INSERT INTO 组织机构编码表(单位名称, 拼音编码, 单位地址, 单位电话号码, 开户银行, 帐号, 开户全称, 单位编号) VALUES (@单位名称" +
- ", @拼音编码, @单位地址, @单位电话号码, @开户银行, @帐号, @开户全称, @单位编号); SELECT 单位名称, 拼音编码, 单位地址, 单位电" +
- "话号码, 开户银行, 帐号, 开户全称, 单位编号 FROM 组织机构编码表 WHERE (单位编号 = @单位编号)";
- this.sqlInsertCommand1.Connection = this.sqlConnection1;
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@单位名称", System.Data.SqlDbType.VarChar, 100, "单位名称"));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@拼音编码", System.Data.SqlDbType.VarChar, 50, "拼音编码"));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@单位地址", System.Data.SqlDbType.VarChar, 100, "单位地址"));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@单位电话号码", System.Data.SqlDbType.VarChar, 50, "单位电话号码"));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@开户银行", System.Data.SqlDbType.VarChar, 100, "开户银行"));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@帐号", System.Data.SqlDbType.VarChar, 50, "帐号"));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@开户全称", System.Data.SqlDbType.VarChar, 100, "开户全称"));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@单位编号", System.Data.SqlDbType.VarChar, 20, "单位编号"));
- //
- // sqlSelectCommand1
- //
- this.sqlSelectCommand1.CommandText = "SELECT 单位名称, 拼音编码, 单位地址, 单位电话号码, 开户银行, 帐号, 开户全称, 单位编号 FROM 组织机构编码表";
- this.sqlSelectCommand1.Connection = this.sqlConnection1;
- //
- // sqlUpdateCommand1
- //
- this.sqlUpdateCommand1.CommandText = @"UPDATE 组织机构编码表 SET 单位名称 = @单位名称, 拼音编码 = @拼音编码, 单位地址 = @单位地址, 单位电话号码 = @单位电话号码, 开户银行 = @开户银行, 帐号 = @帐号, 开户全称 = @开户全称, 单位编号 = @单位编号 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); SELECT 单位名称, 拼音编码, 单位地址, 单位电话号码, 开户银行, 帐号, 开户全称, 单位编号 FROM 组织机构编码表 WHERE (单位编号 = @单位编号)";
- this.sqlUpdateCommand1.Connection = this.sqlConnection1;
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@单位名称", System.Data.SqlDbType.VarChar, 100, "单位名称"));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@拼音编码", System.Data.SqlDbType.VarChar, 50, "拼音编码"));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@单位地址", System.Data.SqlDbType.VarChar, 100, "单位地址"));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@单位电话号码", System.Data.SqlDbType.VarChar, 50, "单位电话号码"));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@开户银行", System.Data.SqlDbType.VarChar, 100, "开户银行"));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@帐号", System.Data.SqlDbType.VarChar, 50, "帐号"));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@开户全称", System.Data.SqlDbType.VarChar, 100, "开户全称"));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@单位编号", System.Data.SqlDbType.VarChar, 20, "单位编号"));
- this.sqlUpdateCommand1.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));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_单位名称", System.Data.SqlDbType.VarChar, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "单位名称", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_单位地址", System.Data.SqlDbType.VarChar, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "单位地址", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_单位电话号码", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "单位电话号码", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_帐号", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "帐号", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_开户全称", System.Data.SqlDbType.VarChar, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "开户全称", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_开户银行", System.Data.SqlDbType.VarChar, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "开户银行", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_拼音编码", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "拼音编码", System.Data.DataRowVersion.Original, null));
- //
- // OrgInfo
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
- this.ClientSize = new System.Drawing.Size(568, 397);
- this.Controls.Add(this.dataGrid1);
- this.Controls.Add(this.toolBar1);
- this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.Name = "OrgInfo";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "【机构详细信息】";
- this.Load += new System.EventHandler(this.OrgInfo_Load);
- ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit();
- this.ResumeLayout(false);
- }
- #endregion
- //--------------初始化时,读入组织机构的信息------------------
- private void OrgInfo_Load(object sender, System.EventArgs e)
- {
- this.sqlDataAdapter1.Fill(this.dataSet11.组织机构编码表);
- }
- //--------------遍历整个数据表,保存所有修改------------------
- private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
- {
- if(e.Button.ToolTipText == "保存修改")//保存所作的修改
- {
- try
- {
- if (this.dataSet11.组织机构编码表.GetChanges() != null)
- {
- this.sqlDataAdapter1.Update(this.dataSet11);
- MessageBox.Show("数据保存成功!","信息");
- }
- else
- {
- MessageBox.Show("没有修改任何数据!","信息");
- }
- }
- catch
- {
- MessageBox.Show("数据修改失败,请重试!","提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
- return;
- }
- }
- if (e.Button.ToolTipText == "退出")//退出窗体
- {
- this.Close();
- }
- }
- }
- }