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

📄 readerform.h

📁 vc++开发环境SQL数据库图书租借管理系统
💻 H
📖 第 1 页 / 共 3 页
字号:
			this->bindingNavigatorDeleteItem->Text = L"删除";
			// 
			// bindingNavigatorCountItem
			// 
			this->bindingNavigatorCountItem->Name = L"bindingNavigatorCountItem";
			this->bindingNavigatorCountItem->Size = System::Drawing::Size(35, 22);
			this->bindingNavigatorCountItem->Text = L"/ {0}";
			this->bindingNavigatorCountItem->ToolTipText = L"总项数";
			// 
			// bindingNavigatorAddNewItem
			// 
			this->bindingNavigatorAddNewItem->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"bindingNavigatorAddNewItem.Image")));
			this->bindingNavigatorAddNewItem->Name = L"bindingNavigatorAddNewItem";
			this->bindingNavigatorAddNewItem->RightToLeftAutoMirrorImage = true;
			this->bindingNavigatorAddNewItem->Size = System::Drawing::Size(49, 22);
			this->bindingNavigatorAddNewItem->Text = L"新增";
			// 
			// bindingNavigatorSeparator
			// 
			this->bindingNavigatorSeparator->Name = L"bindingNavigatorSeparator";
			this->bindingNavigatorSeparator->Size = System::Drawing::Size(6, 25);
			// 
			// bindingNavigatorMovePreviousItem
			// 
			this->bindingNavigatorMovePreviousItem->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
			this->bindingNavigatorMovePreviousItem->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"bindingNavigatorMovePreviousItem.Image")));
			this->bindingNavigatorMovePreviousItem->Name = L"bindingNavigatorMovePreviousItem";
			this->bindingNavigatorMovePreviousItem->RightToLeftAutoMirrorImage = true;
			this->bindingNavigatorMovePreviousItem->Size = System::Drawing::Size(23, 22);
			this->bindingNavigatorMovePreviousItem->Text = L"移到上一条记录";
			// 
			// bindingNavigatorMoveFirstItem
			// 
			this->bindingNavigatorMoveFirstItem->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
			this->bindingNavigatorMoveFirstItem->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"bindingNavigatorMoveFirstItem.Image")));
			this->bindingNavigatorMoveFirstItem->Name = L"bindingNavigatorMoveFirstItem";
			this->bindingNavigatorMoveFirstItem->RightToLeftAutoMirrorImage = true;
			this->bindingNavigatorMoveFirstItem->Size = System::Drawing::Size(23, 22);
			this->bindingNavigatorMoveFirstItem->Text = L"移到第一条记录";
			// 
			// 证件名称Label
			// 
			证件名称Label->AutoSize = true;
			证件名称Label->Location = System::Drawing::Point(3, 56);
			证件名称Label->Name = L"证件名称Label";
			证件名称Label->Size = System::Drawing::Size(59, 12);
			证件名称Label->TabIndex = 36;
			证件名称Label->Text = L"证件名称:";
			// 
			// 证件号码Label
			// 
			证件号码Label->AutoSize = true;
			证件号码Label->Location = System::Drawing::Point(183, 56);
			证件号码Label->Name = L"证件号码Label";
			证件号码Label->Size = System::Drawing::Size(59, 12);
			证件号码Label->TabIndex = 38;
			证件号码Label->Text = L"证件号码:";
			// 
			// 会员等级Label
			// 
			会员等级Label->AutoSize = true;
			会员等级Label->Location = System::Drawing::Point(390, 57);
			会员等级Label->Name = L"会员等级Label";
			会员等级Label->Size = System::Drawing::Size(59, 12);
			会员等级Label->TabIndex = 40;
			会员等级Label->Text = L"会员等级:";
			// 
			// 办证日期Label
			// 
			办证日期Label->AutoSize = true;
			办证日期Label->Location = System::Drawing::Point(3, 83);
			办证日期Label->Name = L"办证日期Label";
			办证日期Label->Size = System::Drawing::Size(59, 12);
			办证日期Label->TabIndex = 42;
			办证日期Label->Text = L"办证日期:";
			// 
			// 联系电话Label
			// 
			联系电话Label->AutoSize = true;
			联系电话Label->Location = System::Drawing::Point(183, 83);
			联系电话Label->Name = L"联系电话Label";
			联系电话Label->Size = System::Drawing::Size(59, 12);
			联系电话Label->TabIndex = 44;
			联系电话Label->Text = L"联系电话:";
			// 
			// 手机号码Label
			// 
			手机号码Label->AutoSize = true;
			手机号码Label->Location = System::Drawing::Point(353, 83);
			手机号码Label->Name = L"手机号码Label";
			手机号码Label->Size = System::Drawing::Size(59, 12);
			手机号码Label->TabIndex = 46;
			手机号码Label->Text = L"手机号码:";
			// 
			// 电子邮件Label
			// 
			电子邮件Label->AutoSize = true;
			电子邮件Label->Location = System::Drawing::Point(3, 110);
			电子邮件Label->Name = L"电子邮件Label";
			电子邮件Label->Size = System::Drawing::Size(59, 12);
			电子邮件Label->TabIndex = 48;
			电子邮件Label->Text = L"电子邮件:";
			// 
			// 说明Label
			// 
			说明Label->AutoSize = true;
			说明Label->Location = System::Drawing::Point(248, 110);
			说明Label->Name = L"说明Label";
			说明Label->Size = System::Drawing::Size(35, 12);
			说明Label->TabIndex = 50;
			说明Label->Text = L"说明:";
			// 
			// 读者信息DataGridView
			// 
			this->读者信息DataGridView->AllowUserToAddRows = false;
			this->读者信息DataGridView->AllowUserToDeleteRows = false;
			this->读者信息DataGridView->AllowUserToResizeRows = false;
			this->读者信息DataGridView->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom) 
				| System::Windows::Forms::AnchorStyles::Left) 
				| System::Windows::Forms::AnchorStyles::Right));
			this->读者信息DataGridView->AutoGenerateColumns = false;
			this->读者信息DataGridView->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^  >(12) {this->dataGridViewTextBoxColumn1, 
				this->dataGridViewTextBoxColumn2, this->dataGridViewTextBoxColumn3, this->dataGridViewTextBoxColumn4, this->dataGridViewTextBoxColumn5, 
				this->dataGridViewTextBoxColumn6, this->dataGridViewTextBoxColumn7, this->dataGridViewTextBoxColumn8, this->dataGridViewTextBoxColumn9, 
				this->dataGridViewTextBoxColumn10, this->dataGridViewTextBoxColumn11, this->dataGridViewTextBoxColumn12});
			this->读者信息DataGridView->DataSource = this->读者信息BindingSource;
			this->读者信息DataGridView->Location = System::Drawing::Point(5, 134);
			this->读者信息DataGridView->MultiSelect = false;
			this->读者信息DataGridView->Name = L"读者信息DataGridView";
			this->读者信息DataGridView->ReadOnly = true;
			this->读者信息DataGridView->RowHeadersVisible = false;
			this->读者信息DataGridView->RowTemplate->Height = 23;
			this->读者信息DataGridView->SelectionMode = System::Windows::Forms::DataGridViewSelectionMode::FullRowSelect;
			this->读者信息DataGridView->Size = System::Drawing::Size(531, 278);
			this->读者信息DataGridView->TabIndex = 27;
			// 
			// 读者信息BindingNavigator
			// 
			this->读者信息BindingNavigator->AddNewItem = this->bindingNavigatorAddNewItem;
			this->读者信息BindingNavigator->BindingSource = this->读者信息BindingSource;
			this->读者信息BindingNavigator->CountItem = this->bindingNavigatorCountItem;
			this->读者信息BindingNavigator->DeleteItem = this->bindingNavigatorDeleteItem;
			this->读者信息BindingNavigator->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(13) {this->bindingNavigatorMoveFirstItem, 
				this->bindingNavigatorMovePreviousItem, this->bindingNavigatorSeparator, this->bindingNavigatorPositionItem, this->bindingNavigatorCountItem, 
				this->bindingNavigatorSeparator1, this->bindingNavigatorMoveNextItem, this->bindingNavigatorMoveLastItem, this->bindingNavigatorSeparator2, 
				this->bindingNavigatorAddNewItem, this->bindingNavigatorDeleteItem, this->读者信息BindingNavigatorSaveItem, this->会员等级ToolStripButton});
			this->读者信息BindingNavigator->Location = System::Drawing::Point(0, 0);
			this->读者信息BindingNavigator->MoveFirstItem = this->bindingNavigatorMoveFirstItem;
			this->读者信息BindingNavigator->MoveLastItem = this->bindingNavigatorMoveLastItem;
			this->读者信息BindingNavigator->MoveNextItem = this->bindingNavigatorMoveNextItem;
			this->读者信息BindingNavigator->MovePreviousItem = this->bindingNavigatorMovePreviousItem;
			this->读者信息BindingNavigator->Name = L"读者信息BindingNavigator";
			this->读者信息BindingNavigator->PositionItem = this->bindingNavigatorPositionItem;
			this->读者信息BindingNavigator->Size = System::Drawing::Size(542, 25);
			this->读者信息BindingNavigator->TabIndex = 26;
			this->读者信息BindingNavigator->Text = L"bindingNavigator1";
			// 
			// ReaderForm
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(542, 416);
			this->Controls->Add(编号Label);
			this->Controls->Add(this->编号TextBox);
			this->Controls->Add(姓名Label);
			this->Controls->Add(this->姓名TextBox);
			this->Controls->Add(性别Label);
			this->Controls->Add(this->性别ComboBox);
			this->Controls->Add(出生日期Label);
			this->Controls->Add(this->出生日期DateTimePicker);
			this->Controls->Add(this->证件名称ComboBox);
			this->Controls->Add(this->证件号码TextBox);
			this->Controls->Add(this->会员等级ComboBox);
			this->Controls->Add(this->办证日期DateTimePicker);
			this->Controls->Add(this->联系电话TextBox);
			this->Controls->Add(this->手机号码TextBox);
			this->Controls->Add(this->电子邮件TextBox);
			this->Controls->Add(this->说明TextBox);
			this->Controls->Add(证件名称Label);
			this->Controls->Add(证件号码Label);
			this->Controls->Add(会员等级Label);
			this->Controls->Add(办证日期Label);
			this->Controls->Add(联系电话Label);
			this->Controls->Add(手机号码Label);
			this->Controls->Add(电子邮件Label);
			this->Controls->Add(说明Label);
			this->Controls->Add(this->读者信息DataGridView);
			this->Controls->Add(this->读者信息BindingNavigator);
			this->Name = L"ReaderForm";
			this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
			this->Text = L"读者信息设置";
			this->Load += gcnew System::EventHandler(this, &ReaderForm::ReaderForm_Load);
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->MyBooksDataSet))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->读者信息BindingSource))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->读者信息DataGridView))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->读者信息BindingNavigator))->EndInit();
			this->读者信息BindingNavigator->ResumeLayout(false);
			this->读者信息BindingNavigator->PerformLayout();
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
		private: static String^ MyBooksConnectionString= L"Data Source=.;Initial Catalog=MyBooks;Integrated Security=True;Pooling=False";	
		private: System::Void 读者信息BindingNavigatorSaveItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 this->Validate();
			 this->读者信息BindingSource->EndEdit();
			 this->读者信息TableAdapter->Update(this->MyBooksDataSet->读者信息);
		 }
		private: System::Void ReaderForm_Load(System::Object^  sender, System::EventArgs^  e) {
			 // TODO: 这行代码将数据加载到表“MyBooksDataSet.读者信息”中。您可以根据需要移动或移除它。
			 this->读者信息TableAdapter->Fill(this->MyBooksDataSet->读者信息);
			  GetAssociatorLevel();
		 }
		private:void GetAssociatorLevel()
        {
            this->会员等级ComboBox->Items->Clear();
            String^ MySQLConnectionString = MyBooksConnectionString;
            String^ MySQL = "Select  会员等级  From 会员等级";
            SqlConnection^ MyConnection = gcnew SqlConnection(MySQLConnectionString);
            MyConnection->Open();
			System::Data::DataTable^ MyAssociatorTable = gcnew System::Data::DataTable();
            SqlDataAdapter^ MyAdapter = gcnew SqlDataAdapter(MySQL, MyConnection);
            MyAdapter->Fill(MyAssociatorTable);
            for each (DataRow^ MyRow in MyAssociatorTable->Rows)
            {
                this->会员等级ComboBox->Items->Add(MyRow["会员等级"]->ToString());
            }
			if (MyConnection->State == ConnectionState::Open)
            {
                MyConnection->Close();
            }
        }
		private: System::Void 会员等级ToolStripButton_Click(System::Object^  sender, System::EventArgs^  e) {
			AssociatorForm^ MyDlg = gcnew AssociatorForm();
            MyDlg->ShowDialog(); 
            GetAssociatorLevel();
		 }
	};
}

⌨️ 快捷键说明

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