📄 frmtaxinfo.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>
/// frmTaxInfo 的摘要说明。
/// </summary>
public class frmTaxInfo : System.Windows.Forms.Form
{
internal System.Windows.Forms.ToolBar ToolBar1;
internal System.Windows.Forms.ToolBarButton tbbSave;
internal System.Windows.Forms.ToolBarButton tbbDel;
internal System.Windows.Forms.ImageList ImageList1;
internal System.Data.SqlClient.SqlCommand SqlSelectCommand1;
internal System.Data.SqlClient.SqlCommand SqlUpdateCommand1;
internal System.Data.SqlClient.SqlCommand SqlInsertCommand1;
internal System.Windows.Forms.DataGrid dgdTaxInfo;
internal System.Data.SqlClient.SqlCommand SqlDeleteCommand1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
private System.Data.SqlClient.SqlCommand sqlSelectCommand2;
private System.Data.SqlClient.SqlCommand sqlInsertCommand2;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand2;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand2;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private 人力资源管理系统.DataSet1 dataSet11;
private System.ComponentModel.IContainer components;
public frmTaxInfo()
{
//
// 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(frmTaxInfo));
this.ToolBar1 = new System.Windows.Forms.ToolBar();
this.tbbSave = new System.Windows.Forms.ToolBarButton();
this.tbbDel = new System.Windows.Forms.ToolBarButton();
this.ImageList1 = new System.Windows.Forms.ImageList(this.components);
this.SqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.SqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.SqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.dgdTaxInfo = new System.Windows.Forms.DataGrid();
this.SqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlSelectCommand2 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand2 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand2 = new System.Data.SqlClient.SqlCommand();
this.sqlDeleteCommand2 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.dataSet11 = new 人力资源管理系统.DataSet1();
((System.ComponentModel.ISupportInitialize)(this.dgdTaxInfo)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
this.SuspendLayout();
//
// ToolBar1
//
this.ToolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.tbbSave,
this.tbbDel});
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(376, 28);
this.ToolBar1.TabIndex = 13;
this.ToolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.ToolBar1_ButtonClick);
//
// tbbSave
//
this.tbbSave.ImageIndex = 0;
this.tbbSave.ToolTipText = "保存修改记录或新增记录";
//
// tbbDel
//
this.tbbDel.ImageIndex = 1;
//
// 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;
//
// SqlSelectCommand1
//
this.SqlSelectCommand1.CommandText = "SELECT 编号, 级数, 不计税工资, 工资下限, 工资上限, 个人所得税率, 速算扣除数, 备注 FROM 个人所得税表";
//
// SqlUpdateCommand1
//
this.SqlUpdateCommand1.CommandText = @"UPDATE 个人所得税表 SET 编号 = @编号, 级数 = @级数, 不计税工资 = @不计税工资, 工资下限 = @工资下限, 工资上限 = @工资上限, 个人所得税率 = @个人所得税率, 速算扣除数 = @速算扣除数, 备注 = @备注 WHERE (编号 = @Original_编号) AND (不计税工资 = @Original_不计税工资) AND (个人所得税率 = @Original_个人所得税率) AND (备注 = @Original_备注 OR @Original_备注 IS NULL AND 备注 IS NULL) AND (工资上限 = @Original_工资上限) AND (工资下限 = @Original_工资下限) AND (级数 = @Original_级数) AND (速算扣除数 = @Original_速算扣除数); SELECT 编号, 级数, 不计税工资, 工资下限, 工资上限, 个人所得税率, 速算扣除数, 备注 FROM 个人所得税表 WHERE (编号 = @编号)";
this.SqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@编号", System.Data.SqlDbType.Int, 4, "编号"));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -