📄 incometax.h
字号:
#pragma once
#include "LinkDataBase.h"
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
namespace My
{
/// <summary>
/// IncomeTax 摘要
///
/// 警告: 如果您更改该类的名称,则将需要更改
/// 与该类所依赖的所有 .resx 文件关联的托管资源编译器工具的
/// “资源文件名”属性。 否则,
/// 设计器将不能与此窗体关联的
/// 本地化资源正确交互。
/// </summary>
public __gc class IncomeTax : public System::Windows::Forms::Form
{
//--------------------成员声明------------------------
private:
LinkDataBase* MyDataBase; //数据库连接类
DataSet* ds;
String* strTableName;
protected: System::Windows::Forms::ImageList * imageList1;
String* strSQL;
//-------------------成员声明结束-----------------------
public:
IncomeTax(void)
{
InitializeComponent();
this->MyDataBase = new LinkDataBase();
this->strSQL = S"SELECT * FROM 个人所得税表";
this->strTableName = S"个人所得税表";
this->ds = this->MyDataBase->SelectDataBase(this->strSQL,this->strTableName);
this->dgrdIncomeTax->DataSource = this->ds->Tables->Item[S"个人所得税表"];
}
protected:
void Dispose(Boolean disposing)
{
if (disposing && components)
{
components->Dispose();
}
__super::Dispose(disposing);
}
private: System::Windows::Forms::ToolBarButton * tBtnSave;
private: System::Windows::Forms::ToolBarButton * tBtnQuit;
private: System::Windows::Forms::DataGrid * dgrdIncomeTax;
private: System::Windows::Forms::ToolBar * toolBar1;
private: System::ComponentModel::IContainer * components;
private:
/// <summary>
/// 必需的设计器变量。
/// </summary>
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
void InitializeComponent(void)
{
this->components = new System::ComponentModel::Container();
System::Resources::ResourceManager * resources = new System::Resources::ResourceManager(__typeof(My::IncomeTax));
this->tBtnSave = new System::Windows::Forms::ToolBarButton();
this->tBtnQuit = new System::Windows::Forms::ToolBarButton();
this->dgrdIncomeTax = new System::Windows::Forms::DataGrid();
this->toolBar1 = new System::Windows::Forms::ToolBar();
this->imageList1 = new System::Windows::Forms::ImageList(this->components);
(__try_cast<System::ComponentModel::ISupportInitialize * >(this->dgrdIncomeTax))->BeginInit();
this->SuspendLayout();
//
// tBtnSave
//
this->tBtnSave->ImageIndex = 0;
this->tBtnSave->Text = S"保存";
this->tBtnSave->ToolTipText = S"保存";
//
// tBtnQuit
//
this->tBtnQuit->ImageIndex = 11;
this->tBtnQuit->Text = S"退出";
this->tBtnQuit->ToolTipText = S"退出";
//
// dgrdIncomeTax
//
this->dgrdIncomeTax->DataMember = S"";
this->dgrdIncomeTax->Dock = System::Windows::Forms::DockStyle::Fill;
this->dgrdIncomeTax->HeaderForeColor = System::Drawing::SystemColors::ControlText;
this->dgrdIncomeTax->Location = System::Drawing::Point(0, 41);
this->dgrdIncomeTax->Name = S"dgrdIncomeTax";
this->dgrdIncomeTax->Size = System::Drawing::Size(608, 301);
this->dgrdIncomeTax->TabIndex = 3;
//
// toolBar1
//
System::Windows::Forms::ToolBarButton* __mcTemp__1[] = new System::Windows::Forms::ToolBarButton*[2];
__mcTemp__1[0] = this->tBtnSave;
__mcTemp__1[1] = this->tBtnQuit;
this->toolBar1->Buttons->AddRange(__mcTemp__1);
this->toolBar1->DropDownArrows = true;
this->toolBar1->ImageList = this->imageList1;
this->toolBar1->Location = System::Drawing::Point(0, 0);
this->toolBar1->Name = S"toolBar1";
this->toolBar1->ShowToolTips = true;
this->toolBar1->Size = System::Drawing::Size(608, 41);
this->toolBar1->TabIndex = 2;
this->toolBar1->ButtonClick += new System::Windows::Forms::ToolBarButtonClickEventHandler(this, toolBar1_ButtonClick);
//
// imageList1
//
this->imageList1->ImageSize = System::Drawing::Size(16, 16);
this->imageList1->ImageStream = (__try_cast<System::Windows::Forms::ImageListStreamer * >(resources->GetObject(S"imageList1.ImageStream")));
this->imageList1->TransparentColor = System::Drawing::Color::Transparent;
//
// IncomeTax
//
this->AutoScaleBaseSize = System::Drawing::Size(6, 14);
this->ClientSize = System::Drawing::Size(608, 342);
this->Controls->Add(this->dgrdIncomeTax);
this->Controls->Add(this->toolBar1);
this->Name = S"IncomeTax";
this->Text = S"个人所得税管理";
(__try_cast<System::ComponentModel::ISupportInitialize * >(this->dgrdIncomeTax))->EndInit();
this->ResumeLayout(false);
}
private: System::Void toolBar1_ButtonClick(System::Object * sender, System::Windows::Forms::ToolBarButtonClickEventArgs * e)
{
if(String::Compare(e->Button->ToolTipText,S"保存") == 0)
{
this->MyDataBase->UpdateDataBase(this->ds,this->strTableName);
}
else
{
this->Close();
}
}
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -