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

📄 jiemian.h

📁 采用VC++.net做的超市收银管理系统
💻 H
📖 第 1 页 / 共 3 页
字号:
			this->panel1->Controls->Add(this->label3);
			this->panel1->Controls->Add(this->label2);
			this->panel1->Controls->Add(this->label1);
			this->panel1->Location = System::Drawing::Point(440, 72);
			this->panel1->Name = S"panel1";
			this->panel1->Size = System::Drawing::Size(264, 256);
			this->panel1->TabIndex = 2;
			// 
			// label6
			// 
			this->label6->BackColor = System::Drawing::Color::AliceBlue;
			this->label6->Font = new System::Drawing::Font(S"宋体", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)134);
			this->label6->Location = System::Drawing::Point(112, 144);
			this->label6->Name = S"label6";
			this->label6->Size = System::Drawing::Size(96, 24);
			this->label6->TabIndex = 7;
			this->label6->TextAlign = System::Drawing::ContentAlignment::MiddleCenter;
			// 
			// label5
			// 
			this->label5->BackColor = System::Drawing::Color::AliceBlue;
			this->label5->Font = new System::Drawing::Font(S"宋体", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)134);
			this->label5->Location = System::Drawing::Point(112, 88);
			this->label5->Name = S"label5";
			this->label5->Size = System::Drawing::Size(96, 24);
			this->label5->TabIndex = 6;
			this->label5->TextAlign = System::Drawing::ContentAlignment::MiddleCenter;
			// 
			// label4
			// 
			this->label4->BackColor = System::Drawing::Color::Moccasin;
			this->label4->Font = new System::Drawing::Font(S"宋体", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)134);
			this->label4->Location = System::Drawing::Point(40, 152);
			this->label4->Name = S"label4";
			this->label4->Size = System::Drawing::Size(72, 23);
			this->label4->TabIndex = 4;
			this->label4->Text = S"登入日期";
			// 
			// label3
			// 
			this->label3->BackColor = System::Drawing::Color::Moccasin;
			this->label3->Font = new System::Drawing::Font(S"宋体", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)134);
			this->label3->Location = System::Drawing::Point(40, 96);
			this->label3->Name = S"label3";
			this->label3->Size = System::Drawing::Size(80, 23);
			this->label3->TabIndex = 2;
			this->label3->Text = S"登入时间";
			// 
			// label2
			// 
			this->label2->BackColor = System::Drawing::Color::Moccasin;
			this->label2->Font = new System::Drawing::Font(S"宋体", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)134);
			this->label2->Location = System::Drawing::Point(128, 32);
			this->label2->Name = S"label2";
			this->label2->TabIndex = 1;
			// 
			// label1
			// 
			this->label1->BackColor = System::Drawing::Color::Moccasin;
			this->label1->Font = new System::Drawing::Font(S"宋体", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)134);
			this->label1->Location = System::Drawing::Point(48, 32);
			this->label1->Name = S"label1";
			this->label1->Size = System::Drawing::Size(72, 23);
			this->label1->TabIndex = 0;
			// 
			// oleDbDataAdapter1
			// 
			this->oleDbDataAdapter1->DeleteCommand = this->oleDbDeleteCommand1;
			this->oleDbDataAdapter1->InsertCommand = this->oleDbInsertCommand1;
			this->oleDbDataAdapter1->SelectCommand = this->oleDbSelectCommand1;
			System::Data::Common::DataTableMapping* __mcTemp__9[] = new System::Data::Common::DataTableMapping*[1];
			System::Data::Common::DataColumnMapping* __mcTemp__10[] = new System::Data::Common::DataColumnMapping*[7];
			__mcTemp__10[0] = new System::Data::Common::DataColumnMapping(S"NID", S"NID");
			__mcTemp__10[1] = new System::Data::Common::DataColumnMapping(S"NAME", S"NAME");
			__mcTemp__10[2] = new System::Data::Common::DataColumnMapping(S"STATUS", S"STATUS");
			__mcTemp__10[3] = new System::Data::Common::DataColumnMapping(S"SEX", S"SEX");
			__mcTemp__10[4] = new System::Data::Common::DataColumnMapping(S"COMPANY", S"COMPANY");
			__mcTemp__10[5] = new System::Data::Common::DataColumnMapping(S"UPWORK", S"UPWORK");
			__mcTemp__10[6] = new System::Data::Common::DataColumnMapping(S"DATACHA", S"DATACHA");
			__mcTemp__9[0] = new System::Data::Common::DataTableMapping(S"Table", S"登入表", __mcTemp__10);
			this->oleDbDataAdapter1->TableMappings->AddRange(__mcTemp__9);
			this->oleDbDataAdapter1->UpdateCommand = this->oleDbUpdateCommand1;
			// 
			// oleDbDeleteCommand1
			// 
			this->oleDbDeleteCommand1->CommandText = S"DELETE FROM 登入表 WHERE (NID = \?)";
			this->oleDbDeleteCommand1->Connection = this->oleDbConnection1;
			this->oleDbDeleteCommand1->Parameters->Add(new System::Data::OleDb::OleDbParameter(S"Original_NID", System::Data::OleDb::OleDbType::VarChar, 10, System::Data::ParameterDirection::Input, false, (System::Byte)0, (System::Byte)0, S"NID", System::Data::DataRowVersion::Original, 0));
			// 
			// jiemian
			// 
			this->AutoScaleBaseSize = System::Drawing::Size(6, 14);
			this->BackColor = System::Drawing::Color::DarkKhaki;
			this->ClientSize = System::Drawing::Size(856, 521);
			this->ControlBox = false;
			this->Controls->Add(this->groupBox1);
			this->Controls->Add(this->dataGrid1);
			this->Menu = this->mainMenu1;
			this->Name = S"jiemian";
			this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
			this->Text = S"主界面";
			this->Load += new System::EventHandler(this, jiemian_Load);
			(__try_cast<System::ComponentModel::ISupportInitialize *  >(this->dataGrid1))->EndInit();
			this->groupBox1->ResumeLayout(false);
			this->panel1->ResumeLayout(false);
			this->ResumeLayout(false);

		}		
	private: System::Void jiemian_Load(System::Object *  sender, System::EventArgs *  e)
			 {			 oleDbSelectCommand1->CommandText=String::Concat(S"select COMPANY,NAME from 登入表 ");
         oleDbConnection1->Open();
		 oleDbSelectCommand1->ExecuteNonQuery();
		 oleDbConnection1->Close();
		 DataTable *table1=new DataTable();
            oleDbDataAdapter1->Fill(table1);
			 this->dataGrid1->DataSource=table1;
			   int nindex=dataGrid1->CurrentRowIndex;
			   DataTable *table2=__try_cast<DataTable*>(dataGrid1->DataSource);
			   DataRow * row=table2->Rows->Item[nindex]; 
			   this->label1->Text=row->Item[0]->ToString(); 
			   this->label2->Text=row->Item[1]->ToString();
              DateTime dtime=System::DateTime::Now;
            this->label5->Text=dtime.ToLongTimeString(); 
            DateTime rtime=System::DateTime::Now;;
            this->label6->Text=dtime.ToShortDateString(); 
			 }

private: System::Void menuItem7_Click(System::Object *  sender, System::EventArgs *  e)
		 {wupinxiaofei *child=new  wupinxiaofei();
			child->ShowDialog();
		 }

private: System::Void menuItem6_Click(System::Object *  sender, System::EventArgs *  e)
		 {wupinchaxun *child=new  wupinchaxun();
			child->ShowDialog();
		 }

private: System::Void menuItem8_Click(System::Object *  sender, System::EventArgs *  e)
		 {qiehuotixing *child=new  qiehuotixing();
			child->ShowDialog();
		 }

private: System::Void menuItem9_Click(System::Object *  sender, System::EventArgs *  e)
		 {xiaoshoutongji *child=new  xiaoshoutongji();
			child->ShowDialog();
		 }

private: System::Void menuItem12_Click(System::Object *  sender, System::EventArgs *  e)
		 {xiugaimima *child=new  xiugaimima();
			child->ShowDialog();
		 }

private: System::Void menuItem13_Click(System::Object *  sender, System::EventArgs *  e)
		 {chuqinchaxun *child=new  chuqinchaxun();
			child->ShowDialog();
		 }

private: System::Void menuItem14_Click(System::Object *  sender, System::EventArgs *  e)
		 {yonghuziliaoxiugai *child=new  yonghuziliaoxiugai();
			child->ShowDialog();
		 }

private: System::Void menuItem27_Click(System::Object *  sender, System::EventArgs *  e)
		 {tianjiashanchuyonghu *child=new  tianjiashanchuyonghu();
			child->ShowDialog();
		 }

private: System::Void menuItem16_Click(System::Object *  sender, System::EventArgs *  e)
		 {jinhuoxinxi *child=new  jinhuoxinxi();
			child->ShowDialog();
		 }

private: System::Void menuItem17_Click(System::Object *  sender, System::EventArgs *  e)
		 { dinghuoxinxi *child=new  dinghuoxinxi();
			child->ShowDialog();
		 }

private: System::Void menuItem19_Click(System::Object *  sender, System::EventArgs *  e)
		 {kucunchaxun *child=new  kucunchaxun();
			child->ShowDialog();
		 }

private: System::Void menuItem2_Click(System::Object *  sender, System::EventArgs *  e)
		 {jinhuobaobiao *child=new jinhuobaobiao();
			child->ShowDialog();
		 }

private: System::Void menuItem21_Click(System::Object *  sender, System::EventArgs *  e)
		 { wupinkongzhi *child=new  wupinkongzhi();
			child->ShowDialog();
		 }

private: System::Void menuItem22_Click(System::Object *  sender, System::EventArgs *  e)
		 { xinzengshanchuwupin *child=new  xinzengshanchuwupin();
			child->ShowDialog();
		 }

private: System::Void menuItem4_Click(System::Object *  sender, System::EventArgs *  e)
		 {oleDbSelectCommand1->CommandText=String::Concat(S"select * from 登入表");
               oleDbConnection1->Open();
		       oleDbSelectCommand1->ExecuteNonQuery();
		       oleDbConnection1->Close();
		       DataTable *table1=new DataTable();
              oleDbDataAdapter1->Fill(table1);
			 this->dataGrid1->DataSource=table1;
			   int nindex=dataGrid1->CurrentRowIndex;
			   DataTable *table2=__try_cast<DataTable*>(dataGrid1->DataSource);
			   DataRow * row=table2->Rows->Item[nindex]; 
			   String *NID=row->Item[0]->ToString(); 
			   String *NAME=row->Item[1]->ToString(); 
			   String *STATUS=row->Item[2]->ToString(); 
			   String *SEX=row->Item[3]->ToString(); 
			   String *COMPANY=row->Item[4]->ToString(); 
			   String *UPWORK=row->Item[5]->ToString();
			   DateTime dtime=System::DateTime::Now;;
               String *DOWNWORK=dtime.ToShortTimeString();
			   String *DATACHA=row->Item[6]->ToString(); 


                oleDbInsertCommand2->CommandText=String::Concat(S"insert into 工资表 (",   S"NID,NAME,STATUS,SEX,COMPANY,UPWORK,DOWNWORK,DATACHA) values ('",  NID, S"','",NAME,S"','",STATUS,S"','",SEX,S"','",COMPANY,S"','",UPWORK,S"','",DOWNWORK,S"','",DATACHA,S"')"  );
               oleDbConnection1->Open();
		     oleDbInsertCommand2->ExecuteNonQuery();
		     oleDbConnection1->Close();
		     DataTable *table3=new DataTable();
             oleDbDataAdapter1->Fill(table3);




			 this->Close();
		 }

};
}

⌨️ 快捷键说明

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