📄 factoryschedule.h
字号:
// 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;
//
// groupBox1
//
this->groupBox1->Controls->Add(this->tBoxPlanDate);
this->groupBox1->Controls->Add(this->label2);
this->groupBox1->Controls->Add(this->tBoxYear);
this->groupBox1->Controls->Add(this->label1);
this->groupBox1->Controls->Add(this->btnSearch);
this->groupBox1->Dock = System::Windows::Forms::DockStyle::Top;
this->groupBox1->Location = System::Drawing::Point(0, 41);
this->groupBox1->Name = S"groupBox1";
this->groupBox1->Size = System::Drawing::Size(768, 79);
this->groupBox1->TabIndex = 2;
this->groupBox1->TabStop = false;
//
// tBoxPlanDate
//
this->tBoxPlanDate->Location = System::Drawing::Point(408, 39);
this->tBoxPlanDate->Name = S"tBoxPlanDate";
this->tBoxPlanDate->Size = System::Drawing::Size(120, 21);
this->tBoxPlanDate->TabIndex = 4;
this->tBoxPlanDate->Text = S"";
//
// label2
//
this->label2->Location = System::Drawing::Point(344, 44);
this->label2->Name = S"label2";
this->label2->Size = System::Drawing::Size(56, 11);
this->label2->TabIndex = 3;
this->label2->Text = S"计划期";
//
// tBoxYear
//
this->tBoxYear->Location = System::Drawing::Point(208, 40);
this->tBoxYear->Name = S"tBoxYear";
this->tBoxYear->Size = System::Drawing::Size(120, 21);
this->tBoxYear->TabIndex = 2;
this->tBoxYear->Text = S"";
//
// label1
//
this->label1->Location = System::Drawing::Point(144, 45);
this->label1->Name = S"label1";
this->label1->Size = System::Drawing::Size(56, 11);
this->label1->TabIndex = 1;
this->label1->Text = S"年份";
//
// btnSearch
//
this->btnSearch->ImageAlign = System::Drawing::ContentAlignment::MiddleLeft;
this->btnSearch->ImageIndex = 6;
this->btnSearch->ImageList = this->imageList1;
this->btnSearch->Location = System::Drawing::Point(40, 40);
this->btnSearch->Name = S"btnSearch";
this->btnSearch->Size = System::Drawing::Size(64, 24);
this->btnSearch->TabIndex = 0;
this->btnSearch->Text = S"搜索";
this->btnSearch->Click += new System::EventHandler(this, btnSearch_Click);
//
// groupBox2
//
this->groupBox2->Controls->Add(this->tBoxEndedDate);
this->groupBox2->Controls->Add(this->label9);
this->groupBox2->Controls->Add(this->tBoxMemo);
this->groupBox2->Controls->Add(this->label10);
this->groupBox2->Controls->Add(this->tBoxPlanDateDisplay);
this->groupBox2->Controls->Add(this->tBoxYearDisplay);
this->groupBox2->Controls->Add(this->label5);
this->groupBox2->Controls->Add(this->tBoxBeginDate);
this->groupBox2->Controls->Add(this->label6);
this->groupBox2->Controls->Add(this->label7);
this->groupBox2->Dock = System::Windows::Forms::DockStyle::Right;
this->groupBox2->Location = System::Drawing::Point(520, 120);
this->groupBox2->Name = S"groupBox2";
this->groupBox2->Size = System::Drawing::Size(248, 365);
this->groupBox2->TabIndex = 4;
this->groupBox2->TabStop = false;
//
// tBoxEndedDate
//
this->tBoxEndedDate->Location = System::Drawing::Point(64, 192);
this->tBoxEndedDate->Name = S"tBoxEndedDate";
this->tBoxEndedDate->Size = System::Drawing::Size(136, 21);
this->tBoxEndedDate->TabIndex = 10;
this->tBoxEndedDate->Text = S"";
//
// label9
//
this->label9->Location = System::Drawing::Point(64, 176);
this->label9->Name = S"label9";
this->label9->Size = System::Drawing::Size(56, 11);
this->label9->TabIndex = 9;
this->label9->Text = S"结束日期";
//
// tBoxMemo
//
this->tBoxMemo->Location = System::Drawing::Point(64, 240);
this->tBoxMemo->Multiline = true;
this->tBoxMemo->Name = S"tBoxMemo";
this->tBoxMemo->Size = System::Drawing::Size(136, 120);
this->tBoxMemo->TabIndex = 14;
this->tBoxMemo->Text = S"";
//
// label10
//
this->label10->Location = System::Drawing::Point(64, 224);
this->label10->Name = S"label10";
this->label10->Size = System::Drawing::Size(56, 11);
this->label10->TabIndex = 13;
this->label10->Text = S"备注";
//
// tBoxPlanDateDisplay
//
this->tBoxPlanDateDisplay->Location = System::Drawing::Point(64, 96);
this->tBoxPlanDateDisplay->Name = S"tBoxPlanDateDisplay";
this->tBoxPlanDateDisplay->Size = System::Drawing::Size(136, 21);
this->tBoxPlanDateDisplay->TabIndex = 4;
this->tBoxPlanDateDisplay->Text = S"";
this->tBoxPlanDateDisplay->Leave += new System::EventHandler(this, tBoxPlanDateDisplay_Leave);
//
// tBoxYearDisplay
//
this->tBoxYearDisplay->Location = System::Drawing::Point(64, 48);
this->tBoxYearDisplay->Name = S"tBoxYearDisplay";
this->tBoxYearDisplay->Size = System::Drawing::Size(136, 21);
this->tBoxYearDisplay->TabIndex = 2;
this->tBoxYearDisplay->Text = S"";
this->tBoxYearDisplay->Leave += new System::EventHandler(this, tBoxYearDisplay_Leave);
//
// label5
//
this->label5->Location = System::Drawing::Point(64, 32);
this->label5->Name = S"label5";
this->label5->Size = System::Drawing::Size(56, 11);
this->label5->TabIndex = 1;
this->label5->Text = S"年份";
//
// tBoxBeginDate
//
this->tBoxBeginDate->Location = System::Drawing::Point(64, 144);
this->tBoxBeginDate->Name = S"tBoxBeginDate";
this->tBoxBeginDate->Size = System::Drawing::Size(136, 21);
this->tBoxBeginDate->TabIndex = 6;
this->tBoxBeginDate->Text = S"";
//
// label6
//
this->label6->Location = System::Drawing::Point(64, 128);
this->label6->Name = S"label6";
this->label6->Size = System::Drawing::Size(56, 11);
this->label6->TabIndex = 5;
this->label6->Text = S"开始日期";
//
// label7
//
this->label7->Location = System::Drawing::Point(64, 80);
this->label7->Name = S"label7";
this->label7->Size = System::Drawing::Size(56, 11);
this->label7->TabIndex = 3;
this->label7->Text = S"计划期";
//
// dgrdFactorySchedule
//
this->dgrdFactorySchedule->DataMember = S"";
this->dgrdFactorySchedule->Dock = System::Windows::Forms::DockStyle::Fill;
this->dgrdFactorySchedule->HeaderForeColor = System::Drawing::SystemColors::ControlText;
this->dgrdFactorySchedule->Location = System::Drawing::Point(0, 120);
this->dgrdFactorySchedule->Name = S"dgrdFactorySchedule";
this->dgrdFactorySchedule->Size = System::Drawing::Size(520, 365);
this->dgrdFactorySchedule->TabIndex = 5;
this->dgrdFactorySchedule->DoubleClick += new System::EventHandler(this, dgrdFactorySchedule_DoubleClick);
//
// sqlDataAdapter1
//
this->sqlDataAdapter1->DeleteCommand = this->sqlDeleteCommand1;
this->sqlDataAdapter1->InsertCommand = this->sqlInsertCommand1;
this->sqlDataAdapter1->SelectCommand = this->sqlSelectCommand1;
System::Data::Common::DataTableMapping* __mcTemp__2[] = new System::Data::Common::DataTableMapping*[1];
System::Data::Common::DataColumnMapping* __mcTemp__3[] = new System::Data::Common::DataColumnMapping*[11];
__mcTemp__3[0] = new System::Data::Common::DataColumnMapping(S"编号", S"编号");
__mcTemp__3[1] = new System::Data::Common::DataColumnMapping(S"物料编号", S"物料编号");
__mcTemp__3[2] = new System::Data::Common::DataColumnMapping(S"年份", S"年份");
__mcTemp__3[3] = new System::Data::Common::DataColumnMapping(S"计划期", S"计划期");
__mcTemp__3[4] = new System::Data::Common::DataColumnMapping(S"开始日期", S"开始日期");
__mcTemp__3[5] = new System::Data::Common::DataColumnMapping(S"结束日期", S"结束日期");
__mcTemp__3[6] = new System::Data::Common::DataColumnMapping(S"需求数量", S"需求数量");
__mcTemp__3[7] = new System::Data::Common::DataColumnMapping(S"记帐人", S"记帐人");
__mcTemp__3[8] = new System::Data::Common::DataColumnMapping(S"修改日期", S"修改日期");
__mcTemp__3[9] = new System::Data::Common::DataColumnMapping(S"状态", S"状态");
__mcTemp__3[10] = new System::Data::Common::DataColumnMapping(S"备注", S"备注");
__mcTemp__2[0] = new System::Data::Common::DataTableMapping(S"Table", S"主需求计划", __mcTemp__3);
this->sqlDataAdapter1->TableMappings->AddRange(__mcTemp__2);
this->sqlDataAdapter1->UpdateCommand = this->sqlUpdateCommand1;
//
// sqlConnection1
//
this->sqlConnection1->ConnectionString = S"workstation id=\"SKS-DD7828BA353\";packet size=4096;integrated security=SSPI;initia"
S"l catalog=mrpbook;persist security info=False";
//
// sqlSelectCommand1
//
this->sqlSelectCommand1->CommandText = S"SELECT 编号, 物料编号, 年份, 计划期, 开始日期, 结束日期, 需求数量, 记帐人, 修改日期, 状态, 备注 FROM 主需求计划";
this->sqlSelectCommand1->Connection = this->sqlConnection1;
//
// sqlInsertCommand1
//
this->sqlInsertCommand1->CommandText = S"INSERT INTO 主需求计划(编号, 物料编号, 年份, 计划期, 开始日期, 结束日期, 需求数量, 记帐人, 修改日期, 状态, 备注) VALUES "
S"(@编号, @物料编号, @年份, @计划期, @开始日期, @结束日期, @需求数量, @记帐人, @修改日期, @状态, @备注); SELECT 编号, "
S"物料编号, 年份, 计划期, 开始日期, 结束日期, 需求数量, 记帐人, 修改日期, 状态, 备注 FROM 主需求计划 WHERE (年份 = @年份) A"
S"ND (物料编号 = @物料编号) AND (计划期 = @计划期)";
this->sqlInsertCommand1->Connection = this->sqlConnection1;
this->sqlInsertCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@编号", System::Data::SqlDbType::VarChar, 14, S"编号"));
this->sqlInsertCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@物料编号", System::Data::SqlDbType::VarChar, 14, S"物料编号"));
this->sqlInsertCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@年份", System::Data::SqlDbType::Int, 4, S"年份"));
this->sqlInsertCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@计划期", System::Data::SqlDbType::Int, 4, S"计划期"));
this->sqlInsertCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@开始日期", System::Data::SqlDbType::Int, 4, S"开始日期"));
this->sqlInsertCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@结束日期", System::Data::SqlDbType::Int, 4, S"结束日期"));
this->sqlInsertCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@需求数量", System::Data::SqlDbType::Decimal, 9, System::Data::ParameterDirection::Input, false, (System::Byte)15, (System::Byte)2, S"需求数量", System::Data::DataRowVersion::Current, 0));
this->sqlInsertCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@记帐人", System::Data::SqlDbType::VarChar, 10, S"记帐人"));
this->sqlInsertCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@修改日期", System::Data::SqlDbType::Int, 4, S"修改日期"));
this->sqlInsertCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@状态", System::Data::SqlDbType::VarChar, 10, S"状态"));
this->sqlInsertCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@备注", System::Data::SqlDbType::VarChar, 40, S"备注"));
//
// sqlUpdateCommand1
//
this->sqlUpdateCommand1->CommandText = S"UPDATE 主需求计划 SET 编号 = @编号, 物料编号 = @物料编号, 年份 = @年份, 计划期 = @计划期, 开始日期 = @开始日期, 结束日期"
S" = @结束日期, 需求数量 = @需求数量, 记帐人 = @记帐人, 修改日期 = @修改日期, 状态 = @状态, 备注 = @备注 WHERE (年份 ="
S" @Original_年份) AND (物料编号 = @Original_物料编号) AND (计划期 = @Original_计划期) AND (修改日期 ="
S" @Original_修改日期 OR @Original_修改日期 IS NULL AND 修改日期 IS NULL) AND (备注 = @Original_"
S"备注 OR @Original_备注 IS NULL AND 备注 IS NULL) AND (开始日期 = @Original_开始日期 OR @Origin"
S"al_开始日期 IS NULL AND 开始日期 IS NULL) AND (状态 = @Original_状态) AND (结束日期 = @Original_"
S"结束日期 OR @Original_结束日期 IS NULL AND 结束日期 IS NULL) AND (编号 = @Original_编号 OR @Orig"
S"inal_编号 IS NULL AND 编号 IS NULL) AND (记帐人 = @Original_记帐人 OR @Original_记帐人 IS NUL"
S"L AND 记帐人 IS NULL) AND (需求数量 = @Original_需求数量); SELECT 编号, 物料编号, 年份, 计划期, 开始日期, "
S"结束日期, 需求数量, 记帐人, 修改日期, 状态, 备注 FROM 主需求计划 WHERE (年份 = @年份) AND (物料编号 = @物料编号) AND"
S" (计划期 = @计划期)";
this->sqlUpdateCommand1->Connection = this->sqlConnection1;
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@编号", System::Data::SqlDbType::VarChar, 14, S"编号"));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@物料编号", System::Data::SqlDbType::VarChar, 14, S"物料编号"));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@年份", System::Data::SqlDbType::Int, 4, S"年份"));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@计划期", System::Data::SqlDbType::Int, 4, S"计划期"));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@开始日期", System::Data::SqlDbType::Int, 4, S"开始日期"));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@结束日期", System::Data::SqlDbType::Int, 4, S"结束日期"));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@需求数量", System::Data::SqlDbType::Decimal, 9, System::Data::ParameterDirection::Input, false, (System::Byte)15, (System::Byte)2, S"需求数量", System::Data::DataRowVersion::Current, 0));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@记帐人", System::Data::SqlDbType::VarChar, 10, S"记帐人"));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@修改日期", System::Data::SqlDbType::Int, 4, S"修改日期"));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@状态", System::Data::SqlDbType::VarChar, 10, S"状态"));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@备注", System::Data::SqlDbType::VarChar, 40, S"备注"));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@Original_年份", System::Data::SqlDbType::Int, 4, System::Data::ParameterDirection::Input, false, (System::Byte)0, (System::Byte)0, S"年份", System::Data::DataRowVersion::Original, 0));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@Original_物料编号", System::Data::SqlDbType::VarChar, 14, System::Data::ParameterDirection::Input, false, (System::Byte)0, (System::Byte)0, S"物料编号", System::Data::DataRowVersion::Original, 0));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@Original_计划期", System::Data::SqlDbType::Int, 4, System::Data::ParameterDirection::Input, false, (System::Byte)0, (System::Byte)0, S"计划期", System::Data::DataRowVersion::Original, 0));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@Original_修改日期", System::Data::SqlDbType::Int, 4, System::Data::ParameterDirection::Input, false, (System::Byte)0, (System::Byte)0, S"修改日期", System::Data::DataRowVersion::Original, 0));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@Original_备注", System::Data::SqlDbType::VarChar, 40, System::Data::ParameterDirection::Input, false, (System::Byte)0, (System::Byte)0, S"备注", System::Data::DataRowVersion::Original, 0));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@Original_开始日期", System::Data::SqlDbType::Int, 4, System::Data::ParameterDirection::Input, false, (System::Byte)0, (System::Byte)0, S"开始日期", System::Data::DataRowVersion::Original, 0));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@Original_状态", System::Data::SqlDbType::VarChar, 10, System::Data::ParameterDirection::Input, false, (System::Byte)0, (System::Byte)0, S"状态", System::Data::DataRowVersion::Original, 0));
this->sqlUpdateCommand1->Parameters->Add(new System::Data::SqlClient::SqlParameter(S"@Original_结束日期", System::Data::SqlDbType::Int, 4, System::Data::ParameterDirection::Input, false, (System::Byte)0, (System::Byte)0, S"结束日期", System::Data::DataRowVersion::Original, 0));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -