⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cinstore.h

📁 MFC程序开发参考大全 【明日科技】宋坤 刘锐宁 李伟明 【丛 书 名】 软件工程师典藏 【出 版 社】 人民邮电出版社 本书详细介绍了MFC框架中所有常用类及控件的应用
💻 H
📖 第 1 页 / 共 3 页
字号:
			// Column2
			// 
			this->Column2->HeaderText = L"价格";
			this->Column2->Name = L"Column2";
			this->Column2->ReadOnly = true;
			this->Column2->Width = 80;
			// 
			// Column3
			// 
			this->Column3->HeaderText = L"数量";
			this->Column3->Name = L"Column3";
			this->Column3->ReadOnly = true;
			this->Column3->Width = 80;
			// 
			// Column4
			// 
			this->Column4->HeaderText = L"折扣";
			this->Column4->Name = L"Column4";
			this->Column4->ReadOnly = true;
			this->Column4->Width = 80;
			// 
			// Column5
			// 
			this->Column5->HeaderText = L"小计";
			this->Column5->Name = L"Column5";
			this->Column5->ReadOnly = true;
			this->Column5->Width = 95;
			// 
			// label4
			// 
			this->label4->AutoSize = true;
			this->label4->ForeColor = System::Drawing::SystemColors::ControlText;
			this->label4->Location = System::Drawing::Point(18, 435);
			this->label4->Name = L"label4";
			this->label4->Size = System::Drawing::Size(41, 12);
			this->label4->TabIndex = 6;
			this->label4->Text = L"总数量";
			// 
			// label5
			// 
			this->label5->AutoSize = true;
			this->label5->ForeColor = System::Drawing::SystemColors::ControlText;
			this->label5->Location = System::Drawing::Point(181, 436);
			this->label5->Name = L"label5";
			this->label5->Size = System::Drawing::Size(41, 12);
			this->label5->TabIndex = 7;
			this->label5->Text = L"总金额";
			// 
			// TotalNum
			// 
			this->TotalNum->Enabled = false;
			this->TotalNum->Location = System::Drawing::Point(65, 432);
			this->TotalNum->Name = L"TotalNum";
			this->TotalNum->Size = System::Drawing::Size(100, 21);
			this->TotalNum->TabIndex = 8;
			this->TotalNum->Text = L"0";
			this->TotalNum->Enter += gcnew System::EventHandler(this, &CInStore::BookName_Enter);
			// 
			// TotalMoney
			// 
			this->TotalMoney->Enabled = false;
			this->TotalMoney->Location = System::Drawing::Point(232, 432);
			this->TotalMoney->Name = L"TotalMoney";
			this->TotalMoney->Size = System::Drawing::Size(100, 21);
			this->TotalMoney->TabIndex = 9;
			this->TotalMoney->Text = L"0";
			this->TotalMoney->Enter += gcnew System::EventHandler(this, &CInStore::BookName_Enter);
			// 
			// button1
			// 
			this->button1->Location = System::Drawing::Point(378, 430);
			this->button1->Name = L"button1";
			this->button1->Size = System::Drawing::Size(75, 23);
			this->button1->TabIndex = 10;
			this->button1->Text = L"保存";
			this->button1->UseVisualStyleBackColor = true;
			this->button1->Enter += gcnew System::EventHandler(this, &CInStore::BookName_Enter);
			this->button1->Click += gcnew System::EventHandler(this, &CInStore::button1_Click);
			// 
			// ButtonCancel
			// 
			this->ButtonCancel->Location = System::Drawing::Point(464, 430);
			this->ButtonCancel->Name = L"ButtonCancel";
			this->ButtonCancel->Size = System::Drawing::Size(75, 23);
			this->ButtonCancel->TabIndex = 11;
			this->ButtonCancel->Text = L"取消";
			this->ButtonCancel->UseVisualStyleBackColor = true;
			this->ButtonCancel->Enter += gcnew System::EventHandler(this, &CInStore::BookName_Enter);
			this->ButtonCancel->Click += gcnew System::EventHandler(this, &CInStore::ButtonCancel_Click);
			// 
			// button3
			// 
			this->button3->Location = System::Drawing::Point(550, 430);
			this->button3->Name = L"button3";
			this->button3->Size = System::Drawing::Size(75, 23);
			this->button3->TabIndex = 12;
			this->button3->Text = L"退出";
			this->button3->UseVisualStyleBackColor = true;
			this->button3->Enter += gcnew System::EventHandler(this, &CInStore::BookName_Enter);
			this->button3->Click += gcnew System::EventHandler(this, &CInStore::button3_Click);
			// 
			// groupBox1
			// 
			this->groupBox1->Controls->Add(this->Author);
			this->groupBox1->Controls->Add(this->label10);
			this->groupBox1->Controls->Add(this->BookRebate);
			this->groupBox1->Controls->Add(this->label9);
			this->groupBox1->Controls->Add(this->BookNum);
			this->groupBox1->Controls->Add(this->label8);
			this->groupBox1->Controls->Add(this->BookPrice);
			this->groupBox1->Controls->Add(this->label7);
			this->groupBox1->Controls->Add(this->BookName);
			this->groupBox1->Controls->Add(this->label6);
			this->groupBox1->Location = System::Drawing::Point(21, 88);
			this->groupBox1->Name = L"groupBox1";
			this->groupBox1->Size = System::Drawing::Size(637, 61);
			this->groupBox1->TabIndex = 14;
			this->groupBox1->TabStop = false;
			// 
			// Author
			// 
			this->Author->Location = System::Drawing::Point(258, 21);
			this->Author->Name = L"Author";
			this->Author->ReadOnly = true;
			this->Author->Size = System::Drawing::Size(62, 21);
			this->Author->TabIndex = 1;
			this->Author->TabStop = false;
			this->Author->Enter += gcnew System::EventHandler(this, &CInStore::BookName_Enter);
			this->Author->TextChanged += gcnew System::EventHandler(this, &CInStore::Author_TextChanged);
			this->Author->KeyDown += gcnew System::Windows::Forms::KeyEventHandler(this, &CInStore::BookName_KeyDown);
			// 
			// label10
			// 
			this->label10->AutoSize = true;
			this->label10->Location = System::Drawing::Point(225, 26);
			this->label10->Name = L"label10";
			this->label10->Size = System::Drawing::Size(29, 12);
			this->label10->TabIndex = 6;
			this->label10->Text = L"作者";
			// 
			// BookRebate
			// 
			this->BookRebate->Location = System::Drawing::Point(558, 21);
			this->BookRebate->Name = L"BookRebate";
			this->BookRebate->Size = System::Drawing::Size(62, 21);
			this->BookRebate->TabIndex = 4;
			this->BookRebate->Text = L"1.0";
			this->BookRebate->Enter += gcnew System::EventHandler(this, &CInStore::BookName_Enter);
			this->BookRebate->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &CInStore::BookPrice_KeyPress);
			this->BookRebate->KeyDown += gcnew System::Windows::Forms::KeyEventHandler(this, &CInStore::BookName_KeyDown);
			// 
			// label9
			// 
			this->label9->AutoSize = true;
			this->label9->Location = System::Drawing::Point(526, 26);
			this->label9->Name = L"label9";
			this->label9->Size = System::Drawing::Size(29, 12);
			this->label9->TabIndex = 9;
			this->label9->Text = L"折扣";
			// 
			// BookNum
			// 
			this->BookNum->Location = System::Drawing::Point(459, 21);
			this->BookNum->Name = L"BookNum";
			this->BookNum->Size = System::Drawing::Size(62, 21);
			this->BookNum->TabIndex = 3;
			this->BookNum->Text = L"0";
			this->BookNum->Enter += gcnew System::EventHandler(this, &CInStore::BookName_Enter);
			this->BookNum->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &CInStore::BookNum_KeyPress);
			this->BookNum->KeyDown += gcnew System::Windows::Forms::KeyEventHandler(this, &CInStore::BookName_KeyDown);
			// 
			// label8
			// 
			this->label8->AutoSize = true;
			this->label8->Location = System::Drawing::Point(425, 26);
			this->label8->Name = L"label8";
			this->label8->Size = System::Drawing::Size(29, 12);
			this->label8->TabIndex = 8;
			this->label8->Text = L"数量";
			// 
			// BookPrice
			// 
			this->BookPrice->Location = System::Drawing::Point(356, 21);
			this->BookPrice->Name = L"BookPrice";
			this->BookPrice->Size = System::Drawing::Size(62, 21);
			this->BookPrice->TabIndex = 2;
			this->BookPrice->Enter += gcnew System::EventHandler(this, &CInStore::BookName_Enter);
			this->BookPrice->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &CInStore::BookPrice_KeyPress);
			this->BookPrice->KeyDown += gcnew System::Windows::Forms::KeyEventHandler(this, &CInStore::BookName_KeyDown);
			// 
			// label7
			// 
			this->label7->AutoSize = true;
			this->label7->Location = System::Drawing::Point(325, 26);
			this->label7->Name = L"label7";
			this->label7->Size = System::Drawing::Size(29, 12);
			this->label7->TabIndex = 7;
			this->label7->Text = L"价格";
			// 
			// BookName
			// 
			this->BookName->Location = System::Drawing::Point(71, 21);
			this->BookName->Name = L"BookName";
			this->BookName->Size = System::Drawing::Size(148, 21);
			this->BookName->TabIndex = 0;
			this->BookName->TabStop = false;
			this->BookName->Enter += gcnew System::EventHandler(this, &CInStore::BookName_Enter);
			this->BookName->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &CInStore::BookName_KeyPress);
			this->BookName->TextChanged += gcnew System::EventHandler(this, &CInStore::BookName_TextChanged);
			this->BookName->KeyDown += gcnew System::Windows::Forms::KeyEventHandler(this, &CInStore::BookName_KeyDown);
			// 
			// label6
			// 
			this->label6->AutoSize = true;
			this->label6->Location = System::Drawing::Point(14, 26);
			this->label6->Name = L"label6";
			this->label6->Size = System::Drawing::Size(53, 12);
			this->label6->TabIndex = 5;
			this->label6->Text = L"图书名称";
			// 
			// AuList
			// 
			this->AuList->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
			this->AuList->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^  >(5) {this->dataGridViewTextBoxColumn1, 
				this->dataGridViewTextBoxColumn2, this->dataGridViewTextBoxColumn3, this->dataGridViewTextBoxColumn4, this->dataGridViewTextBoxColumn5});
			this->AuList->Location = System::Drawing::Point(92, 136);
			this->AuList->MultiSelect = false;
			this->AuList->Name = L"AuList";
			this->AuList->RowHeadersVisible = false;
			this->AuList->RowTemplate->Height = 20;
			this->AuList->SelectionMode = System::Windows::Forms::DataGridViewSelectionMode::FullRowSelect;
			this->AuList->Size = System::Drawing::Size(519, 122);
			this->AuList->TabIndex = 15;
			this->AuList->Visible = false;
			this->AuList->KeyDown += gcnew System::Windows::Forms::KeyEventHandler(this, &CInStore::AuList_KeyDown);
			this->AuList->CellDoubleClick += gcnew System::Windows::Forms::DataGridViewCellEventHandler(this, &CInStore::AuList_CellDoubleClick);
			this->AuList->Leave += gcnew System::EventHandler(this, &CInStore::AuList_Leave);
			// 
			// dataGridViewTextBoxColumn1
			// 
			this->dataGridViewTextBoxColumn1->HeaderText = L"图书名称";
			this->dataGridViewTextBoxColumn1->Name = L"dataGridViewTextBoxColumn1";
			this->dataGridViewTextBoxColumn1->ReadOnly = true;
			this->dataGridViewTextBoxColumn1->Width = 200;
			// 
			// dataGridViewTextBoxColumn2
			// 
			this->dataGridViewTextBoxColumn2->HeaderText = L"条形码";
			this->dataGridViewTextBoxColumn2->Name = L"dataGridViewTextBoxColumn2";
			this->dataGridViewTextBoxColumn2->ReadOnly = true;
			// 
			// dataGridViewTextBoxColumn3
			// 
			this->dataGridViewTextBoxColumn3->HeaderText = L"作者";
			this->dataGridViewTextBoxColumn3->Name = L"dataGridViewTextBoxColumn3";
			this->dataGridViewTextBoxColumn3->ReadOnly = true;
			this->dataGridViewTextBoxColumn3->Width = 70;
			// 
			// dataGridViewTextBoxColumn4
			// 
			this->dataGridViewTextBoxColumn4->HeaderText = L"出版社";
			this->dataGridViewTextBoxColumn4->Name = L"dataGridViewTextBoxColumn4";
			this->dataGridViewTextBoxColumn4->ReadOnly = true;
			this->dataGridViewTextBoxColumn4->Width = 80;
			// 
			// dataGridViewTextBoxColumn5
			// 
			this->dataGridViewTextBoxColumn5->HeaderText = L"价格";
			this->dataGridViewTextBoxColumn5->Name = L"dataGridViewTextBoxColumn5";
			this->dataGridViewTextBoxColumn5->ReadOnly = true;
			this->dataGridViewTextBoxColumn5->Width = 60;
			// 
			// CInStore
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(670, 484);
			this->Controls->Add(this->AuList);
			this->Controls->Add(this->groupBox1);
			this->Controls->Add(this->button3);
			this->Controls->Add(this->ButtonCancel);
			this->Controls->Add(this->button1);
			this->Controls->Add(this->TotalMoney);
			this->Controls->Add(this->TotalNum);
			this->Controls->Add(this->label5);
			this->Controls->Add(this->label4);
			this->Controls->Add(this->BookList);
			this->Controls->Add(this->Operator);
			this->Controls->Add(this->dateTime1);
			this->Controls->Add(this->label3);
			this->Controls->Add(this->label2);
			this->Controls->Add(this->label1);
			this->ForeColor = System::Drawing::SystemColors::ControlText;
			this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
			this->KeyPreview = true;
			this->MaximizeBox = false;
			this->Name = L"CInStore";
			this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
			this->Text = L"图书入库管理";
			this->Enter += gcnew System::EventHandler(this, &CInStore::BookName_Enter);
			this->Load += gcnew System::EventHandler(this, &CInStore::CInStore_Load);
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->BookList))->EndInit();
			this->groupBox1->ResumeLayout(false);
			this->groupBox1->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->AuList))->EndInit();
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion

private: System::Void AuList_Leave(System::Object^  sender, System::EventArgs^  e) {

			 AuList->Hide();

		 }
private: System::Void CInStore_Load(System::Object^  sender, System::EventArgs^  e) {

			DataManage.ConStr ="Data Source=.;Initial Catalog=BookManage;User ID=sa";
			DataManage.ConnectDataBase();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -