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

📄 warrentinput.h

📁 Visual C++.net数据库开发经典案例
💻 H
📖 第 1 页 / 共 3 页
字号:
#pragma once
#include "LinkDataBase.h"
#include "DataGridNoActiveCellColumn.h"
#include "SelectSubject.h"
#include "TrialBalance.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> 
	/// WarrentInput 摘要
	///
	/// 警告: 如果您更改该类的名称,则将需要更改 
	///          与该类所依赖的所有 .resx 文件关联的托管资源编译器工具的 
	///          “资源文件名”属性。  否则,
	///          设计器将不能与此窗体关联的
	///          本地化资源正确交互。
	/// </summary>
	public __gc class WarrentInput : public System::Windows::Forms::Form
	{
	//--------------------成员声明------------------------
	private:
		LinkDataBase* MyDataBase;	//数据库连接类
		DataSet* ds;				
		String* strSQL;
		CurrencyManager* cmWarrent;
		SqlDataAdapter* WarrentAdapter;
		SqlDataAdapter* DetailAdapter;
		String* SubjectID;
		String* SubjectName;
	private: System::Windows::Forms::ImageList *  imageList1;
			 bool IsModifyDetail;
	//-------------------成员声明结束-----------------------
	public: 
		WarrentInput(void)
		{
			InitializeComponent();
			this->MyDataBase = new LinkDataBase();
			this->WarrentAdapter = new SqlDataAdapter();
			this->DetailAdapter = new SqlDataAdapter();
			this->DetailSelectSqlCmd->Connection = this->MyDataBase->myConnection;
			this->DetailAdapter->SelectCommand = this->DetailSelectSqlCmd;
			this->DetailInsertSqlCmd->Connection = this->MyDataBase->myConnection;
			this->DetailAdapter->InsertCommand = this->DetailInsertSqlCmd;
			this->DetailUpdateSqlCmd->Connection = this->MyDataBase->myConnection;
			this->DetailAdapter->UpdateCommand = this->DetailUpdateSqlCmd;
			this->DetailDeleteSqlCmd->Connection = this->MyDataBase->myConnection;
			this->DetailAdapter->DeleteCommand = this->DetailDeleteSqlCmd;
			this->ds = new DataSet();
			this->strSQL = S"SELECT * FROM 凭证表 ORDER BY 凭证编号";
			this->MyDataBase->SelectDataBase(this->WarrentAdapter,this->ds,this->strSQL,S"凭证表");			
		}
        
	protected: 
		void Dispose(Boolean disposing)
		{
			if (disposing && components)
			{
				components->Dispose();
			}
			__super::Dispose(disposing);
		}
	private: System::Windows::Forms::ToolBarButton *  tBtnModify;
	private: System::Windows::Forms::ToolBarButton *  tBtnAddRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnPreviousRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnLastRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnNextRecord;
	private: System::Windows::Forms::GroupBox *  groupBox1;
	private: System::Windows::Forms::Label *  label5;
	private: System::Windows::Forms::Label *  label3;
	private: System::Windows::Forms::Label *  label2;
	private: System::Windows::Forms::Label *  label1;
	private: System::Windows::Forms::GroupBox *  groupBox2;
	private: System::Windows::Forms::Button *  btnSearch;
	private: System::Windows::Forms::Label *  label9;
	private: System::Windows::Forms::Label *  label10;
	private: System::Windows::Forms::ToolBarButton *  tBtnFirstRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnQuit;
	private: System::Windows::Forms::ToolBarButton *  tBtnDeleteRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnModifyRecord;
	private: System::Windows::Forms::ToolBarButton *  tBtnCancelModify;
	private: System::Windows::Forms::ToolBar *  toolBar1;
	private: System::Windows::Forms::Label *  label4;
	private: System::Windows::Forms::Label *  label6;
	private: System::Windows::Forms::Label *  label7;
	private: System::Windows::Forms::Label *  label8;
	private: System::Windows::Forms::TextBox *  tBoxWarrentCodeShow;
	private: System::Windows::Forms::TextBox *  tBoxAccountDate;
	private: System::Windows::Forms::TextBox *  tBoxWarrentCode;
	private: System::Windows::Forms::ComboBox *  cmbWarrentNumber;
	private: System::Windows::Forms::TextBox *  tBoxOperator;
	private: System::Windows::Forms::TextBox *  tBoxDate;
	private: System::Windows::Forms::TextBox *  tBoxAccountDateShow;
	private: System::Windows::Forms::TextBox *  tBoxLoanTotal;
	private: System::Windows::Forms::TextBox *  tBoxDebitTotal;
	private: System::Windows::Forms::TextBox *  tBoxExportCredit;
	private: System::Windows::Forms::DataGrid *  dgrdWarrentTable;
	private: System::Windows::Forms::DataGrid *  dgrdDetail;
	private: System::Data::SqlClient::SqlCommand *  DetailSelectSqlCmd;
	private: System::Data::SqlClient::SqlCommand *  DetailInsertSqlCmd;
	private: System::Data::SqlClient::SqlCommand *  DetailUpdateSqlCmd;
	private: System::Data::SqlClient::SqlCommand *  DetailDeleteSqlCmd;
	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::WarrentInput));
			this->tBtnModify = new System::Windows::Forms::ToolBarButton();
			this->tBtnAddRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnPreviousRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnLastRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnNextRecord = new System::Windows::Forms::ToolBarButton();
			this->groupBox1 = new System::Windows::Forms::GroupBox();
			this->tBoxExportCredit = new System::Windows::Forms::TextBox();
			this->label4 = new System::Windows::Forms::Label();
			this->label6 = new System::Windows::Forms::Label();
			this->label7 = new System::Windows::Forms::Label();
			this->label8 = new System::Windows::Forms::Label();
			this->tBoxLoanTotal = new System::Windows::Forms::TextBox();
			this->tBoxDebitTotal = new System::Windows::Forms::TextBox();
			this->tBoxAccountDateShow = new System::Windows::Forms::TextBox();
			this->label5 = new System::Windows::Forms::Label();
			this->label3 = new System::Windows::Forms::Label();
			this->label2 = new System::Windows::Forms::Label();
			this->label1 = new System::Windows::Forms::Label();
			this->cmbWarrentNumber = new System::Windows::Forms::ComboBox();
			this->tBoxOperator = new System::Windows::Forms::TextBox();
			this->tBoxDate = new System::Windows::Forms::TextBox();
			this->tBoxWarrentCodeShow = new System::Windows::Forms::TextBox();
			this->groupBox2 = new System::Windows::Forms::GroupBox();
			this->btnSearch = new System::Windows::Forms::Button();
			this->imageList1 = new System::Windows::Forms::ImageList(this->components);
			this->label9 = new System::Windows::Forms::Label();
			this->label10 = new System::Windows::Forms::Label();
			this->tBoxAccountDate = new System::Windows::Forms::TextBox();
			this->tBoxWarrentCode = new System::Windows::Forms::TextBox();
			this->tBtnFirstRecord = new System::Windows::Forms::ToolBarButton();
			this->dgrdWarrentTable = new System::Windows::Forms::DataGrid();
			this->tBtnQuit = new System::Windows::Forms::ToolBarButton();
			this->tBtnDeleteRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnModifyRecord = new System::Windows::Forms::ToolBarButton();
			this->tBtnCancelModify = new System::Windows::Forms::ToolBarButton();
			this->toolBar1 = new System::Windows::Forms::ToolBar();
			this->dgrdDetail = new System::Windows::Forms::DataGrid();
			this->DetailSelectSqlCmd = new System::Data::SqlClient::SqlCommand();
			this->DetailInsertSqlCmd = new System::Data::SqlClient::SqlCommand();
			this->DetailUpdateSqlCmd = new System::Data::SqlClient::SqlCommand();
			this->DetailDeleteSqlCmd = new System::Data::SqlClient::SqlCommand();
			this->groupBox1->SuspendLayout();
			this->groupBox2->SuspendLayout();
			(__try_cast<System::ComponentModel::ISupportInitialize *  >(this->dgrdWarrentTable))->BeginInit();
			(__try_cast<System::ComponentModel::ISupportInitialize *  >(this->dgrdDetail))->BeginInit();
			this->SuspendLayout();
			// 
			// tBtnModify
			// 
			this->tBtnModify->ImageIndex = 10;
			this->tBtnModify->Text = S"修改记录";
			this->tBtnModify->ToolTipText = S"修改记录";
			// 
			// tBtnAddRecord
			// 
			this->tBtnAddRecord->ImageIndex = 9;
			this->tBtnAddRecord->Text = S"新增记录";
			this->tBtnAddRecord->ToolTipText = S"新增记录";
			// 
			// tBtnPreviousRecord
			// 
			this->tBtnPreviousRecord->ImageIndex = 4;
			this->tBtnPreviousRecord->Text = S"上一记录";
			this->tBtnPreviousRecord->ToolTipText = S"上一记录";
			// 
			// tBtnLastRecord
			// 
			this->tBtnLastRecord->ImageIndex = 7;
			this->tBtnLastRecord->Text = S"尾记录";
			this->tBtnLastRecord->ToolTipText = S"尾记录";
			// 
			// tBtnNextRecord
			// 
			this->tBtnNextRecord->ImageIndex = 8;
			this->tBtnNextRecord->Text = S"下一记录";
			this->tBtnNextRecord->ToolTipText = S"下一记录";
			// 
			// groupBox1
			// 
			this->groupBox1->Controls->Add(this->tBoxExportCredit);
			this->groupBox1->Controls->Add(this->label4);
			this->groupBox1->Controls->Add(this->label6);
			this->groupBox1->Controls->Add(this->label7);
			this->groupBox1->Controls->Add(this->label8);
			this->groupBox1->Controls->Add(this->tBoxLoanTotal);
			this->groupBox1->Controls->Add(this->tBoxDebitTotal);
			this->groupBox1->Controls->Add(this->tBoxAccountDateShow);
			this->groupBox1->Controls->Add(this->label5);
			this->groupBox1->Controls->Add(this->label3);
			this->groupBox1->Controls->Add(this->label2);
			this->groupBox1->Controls->Add(this->label1);
			this->groupBox1->Controls->Add(this->cmbWarrentNumber);
			this->groupBox1->Controls->Add(this->tBoxOperator);
			this->groupBox1->Controls->Add(this->tBoxDate);
			this->groupBox1->Controls->Add(this->tBoxWarrentCodeShow);
			this->groupBox1->Dock = System::Windows::Forms::DockStyle::Top;
			this->groupBox1->Location = System::Drawing::Point(304, 137);
			this->groupBox1->Name = S"groupBox1";
			this->groupBox1->Size = System::Drawing::Size(512, 111);
			this->groupBox1->TabIndex = 8;
			this->groupBox1->TabStop = false;
			this->groupBox1->Text = S"凭证详细信息";
			// 
			// tBoxExportCredit
			// 
			this->tBoxExportCredit->Location = System::Drawing::Point(128, 80);
			this->tBoxExportCredit->Name = S"tBoxExportCredit";
			this->tBoxExportCredit->Size = System::Drawing::Size(104, 21);
			this->tBoxExportCredit->TabIndex = 34;
			this->tBoxExportCredit->Text = S"";
			// 
			// label4
			// 
			this->label4->Location = System::Drawing::Point(128, 64);
			this->label4->Name = S"label4";
			this->label4->Size = System::Drawing::Size(56, 16);
			this->label4->TabIndex = 33;
			this->label4->Text = S"过帐状态";
			// 
			// label6
			// 
			this->label6->Location = System::Drawing::Point(352, 64);
			this->label6->Name = S"label6";
			this->label6->Size = System::Drawing::Size(56, 16);
			this->label6->TabIndex = 32;
			this->label6->Text = S"贷方合计";
			// 
			// label7
			// 
			this->label7->Location = System::Drawing::Point(240, 64);
			this->label7->Name = S"label7";
			this->label7->Size = System::Drawing::Size(56, 16);
			this->label7->TabIndex = 31;
			this->label7->Text = S"借方合计";
			// 
			// label8
			// 
			this->label8->Location = System::Drawing::Point(16, 64);
			this->label8->Name = S"label8";
			this->label8->Size = System::Drawing::Size(56, 16);
			this->label8->TabIndex = 30;
			this->label8->Text = S"会计期间";
			// 
			// tBoxLoanTotal
			// 
			this->tBoxLoanTotal->Location = System::Drawing::Point(352, 80);
			this->tBoxLoanTotal->Name = S"tBoxLoanTotal";
			this->tBoxLoanTotal->Size = System::Drawing::Size(104, 21);
			this->tBoxLoanTotal->TabIndex = 28;
			this->tBoxLoanTotal->Text = S"";
			// 
			// tBoxDebitTotal
			// 
			this->tBoxDebitTotal->Location = System::Drawing::Point(240, 80);
			this->tBoxDebitTotal->Name = S"tBoxDebitTotal";
			this->tBoxDebitTotal->Size = System::Drawing::Size(104, 21);
			this->tBoxDebitTotal->TabIndex = 27;
			this->tBoxDebitTotal->Text = S"";
			// 
			// tBoxAccountDateShow
			// 
			this->tBoxAccountDateShow->Location = System::Drawing::Point(16, 80);
			this->tBoxAccountDateShow->Name = S"tBoxAccountDateShow";
			this->tBoxAccountDateShow->Size = System::Drawing::Size(104, 21);
			this->tBoxAccountDateShow->TabIndex = 26;
			this->tBoxAccountDateShow->Text = S"";
			// 
			// label5
			// 
			this->label5->Location = System::Drawing::Point(128, 24);
			this->label5->Name = S"label5";
			this->label5->Size = System::Drawing::Size(56, 16);
			this->label5->TabIndex = 25;
			this->label5->Text = S"凭证字号";
			// 
			// label3

⌨️ 快捷键说明

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