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

📄 form1.h

📁 Visual C++ 2005的源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
      this->toolStripButton9->Text = L"Delete";
      // 
      // toolStripButton10
      // 
      this->toolStripButton10->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
      this->toolStripButton10->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"toolStripButton10.Image")));
      this->toolStripButton10->Name = L"toolStripButton10";
      this->toolStripButton10->RightToLeftAutoMirrorImage = true;
      this->toolStripButton10->Size = System::Drawing::Size(23, 22);
      this->toolStripButton10->Text = L"Move first";
      // 
      // toolStripButton11
      // 
      this->toolStripButton11->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
      this->toolStripButton11->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"toolStripButton11.Image")));
      this->toolStripButton11->Name = L"toolStripButton11";
      this->toolStripButton11->RightToLeftAutoMirrorImage = true;
      this->toolStripButton11->Size = System::Drawing::Size(23, 22);
      this->toolStripButton11->Text = L"Move previous";
      // 
      // toolStripSeparator4
      // 
      this->toolStripSeparator4->Name = L"toolStripSeparator4";
      this->toolStripSeparator4->Size = System::Drawing::Size(6, 25);
      // 
      // toolStripTextBox2
      // 
      this->toolStripTextBox2->AccessibleName = L"Position";
      this->toolStripTextBox2->AutoSize = false;
      this->toolStripTextBox2->Name = L"toolStripTextBox2";
      this->toolStripTextBox2->Size = System::Drawing::Size(50, 23);
      this->toolStripTextBox2->Text = L"0";
      this->toolStripTextBox2->ToolTipText = L"Current position";
      // 
      // toolStripSeparator5
      // 
      this->toolStripSeparator5->Name = L"toolStripSeparator5";
      this->toolStripSeparator5->Size = System::Drawing::Size(6, 25);
      // 
      // toolStripButton12
      // 
      this->toolStripButton12->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
      this->toolStripButton12->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"toolStripButton12.Image")));
      this->toolStripButton12->Name = L"toolStripButton12";
      this->toolStripButton12->RightToLeftAutoMirrorImage = true;
      this->toolStripButton12->Size = System::Drawing::Size(23, 20);
      this->toolStripButton12->Text = L"Move next";
      // 
      // toolStripButton13
      // 
      this->toolStripButton13->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
      this->toolStripButton13->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"toolStripButton13.Image")));
      this->toolStripButton13->Name = L"toolStripButton13";
      this->toolStripButton13->RightToLeftAutoMirrorImage = true;
      this->toolStripButton13->Size = System::Drawing::Size(23, 20);
      this->toolStripButton13->Text = L"Move last";
      // 
      // toolStripSeparator6
      // 
      this->toolStripSeparator6->Name = L"toolStripSeparator6";
      this->toolStripSeparator6->Size = System::Drawing::Size(6, 25);
      // 
      // toolStripButton14
      // 
      this->toolStripButton14->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
      this->toolStripButton14->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"toolStripButton14.Image")));
      this->toolStripButton14->Name = L"toolStripButton14";
      this->toolStripButton14->Size = System::Drawing::Size(23, 20);
      this->toolStripButton14->Text = L"Save Data";
      // 
      // ProductsBindingSource
      // 
      this->ProductsBindingSource->DataMember = L"Products";
      this->ProductsBindingSource->DataSource = this->DataSet1;
      // 
      // ProductsTableAdapter
      // 
      this->ProductsTableAdapter->ClearBeforeFill = true;
      // 
      // ProductsDataGridView
      // 
      this->ProductsDataGridView->AutoGenerateColumns = false;
      this->ProductsDataGridView->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^  >(10) {this->dataGridViewTextBoxColumn29, 
        this->dataGridViewTextBoxColumn30, this->dataGridViewTextBoxColumn31, this->dataGridViewTextBoxColumn32, this->dataGridViewTextBoxColumn33, 
        this->dataGridViewTextBoxColumn34, this->dataGridViewTextBoxColumn35, this->dataGridViewTextBoxColumn36, this->dataGridViewTextBoxColumn37, 
        this->dataGridViewCheckBoxColumn1});
      this->ProductsDataGridView->DataSource = this->ProductsBindingSource;
      this->ProductsDataGridView->Dock = System::Windows::Forms::DockStyle::Fill;
      this->ProductsDataGridView->Location = System::Drawing::Point(0, 25);
      this->ProductsDataGridView->Name = L"ProductsDataGridView";
      this->ProductsDataGridView->Size = System::Drawing::Size(375, 205);
      this->ProductsDataGridView->TabIndex = 2;
      // 
      // dataGridViewTextBoxColumn29
      // 
      this->dataGridViewTextBoxColumn29->DataPropertyName = L"ProductID";
      this->dataGridViewTextBoxColumn29->HeaderText = L"ProductID";
      this->dataGridViewTextBoxColumn29->Name = L"dataGridViewTextBoxColumn29";
      this->dataGridViewTextBoxColumn29->ReadOnly = true;
      // 
      // dataGridViewTextBoxColumn30
      // 
      this->dataGridViewTextBoxColumn30->DataPropertyName = L"ProductName";
      this->dataGridViewTextBoxColumn30->HeaderText = L"ProductName";
      this->dataGridViewTextBoxColumn30->Name = L"dataGridViewTextBoxColumn30";
      // 
      // dataGridViewTextBoxColumn31
      // 
      this->dataGridViewTextBoxColumn31->DataPropertyName = L"SupplierID";
      this->dataGridViewTextBoxColumn31->HeaderText = L"SupplierID";
      this->dataGridViewTextBoxColumn31->Name = L"dataGridViewTextBoxColumn31";
      // 
      // dataGridViewTextBoxColumn32
      // 
      this->dataGridViewTextBoxColumn32->DataPropertyName = L"CategoryID";
      this->dataGridViewTextBoxColumn32->HeaderText = L"CategoryID";
      this->dataGridViewTextBoxColumn32->Name = L"dataGridViewTextBoxColumn32";
      // 
      // dataGridViewTextBoxColumn33
      // 
      this->dataGridViewTextBoxColumn33->DataPropertyName = L"QuantityPerUnit";
      this->dataGridViewTextBoxColumn33->HeaderText = L"QuantityPerUnit";
      this->dataGridViewTextBoxColumn33->Name = L"dataGridViewTextBoxColumn33";
      // 
      // dataGridViewTextBoxColumn34
      // 
      this->dataGridViewTextBoxColumn34->DataPropertyName = L"UnitPrice";
      this->dataGridViewTextBoxColumn34->HeaderText = L"UnitPrice";
      this->dataGridViewTextBoxColumn34->Name = L"dataGridViewTextBoxColumn34";
      // 
      // dataGridViewTextBoxColumn35
      // 
      this->dataGridViewTextBoxColumn35->DataPropertyName = L"UnitsInStock";
      this->dataGridViewTextBoxColumn35->HeaderText = L"UnitsInStock";
      this->dataGridViewTextBoxColumn35->Name = L"dataGridViewTextBoxColumn35";
      // 
      // dataGridViewTextBoxColumn36
      // 
      this->dataGridViewTextBoxColumn36->DataPropertyName = L"UnitsOnOrder";
      this->dataGridViewTextBoxColumn36->HeaderText = L"UnitsOnOrder";
      this->dataGridViewTextBoxColumn36->Name = L"dataGridViewTextBoxColumn36";
      // 
      // dataGridViewTextBoxColumn37
      // 
      this->dataGridViewTextBoxColumn37->DataPropertyName = L"ReorderLevel";
      this->dataGridViewTextBoxColumn37->HeaderText = L"ReorderLevel";
      this->dataGridViewTextBoxColumn37->Name = L"dataGridViewTextBoxColumn37";
      // 
      // dataGridViewCheckBoxColumn1
      // 
      this->dataGridViewCheckBoxColumn1->DataPropertyName = L"Discontinued";
      this->dataGridViewCheckBoxColumn1->HeaderText = L"Discontinued";
      this->dataGridViewCheckBoxColumn1->Name = L"dataGridViewCheckBoxColumn1";
      // 
      // Form1
      // 
      this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
      this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
      this->ClientSize = System::Drawing::Size(389, 262);
      this->Controls->Add(this->tabControl1);
      this->Name = L"Form1";
      this->Text = L"Accessing Multiple Tables";
      this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
      this->tabControl1->ResumeLayout(false);
      this->tabPage1->ResumeLayout(false);
      this->tabPage2->ResumeLayout(false);
      this->tabPage3->ResumeLayout(false);
      this->panel1->ResumeLayout(false);
      this->panel1->PerformLayout();
      this->panel2->ResumeLayout(false);
      this->panel2->PerformLayout();
      this->panel3->ResumeLayout(false);
      this->panel3->PerformLayout();
      (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->DataSet1))->EndInit();
      (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->EmployeesBindingSource))->EndInit();
      (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->EmployeesBindingNavigator))->EndInit();
      this->EmployeesBindingNavigator->ResumeLayout(false);
      this->EmployeesBindingNavigator->PerformLayout();
      (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->EmployeesDataGridView))->EndInit();
      (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->CustomersBindingSource))->EndInit();
      (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->CustomersDataGridView))->EndInit();
      (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->bindingNavigator1))->EndInit();
      this->bindingNavigator1->ResumeLayout(false);
      this->bindingNavigator1->PerformLayout();
      (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->bindingNavigator2))->EndInit();
      this->bindingNavigator2->ResumeLayout(false);
      this->bindingNavigator2->PerformLayout();
      (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->ProductsBindingSource))->EndInit();
      (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->ProductsDataGridView))->EndInit();
      this->ResumeLayout(false);

    }
#pragma endregion
  private: System::Void EmployeesBindingNavigatorSaveItem_Click(System::Object^  sender, System::EventArgs^  e) {
             this->Validate();
             this->EmployeesBindingSource->EndEdit();
             this->EmployeesTableAdapter->Update(this->DataSet1->Employees);
           }
private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
           // TODO: This line of code loads data into the 'DataSet1.Products' table. You can move, or remove it, as needed.
           this->ProductsTableAdapter->Fill(this->DataSet1->Products);
           // TODO: This line of code loads data into the 'DataSet1.Customers' table. You can move, or remove it, as needed.
           this->CustomersTableAdapter->Fill(this->DataSet1->Customers);
           // TODO: This line of code loads data into the 'DataSet1.Employees' table. You can move, or remove it, as needed.
           this->EmployeesTableAdapter->Fill(this->DataSet1->Employees);
         }
};
}

⌨️ 快捷键说明

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