📄 form1.h
字号:
#pragma once
#include"jiemian.h"
namespace ruanjian
{
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Form1 摘要
///
/// 警告: 如果您更改该类的名称,则需要更改
/// 与该类所依赖的所有 .resx 文件关联的托管资源编译器工具的
/// “资源文件名”属性。 否则,
/// 设计器将不能与此窗体关联的
/// 本地化资源正确交互。
/// </summary>
public __gc class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
}
protected:
void Dispose(Boolean disposing)
{
if (disposing && components)
{
components->Dispose();
}
__super::Dispose(disposing);
}
private: System::Data::OleDb::OleDbCommand * oleDbDeleteCommand1;
private: System::Data::OleDb::OleDbConnection * oleDbConnection1;
private: System::Data::OleDb::OleDbDataAdapter * oleDbDataAdapter2;
private: System::Data::OleDb::OleDbCommand * oleDbDeleteCommand2;
private: System::Data::OleDb::OleDbCommand * oleDbInsertCommand2;
private: System::Data::OleDb::OleDbCommand * oleDbSelectCommand2;
private: System::Data::OleDb::OleDbCommand * oleDbUpdateCommand2;
private: System::Windows::Forms::DataGrid * dataGrid1;
private: System::Data::OleDb::OleDbCommand * oleDbInsertCommand1;
private: System::Data::OleDb::OleDbCommand * oleDbSelectCommand1;
private: System::Data::OleDb::OleDbDataAdapter * oleDbDataAdapter1;
private: System::Data::OleDb::OleDbCommand * oleDbUpdateCommand1;
private: System::Windows::Forms::GroupBox * groupBox1;
private: System::Windows::Forms::Button * button2;
private: System::Windows::Forms::Button * button1;
private: System::Windows::Forms::TextBox * textBox2;
private: System::Windows::Forms::TextBox * textBox1;
private: System::Windows::Forms::Label * label2;
private: System::Windows::Forms::Label * label1;
private:
/// <summary>
/// 必需的设计器变量。
/// </summary>
System::ComponentModel::Container * components;
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
void InitializeComponent(void)
{
this->oleDbDeleteCommand1 = new System::Data::OleDb::OleDbCommand();
this->oleDbConnection1 = new System::Data::OleDb::OleDbConnection();
this->oleDbDataAdapter2 = new System::Data::OleDb::OleDbDataAdapter();
this->oleDbDeleteCommand2 = new System::Data::OleDb::OleDbCommand();
this->oleDbInsertCommand2 = new System::Data::OleDb::OleDbCommand();
this->oleDbSelectCommand2 = new System::Data::OleDb::OleDbCommand();
this->oleDbUpdateCommand2 = new System::Data::OleDb::OleDbCommand();
this->dataGrid1 = new System::Windows::Forms::DataGrid();
this->oleDbInsertCommand1 = new System::Data::OleDb::OleDbCommand();
this->oleDbSelectCommand1 = new System::Data::OleDb::OleDbCommand();
this->oleDbDataAdapter1 = new System::Data::OleDb::OleDbDataAdapter();
this->oleDbUpdateCommand1 = new System::Data::OleDb::OleDbCommand();
this->groupBox1 = new System::Windows::Forms::GroupBox();
this->button2 = new System::Windows::Forms::Button();
this->button1 = new System::Windows::Forms::Button();
this->textBox2 = new System::Windows::Forms::TextBox();
this->textBox1 = new System::Windows::Forms::TextBox();
this->label2 = new System::Windows::Forms::Label();
this->label1 = new System::Windows::Forms::Label();
(__try_cast<System::ComponentModel::ISupportInitialize * >(this->dataGrid1))->BeginInit();
this->groupBox1->SuspendLayout();
this->SuspendLayout();
//
// oleDbDeleteCommand1
//
this->oleDbDeleteCommand1->CommandText = S"DELETE FROM 用户表 WHERE (NID = \?)";
this->oleDbDeleteCommand1->Connection = this->oleDbConnection1;
this->oleDbDeleteCommand1->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"Original_NID", System::Data::OleDb::OleDbType::VarChar, 10, System::Data::ParameterDirection::Input, false, (System::Byte)0, (System::Byte)0, S"NID", System::Data::DataRowVersion::Original, 0));
//
// oleDbConnection1
//
this->oleDbConnection1->ConnectionString = S"Integrated Security=SSPI;Packet Size=4096;Data Source=4B2E371A2A9F47E;Tag with co"
S"lumn collation when possible=False;Initial Catalog=超市收银数据库;Use Procedure for Pre"
S"pare=1;Auto Translate=True;Persist Security Info=False;Provider=\"SQLOLEDB.1\";Wor"
S"kstation ID=4B2E371A2A9F47E;Use Encryption for Data=False";
//
// oleDbDataAdapter2
//
this->oleDbDataAdapter2->DeleteCommand = this->oleDbDeleteCommand2;
this->oleDbDataAdapter2->InsertCommand = this->oleDbInsertCommand2;
this->oleDbDataAdapter2->SelectCommand = this->oleDbSelectCommand2;
System::Data::Common::DataTableMapping* __mcTemp__1[] = new System::Data::Common::DataTableMapping*[1];
System::Data::Common::DataColumnMapping* __mcTemp__2[] = new System::Data::Common::DataColumnMapping*[7];
__mcTemp__2[0] = new System::Data::Common::DataColumnMapping(S"NID", S"NID");
__mcTemp__2[1] = new System::Data::Common::DataColumnMapping(S"NAME", S"NAME");
__mcTemp__2[2] = new System::Data::Common::DataColumnMapping(S"STATUS", S"STATUS");
__mcTemp__2[3] = new System::Data::Common::DataColumnMapping(S"SEX", S"SEX");
__mcTemp__2[4] = new System::Data::Common::DataColumnMapping(S"COMPANY", S"COMPANY");
__mcTemp__2[5] = new System::Data::Common::DataColumnMapping(S"UPWORK", S"UPWORK");
__mcTemp__2[6] = new System::Data::Common::DataColumnMapping(S"DATACHA", S"DATACHA");
__mcTemp__1[0] = new System::Data::Common::DataTableMapping(S"Table", S"登入表", __mcTemp__2);
this->oleDbDataAdapter2->TableMappings->AddRange(__mcTemp__1);
this->oleDbDataAdapter2->UpdateCommand = this->oleDbUpdateCommand2;
//
// oleDbDeleteCommand2
//
this->oleDbDeleteCommand2->CommandText = S"DELETE FROM 登入表 WHERE (NID = \?)";
this->oleDbDeleteCommand2->Connection = this->oleDbConnection1;
this->oleDbDeleteCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"Original_NID", System::Data::OleDb::OleDbType::VarChar, 10, System::Data::ParameterDirection::Input, false, (System::Byte)0, (System::Byte)0, S"NID", System::Data::DataRowVersion::Original, 0));
//
// oleDbInsertCommand2
//
this->oleDbInsertCommand2->CommandText = S"INSERT INTO 登入表(NID, NAME, STATUS, SEX, COMPANY, UPWORK, DATACHA) VALUES (\?, \?, \?"
S", \?, \?, \?, \?)";
this->oleDbInsertCommand2->Connection = this->oleDbConnection1;
this->oleDbInsertCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"NID", System::Data::OleDb::OleDbType::VarChar, 10, S"NID"));
this->oleDbInsertCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"NAME", System::Data::OleDb::OleDbType::VarChar, 20, S"NAME"));
this->oleDbInsertCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"STATUS", System::Data::OleDb::OleDbType::VarChar, 20, S"STATUS"));
this->oleDbInsertCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"SEX", System::Data::OleDb::OleDbType::VarChar, 5, S"SEX"));
this->oleDbInsertCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"COMPANY", System::Data::OleDb::OleDbType::VarChar, 20, S"COMPANY"));
this->oleDbInsertCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"UPWORK", System::Data::OleDb::OleDbType::VarChar, 20, S"UPWORK"));
this->oleDbInsertCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"DATACHA", System::Data::OleDb::OleDbType::VarChar, 10, S"DATACHA"));
//
// oleDbSelectCommand2
//
this->oleDbSelectCommand2->CommandText = S"SELECT NID, NAME, STATUS, SEX, COMPANY, UPWORK, DATACHA FROM 登入表";
this->oleDbSelectCommand2->Connection = this->oleDbConnection1;
//
// oleDbUpdateCommand2
//
this->oleDbUpdateCommand2->CommandText = S"UPDATE 登入表 SET NID = \?, NAME = \?, STATUS = \?, SEX = \?, COMPANY = \?, UPWORK = \?, D"
S"ATACHA = \? WHERE (NID = \?)";
this->oleDbUpdateCommand2->Connection = this->oleDbConnection1;
this->oleDbUpdateCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"NID", System::Data::OleDb::OleDbType::VarChar, 10, S"NID"));
this->oleDbUpdateCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"NAME", System::Data::OleDb::OleDbType::VarChar, 20, S"NAME"));
this->oleDbUpdateCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"STATUS", System::Data::OleDb::OleDbType::VarChar, 20, S"STATUS"));
this->oleDbUpdateCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"SEX", System::Data::OleDb::OleDbType::VarChar, 5, S"SEX"));
this->oleDbUpdateCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"COMPANY", System::Data::OleDb::OleDbType::VarChar, 20, S"COMPANY"));
this->oleDbUpdateCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"UPWORK", System::Data::OleDb::OleDbType::VarChar, 20, S"UPWORK"));
this->oleDbUpdateCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"DATACHA", System::Data::OleDb::OleDbType::VarChar, 10, S"DATACHA"));
this->oleDbUpdateCommand2->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"Original_NID", System::Data::OleDb::OleDbType::VarChar, 10, System::Data::ParameterDirection::Input, false, (System::Byte)0, (System::Byte)0, S"NID", System::Data::DataRowVersion::Original, 0));
//
// dataGrid1
//
this->dataGrid1->DataMember = S"";
this->dataGrid1->HeaderForeColor = System::Drawing::SystemColors::ControlText;
this->dataGrid1->Location = System::Drawing::Point(112, 93);
this->dataGrid1->Name = S"dataGrid1";
this->dataGrid1->TabIndex = 3;
//
// oleDbInsertCommand1
//
this->oleDbInsertCommand1->CommandText = S"INSERT INTO 用户表(NID, NAME, AGE, SEX, COMPANY, PASSWORD, STATUS, ADDS) VALUES (\?, "
S"\?, \?, \?, \?, \?, \?, \?)";
this->oleDbInsertCommand1->Connection = this->oleDbConnection1;
this->oleDbInsertCommand1->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"NID", System::Data::OleDb::OleDbType::VarChar, 10, S"NID"));
this->oleDbInsertCommand1->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"NAME", System::Data::OleDb::OleDbType::VarChar, 20, S"NAME"));
this->oleDbInsertCommand1->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"AGE", System::Data::OleDb::OleDbType::Integer, 4, S"AGE"));
this->oleDbInsertCommand1->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"SEX", System::Data::OleDb::OleDbType::VarChar, 10, S"SEX"));
this->oleDbInsertCommand1->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"COMPANY", System::Data::OleDb::OleDbType::VarChar, 20, S"COMPANY"));
this->oleDbInsertCommand1->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"PASSWORD", System::Data::OleDb::OleDbType::Integer, 4, S"PASSWORD"));
this->oleDbInsertCommand1->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"STATUS", System::Data::OleDb::OleDbType::VarChar, 20, S"STATUS"));
this->oleDbInsertCommand1->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"ADDS", System::Data::OleDb::OleDbType::VarChar, 50, S"ADDS"));
//
// oleDbSelectCommand1
//
this->oleDbSelectCommand1->CommandText = S"SELECT NID, NAME, AGE, SEX, COMPANY, PASSWORD, STATUS, ADDS FROM 用户表";
this->oleDbSelectCommand1->Connection = this->oleDbConnection1;
//
// oleDbDataAdapter1
//
this->oleDbDataAdapter1->DeleteCommand = this->oleDbDeleteCommand1;
this->oleDbDataAdapter1->InsertCommand = this->oleDbInsertCommand1;
this->oleDbDataAdapter1->SelectCommand = this->oleDbSelectCommand1;
System::Data::Common::DataTableMapping* __mcTemp__3[] = new System::Data::Common::DataTableMapping*[1];
System::Data::Common::DataColumnMapping* __mcTemp__4[] = new System::Data::Common::DataColumnMapping*[8];
__mcTemp__4[0] = new System::Data::Common::DataColumnMapping(S"NID", S"NID");
__mcTemp__4[1] = new System::Data::Common::DataColumnMapping(S"NAME", S"NAME");
__mcTemp__4[2] = new System::Data::Common::DataColumnMapping(S"AGE", S"AGE");
__mcTemp__4[3] = new System::Data::Common::DataColumnMapping(S"SEX", S"SEX");
__mcTemp__4[4] = new System::Data::Common::DataColumnMapping(S"COMPANY", S"COMPANY");
__mcTemp__4[5] = new System::Data::Common::DataColumnMapping(S"PASSWORD", S"PASSWORD");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -