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

📄 bomform.h

📁 Visual C++.net数据库开发经典案例
💻 H
📖 第 1 页 / 共 3 页
字号:
#pragma once

#include "LinkDataBase.h"
#include "SelectMaterials.h"

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;


namespace My
{
	/// <summary> 
	/// BomForm 摘要
	///
	/// 警告: 如果您更改该类的名称,则将需要更改 
	///          与该类所依赖的所有 .resx 文件关联的托管资源编译器工具的 
	///          “资源文件名”属性。  否则,
	///          设计器将不能与此窗体关联的
	///          本地化资源正确交互。
	/// </summary>
	public __gc class BomForm : public System::Windows::Forms::Form
	{
		//--------------------成员声明------------------------
	private:
		LinkDataBase* MyDataBase;	//数据库连接类
		DataSet* ds;		
		String* strTableName;
		String* strSQL;
	private: System::Windows::Forms::ImageList *  imageList1;

			 CurrencyManager* cmBom;
	//-------------------成员声明结束-----------------------
	public: 
		BomForm(void)
		{
			InitializeComponent();
			this->MyDataBase = new LinkDataBase();
			this->ds = new DataSet();
			this->BomSelectSqlCmd->Connection = this->MyDataBase->myConnection;
			this->BomInsertSqlCmd->Connection = this->MyDataBase->myConnection;
			this->BomUpdateSqlCmd->Connection = this->MyDataBase->myConnection;
			this->BomDeleteSqlCmd->Connection = this->MyDataBase->myConnection;
			//this->strSQL = S"SELECT 物料清单.*, 物料主文件.物料名称 FROM 物料清单 INNER JOIN 物料主文件 ON 物料清单.物料编号 = 物料主文件.物料编号";
			this->strTableName = S"物料清单";
			this->BomAdapter->Fill(this->ds,this->strTableName);
			this->cmBom = __try_cast<CurrencyManager*>(this->BindingContext->Item[this->ds->Tables->Item[S"物料清单"]]);
		}
        
	protected: 
		void Dispose(Boolean disposing)
		{
			if (disposing && components)
			{
				components->Dispose();
			}
			__super::Dispose(disposing);
		}
	private: System::Windows::Forms::ToolBar *  toolBar1;




	private: System::Windows::Forms::ToolBarButton *  tBtnNewRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnModifyRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnDeleteRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnPostModified;
	private: System::Windows::Forms::ToolBarButton *  tBtnCancleModified;
	private: System::Windows::Forms::ToolBarButton *  tBtnQuit;
	private: System::Windows::Forms::GroupBox *  groupBox1;
	private: System::Windows::Forms::Label *  label1;
	private: System::Windows::Forms::Label *  label2;
	private: System::Windows::Forms::Label *  label3;
	private: System::Windows::Forms::Label *  label4;
	private: System::Windows::Forms::Label *  label5;
	private: System::Windows::Forms::Label *  label6;
	private: System::Windows::Forms::Label *  label7;
	private: System::Windows::Forms::Label *  label8;
	private: System::Windows::Forms::Label *  label9;
	private: System::Windows::Forms::Label *  label10;
	private: System::Windows::Forms::TextBox *  tBoxMaterialID;
	private: System::Windows::Forms::TextBox *  tBoxMaterialName;
	private: System::Windows::Forms::TextBox *  tBoxTopperName;
	private: System::Windows::Forms::TextBox *  tBoxTopperID;
	private: System::Windows::Forms::TextBox *  tBoxAuditingDate;
	private: System::Windows::Forms::TextBox *  tBoxDemandingQuantity;
	private: System::Windows::Forms::TextBox *  tBoxInnerCode;
	private: System::Windows::Forms::TextBox *  tBoxDrawedDepot;
	private: System::Windows::Forms::TextBox *  tBoxDrawingWorkshop;
	private: System::Windows::Forms::TextBox *  tBoxOthers;
	private: System::Windows::Forms::TreeView *  tvMaterialTree;
	private: System::Windows::Forms::Button *  btnLookup;
	private: System::Data::SqlClient::SqlCommand *  BomSelectSqlCmd;
	private: System::Data::SqlClient::SqlCommand *  BomInsertSqlCmd;
	private: System::Data::SqlClient::SqlCommand *  BomUpdateSqlCmd;
	private: System::Data::SqlClient::SqlCommand *  BomDeleteSqlCmd;
	private: System::Data::SqlClient::SqlDataAdapter *  BomAdapter;
	private: System::ComponentModel::IContainer *  components;


	private:
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>


		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		void InitializeComponent(void)
		{
			this->components = new System::ComponentModel::Container();
			System::Resources::ResourceManager *  resources = new System::Resources::ResourceManager(__typeof(My::BomForm));
			this->toolBar1 = new System::Windows::Forms::ToolBar();
			this->tBtnNewRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnModifyRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnDeleteRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnPostModified = new System::Windows::Forms::ToolBarButton();
			this->tBtnCancleModified = new System::Windows::Forms::ToolBarButton();
			this->tBtnQuit = new System::Windows::Forms::ToolBarButton();
			this->imageList1 = new System::Windows::Forms::ImageList(this->components);
			this->tvMaterialTree = new System::Windows::Forms::TreeView();
			this->groupBox1 = new System::Windows::Forms::GroupBox();
			this->btnLookup = new System::Windows::Forms::Button();
			this->label10 = new System::Windows::Forms::Label();
			this->tBoxOthers = new System::Windows::Forms::TextBox();
			this->label8 = new System::Windows::Forms::Label();
			this->tBoxDrawedDepot = new System::Windows::Forms::TextBox();
			this->label9 = new System::Windows::Forms::Label();
			this->tBoxDrawingWorkshop = new System::Windows::Forms::TextBox();
			this->label7 = new System::Windows::Forms::Label();
			this->tBoxInnerCode = new System::Windows::Forms::TextBox();
			this->label5 = new System::Windows::Forms::Label();
			this->tBoxAuditingDate = new System::Windows::Forms::TextBox();
			this->label6 = new System::Windows::Forms::Label();
			this->tBoxDemandingQuantity = new System::Windows::Forms::TextBox();
			this->label3 = new System::Windows::Forms::Label();
			this->tBoxTopperName = new System::Windows::Forms::TextBox();
			this->label4 = new System::Windows::Forms::Label();
			this->tBoxTopperID = new System::Windows::Forms::TextBox();
			this->label2 = new System::Windows::Forms::Label();
			this->tBoxMaterialName = new System::Windows::Forms::TextBox();
			this->label1 = new System::Windows::Forms::Label();
			this->tBoxMaterialID = new System::Windows::Forms::TextBox();
			this->BomSelectSqlCmd = new System::Data::SqlClient::SqlCommand();
			this->BomInsertSqlCmd = new System::Data::SqlClient::SqlCommand();
			this->BomUpdateSqlCmd = new System::Data::SqlClient::SqlCommand();
			this->BomDeleteSqlCmd = new System::Data::SqlClient::SqlCommand();
			this->BomAdapter = new System::Data::SqlClient::SqlDataAdapter();
			this->groupBox1->SuspendLayout();
			this->SuspendLayout();
			// 
			// toolBar1
			// 
			System::Windows::Forms::ToolBarButton* __mcTemp__1[] = new System::Windows::Forms::ToolBarButton*[6];
			__mcTemp__1[0] = this->tBtnNewRecord;
			__mcTemp__1[1] = this->tBtnModifyRecord;
			__mcTemp__1[2] = this->tBtnDeleteRecord;
			__mcTemp__1[3] = this->tBtnPostModified;
			__mcTemp__1[4] = this->tBtnCancleModified;
			__mcTemp__1[5] = this->tBtnQuit;
			this->toolBar1->Buttons->AddRange(__mcTemp__1);
			this->toolBar1->DropDownArrows = true;
			this->toolBar1->ImageList = this->imageList1;
			this->toolBar1->Location = System::Drawing::Point(0, 0);
			this->toolBar1->Name = S"toolBar1";
			this->toolBar1->ShowToolTips = true;
			this->toolBar1->Size = System::Drawing::Size(624, 41);
			this->toolBar1->TabIndex = 1;
			this->toolBar1->ButtonClick += new System::Windows::Forms::ToolBarButtonClickEventHandler(this, toolBar1_ButtonClick);
			// 
			// tBtnNewRecord
			// 
			this->tBtnNewRecord->ImageIndex = 9;
			this->tBtnNewRecord->Text = S"新增";
			this->tBtnNewRecord->ToolTipText = S"新增";
			// 
			// tBtnModifyRecord
			// 
			this->tBtnModifyRecord->ImageIndex = 10;
			this->tBtnModifyRecord->Text = S"修改";
			this->tBtnModifyRecord->ToolTipText = S"修改";
			// 
			// tBtnDeleteRecord
			// 
			this->tBtnDeleteRecord->ImageIndex = 3;
			this->tBtnDeleteRecord->Text = S"删除";
			this->tBtnDeleteRecord->ToolTipText = S"删除";
			// 
			// tBtnPostModified
			// 
			this->tBtnPostModified->ImageIndex = 0;
			this->tBtnPostModified->Text = S"保存";
			this->tBtnPostModified->ToolTipText = S"保存";
			// 
			// tBtnCancleModified
			// 
			this->tBtnCancleModified->ImageIndex = 2;
			this->tBtnCancleModified->Text = S"取消";
			this->tBtnCancleModified->ToolTipText = S"取消";
			// 
			// tBtnQuit
			// 
			this->tBtnQuit->ImageIndex = 12;
			this->tBtnQuit->Text = S"退出";
			this->tBtnQuit->ToolTipText = S"退出";
			// 
			// 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;
			// 
			// tvMaterialTree
			// 
			this->tvMaterialTree->Dock = System::Windows::Forms::DockStyle::Fill;
			this->tvMaterialTree->ImageIndex = -1;
			this->tvMaterialTree->Location = System::Drawing::Point(0, 41);
			this->tvMaterialTree->Name = S"tvMaterialTree";
			this->tvMaterialTree->SelectedImageIndex = -1;
			this->tvMaterialTree->Size = System::Drawing::Size(240, 348);
			this->tvMaterialTree->TabIndex = 2;
			this->tvMaterialTree->AfterSelect += new System::Windows::Forms::TreeViewEventHandler(this, tvMaterialTree_AfterSelect);
			// 
			// groupBox1
			// 
			this->groupBox1->Controls->Add(this->btnLookup);
			this->groupBox1->Controls->Add(this->label10);
			this->groupBox1->Controls->Add(this->tBoxOthers);
			this->groupBox1->Controls->Add(this->label8);
			this->groupBox1->Controls->Add(this->tBoxDrawedDepot);
			this->groupBox1->Controls->Add(this->label9);
			this->groupBox1->Controls->Add(this->tBoxDrawingWorkshop);
			this->groupBox1->Controls->Add(this->label7);
			this->groupBox1->Controls->Add(this->tBoxInnerCode);
			this->groupBox1->Controls->Add(this->label5);
			this->groupBox1->Controls->Add(this->tBoxAuditingDate);
			this->groupBox1->Controls->Add(this->label6);
			this->groupBox1->Controls->Add(this->tBoxDemandingQuantity);
			this->groupBox1->Controls->Add(this->label3);
			this->groupBox1->Controls->Add(this->tBoxTopperName);
			this->groupBox1->Controls->Add(this->label4);
			this->groupBox1->Controls->Add(this->tBoxTopperID);
			this->groupBox1->Controls->Add(this->label2);
			this->groupBox1->Controls->Add(this->tBoxMaterialName);
			this->groupBox1->Controls->Add(this->label1);
			this->groupBox1->Controls->Add(this->tBoxMaterialID);
			this->groupBox1->Dock = System::Windows::Forms::DockStyle::Right;
			this->groupBox1->Location = System::Drawing::Point(240, 41);

⌨️ 快捷键说明

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