📄 selltable.h
字号:
//
// 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;
//
// dgrdSellTable
//
this->dgrdSellTable->CaptionVisible = false;
this->dgrdSellTable->DataMember = S"";
this->dgrdSellTable->Dock = System::Windows::Forms::DockStyle::Fill;
this->dgrdSellTable->HeaderForeColor = System::Drawing::SystemColors::ControlText;
this->dgrdSellTable->Location = System::Drawing::Point(0, 200);
this->dgrdSellTable->Name = S"dgrdSellTable";
this->dgrdSellTable->Size = System::Drawing::Size(744, 149);
this->dgrdSellTable->TabIndex = 17;
this->dgrdSellTable->MouseDown += new System::Windows::Forms::MouseEventHandler(this, dgrdSellTable_MouseDown);
this->dgrdSellTable->Click += new System::EventHandler(this, dgrdSellTable_Click);
this->dgrdSellTable->MouseMove += new System::Windows::Forms::MouseEventHandler(this, dgrdSellTable_MouseMove);
//
// groupBox1
//
this->groupBox1->Controls->Add(this->label6);
this->groupBox1->Controls->Add(this->tBoxStorage);
this->groupBox1->Controls->Add(this->label5);
this->groupBox1->Controls->Add(this->tBoxWareID);
this->groupBox1->Controls->Add(this->tBoxClientID);
this->groupBox1->Controls->Add(this->button1);
this->groupBox1->Controls->Add(this->label3);
this->groupBox1->Controls->Add(this->cmbOperator);
this->groupBox1->Controls->Add(this->label2);
this->groupBox1->Controls->Add(this->tBoxMaker);
this->groupBox1->Controls->Add(this->label1);
this->groupBox1->Controls->Add(this->tBoxSellDate);
this->groupBox1->Controls->Add(this->tBoxClientName);
this->groupBox1->Dock = System::Windows::Forms::DockStyle::Top;
this->groupBox1->Location = System::Drawing::Point(0, 41);
this->groupBox1->Name = S"groupBox1";
this->groupBox1->Size = System::Drawing::Size(744, 159);
this->groupBox1->TabIndex = 40;
this->groupBox1->TabStop = false;
//
// label6
//
this->label6->Location = System::Drawing::Point(270, 110);
this->label6->Name = S"label6";
this->label6->Size = System::Drawing::Size(57, 16);
this->label6->TabIndex = 47;
this->label6->Text = S"当前库存";
//
// tBoxStorage
//
this->tBoxStorage->Location = System::Drawing::Point(342, 109);
this->tBoxStorage->Name = S"tBoxStorage";
this->tBoxStorage->ReadOnly = true;
this->tBoxStorage->Size = System::Drawing::Size(144, 21);
this->tBoxStorage->TabIndex = 48;
this->tBoxStorage->Text = S"";
//
// label5
//
this->label5->Location = System::Drawing::Point(26, 114);
this->label5->Name = S"label5";
this->label5->Size = System::Drawing::Size(57, 16);
this->label5->TabIndex = 45;
this->label5->Text = S"货号";
//
// tBoxWareID
//
this->tBoxWareID->Location = System::Drawing::Point(102, 109);
this->tBoxWareID->Name = S"tBoxWareID";
this->tBoxWareID->ReadOnly = true;
this->tBoxWareID->Size = System::Drawing::Size(144, 21);
this->tBoxWareID->TabIndex = 46;
this->tBoxWareID->Text = S"";
//
// tBoxClientID
//
this->tBoxClientID->Location = System::Drawing::Point(102, 77);
this->tBoxClientID->Name = S"tBoxClientID";
this->tBoxClientID->ReadOnly = true;
this->tBoxClientID->Size = System::Drawing::Size(144, 21);
this->tBoxClientID->TabIndex = 44;
this->tBoxClientID->Text = S"";
//
// button1
//
this->button1->Location = System::Drawing::Point(22, 76);
this->button1->Name = S"button1";
this->button1->Size = System::Drawing::Size(64, 24);
this->button1->TabIndex = 43;
this->button1->Text = S"选择客户";
this->button1->Click += new System::EventHandler(this, button1_Click);
//
// label3
//
this->label3->Location = System::Drawing::Point(478, 39);
this->label3->Name = S"label3";
this->label3->Size = System::Drawing::Size(57, 16);
this->label3->TabIndex = 41;
this->label3->Text = S"业务员";
//
// cmbOperator
//
this->cmbOperator->Location = System::Drawing::Point(546, 37);
this->cmbOperator->Name = S"cmbOperator";
this->cmbOperator->Size = System::Drawing::Size(176, 20);
this->cmbOperator->TabIndex = 40;
//
// label2
//
this->label2->Location = System::Drawing::Point(270, 42);
this->label2->Name = S"label2";
this->label2->Size = System::Drawing::Size(57, 16);
this->label2->TabIndex = 38;
this->label2->Text = S"制单人";
//
// tBoxMaker
//
this->tBoxMaker->Location = System::Drawing::Point(334, 37);
this->tBoxMaker->Name = S"tBoxMaker";
this->tBoxMaker->Size = System::Drawing::Size(80, 21);
this->tBoxMaker->TabIndex = 39;
this->tBoxMaker->Text = S"";
//
// label1
//
this->label1->Location = System::Drawing::Point(22, 44);
this->label1->Name = S"label1";
this->label1->Size = System::Drawing::Size(57, 16);
this->label1->TabIndex = 36;
this->label1->Text = S"销售日期";
//
// tBoxSellDate
//
this->tBoxSellDate->Location = System::Drawing::Point(102, 38);
this->tBoxSellDate->Name = S"tBoxSellDate";
this->tBoxSellDate->Size = System::Drawing::Size(144, 21);
this->tBoxSellDate->TabIndex = 37;
this->tBoxSellDate->Text = S"";
//
// tBoxClientName
//
this->tBoxClientName->Location = System::Drawing::Point(270, 77);
this->tBoxClientName->Name = S"tBoxClientName";
this->tBoxClientName->ReadOnly = true;
this->tBoxClientName->Size = System::Drawing::Size(448, 21);
this->tBoxClientName->TabIndex = 42;
this->tBoxClientName->Text = S"";
//
// groupBox2
//
this->groupBox2->Controls->Add(this->label8);
this->groupBox2->Controls->Add(this->tBoxTax);
this->groupBox2->Controls->Add(this->label7);
this->groupBox2->Controls->Add(this->tBoxTotalNoTax);
this->groupBox2->Controls->Add(this->label4);
this->groupBox2->Controls->Add(this->tBoxTotal);
this->groupBox2->Dock = System::Windows::Forms::DockStyle::Bottom;
this->groupBox2->Location = System::Drawing::Point(0, 349);
this->groupBox2->Name = S"groupBox2";
this->groupBox2->Size = System::Drawing::Size(744, 96);
this->groupBox2->TabIndex = 41;
this->groupBox2->TabStop = false;
//
// label8
//
this->label8->Location = System::Drawing::Point(510, 41);
this->label8->Name = S"label8";
this->label8->Size = System::Drawing::Size(57, 16);
this->label8->TabIndex = 44;
this->label8->Text = S"税额";
//
// tBoxTax
//
this->tBoxTax->Location = System::Drawing::Point(580, 36);
this->tBoxTax->Name = S"tBoxTax";
this->tBoxTax->Size = System::Drawing::Size(144, 21);
this->tBoxTax->TabIndex = 45;
this->tBoxTax->Text = S"";
//
// label7
//
this->label7->Location = System::Drawing::Point(260, 40);
this->label7->Name = S"label7";
this->label7->Size = System::Drawing::Size(72, 16);
this->label7->TabIndex = 42;
this->label7->Text = S"不含税金额";
//
// tBoxTotalNoTax
//
this->tBoxTotalNoTax->Location = System::Drawing::Point(348, 37);
this->tBoxTotalNoTax->Name = S"tBoxTotalNoTax";
this->tBoxTotalNoTax->Size = System::Drawing::Size(144, 21);
this->tBoxTotalNoTax->TabIndex = 43;
this->tBoxTotalNoTax->Text = S"";
//
// label4
//
this->label4->Location = System::Drawing::Point(20, 40);
this->label4->Name = S"label4";
this->label4->Size = System::Drawing::Size(57, 16);
this->label4->TabIndex = 40;
this->label4->Text = S"合计金额";
//
// tBoxTotal
//
this->tBoxTotal->Location = System::Drawing::Point(100, 40);
this->tBoxTotal->Name = S"tBoxTotal";
this->tBoxTotal->Size = System::Drawing::Size(144, 21);
this->tBoxTotal->TabIndex = 41;
this->tBoxTotal->Text = S"";
//
// SellTable
//
this->AutoScaleBaseSize = System::Drawing::Size(6, 14);
this->ClientSize = System::Drawing::Size(744, 445);
this->Controls->Add(this->dgrdSellTable);
this->Controls->Add(this->groupBox2);
this->Controls->Add(this->groupBox1);
this->Controls->Add(this->toolBar1);
this->Name = S"SellTable";
this->Text = S"SellTable";
(__try_cast<System::ComponentModel::ISupportInitialize * >(this->dgrdSellTable))->EndInit();
this->groupBox1->ResumeLayout(false);
this->groupBox2->ResumeLayout(false);
this->ResumeLayout(false);
}
//--------------------成员方法------------------------
private:
//-------------------设置客户编号和客户名称--------------------------
void SetClient()
{
ClientDataManage* tempFrm = new ClientDataManage(false);
tempFrm->SetDataGridReadOnly(true);
if(tempFrm->ShowDialog(this) == DialogResult::OK)
{
this->InputClientID = tempFrm->SendClientID;
this->InputClientName = tempFrm->SendClientName;
this->tBoxClientID->Text = String::Format(S"客户编号:{0}",this->InputClientID);
this->tBoxClientName->Text = String::Format(S"客户名称:{0}",this->InputClientName);
}
}
//-------------------向业务员下拉列表框中添加选项---------------------
void SetcmbOperator()
{
DateTime tempDate = System::DateTime::Today;
this->tBoxSellDate->Text = tempDate.ToShortDateString();
String* tempSQL = "select distinct 姓名 from 用户清单";
DataSet* tempDataSet = this->MyDataBase->SelectDataBase(tempSQL);
DataTable* tempDataTable = tempDataSet->Tables->Item[0];
this->cmbOperator->DataSource = tempDataTable;
this->cmbOperator->DisplayMember = S"姓名";
this->cmbOperator->ValueMember = S"姓名";
this->cmbOperator->SelectedIndex = 0;
}
//------------------绑定数据并设置明细表格各列的属性------------------
void DataGridStateControl(int isModifiable)
{
DataGridTableStyle* ts = new DataGridTableStyle();
//必须填写,否则样式表不起作用
ts->MappingName = this->ds->Tables->Item[0]->TableName;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -