📄 dutyroser1.h
字号:
this->button2->ImageAlign = (*__try_cast<__box System::Drawing::ContentAlignment * >(resources->GetObject(S"button2.ImageAlign")));
this->button2->ImageIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"button2.ImageIndex")));
this->button2->ImeMode = (*__try_cast<__box System::Windows::Forms::ImeMode * >(resources->GetObject(S"button2.ImeMode")));
this->button2->Location = (*__try_cast<__box System::Drawing::Point * >(resources->GetObject(S"button2.Location")));
this->button2->Name = S"button2";
this->button2->RightToLeft = (*__try_cast<__box System::Windows::Forms::RightToLeft * >(resources->GetObject(S"button2.RightToLeft")));
this->button2->Size = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"button2.Size")));
this->button2->TabIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"button2.TabIndex")));
this->button2->Text = resources->GetString(S"button2.Text");
this->button2->TextAlign = (*__try_cast<__box System::Drawing::ContentAlignment * >(resources->GetObject(S"button2.TextAlign")));
this->button2->Visible = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"button2.Visible")));
this->button2->Click += new System::EventHandler(this, button2_Click);
//
// button3
//
this->button3->AccessibleDescription = resources->GetString(S"button3.AccessibleDescription");
this->button3->AccessibleName = resources->GetString(S"button3.AccessibleName");
this->button3->Anchor = (*__try_cast<__box System::Windows::Forms::AnchorStyles * >(resources->GetObject(S"button3.Anchor")));
this->button3->BackgroundImage = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"button3.BackgroundImage")));
this->button3->Dock = (*__try_cast<__box System::Windows::Forms::DockStyle * >(resources->GetObject(S"button3.Dock")));
this->button3->Enabled = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"button3.Enabled")));
this->button3->FlatStyle = (*__try_cast<__box System::Windows::Forms::FlatStyle * >(resources->GetObject(S"button3.FlatStyle")));
this->button3->Font = (__try_cast<System::Drawing::Font * >(resources->GetObject(S"button3.Font")));
this->button3->Image = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"button3.Image")));
this->button3->ImageAlign = (*__try_cast<__box System::Drawing::ContentAlignment * >(resources->GetObject(S"button3.ImageAlign")));
this->button3->ImageIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"button3.ImageIndex")));
this->button3->ImeMode = (*__try_cast<__box System::Windows::Forms::ImeMode * >(resources->GetObject(S"button3.ImeMode")));
this->button3->Location = (*__try_cast<__box System::Drawing::Point * >(resources->GetObject(S"button3.Location")));
this->button3->Name = S"button3";
this->button3->RightToLeft = (*__try_cast<__box System::Windows::Forms::RightToLeft * >(resources->GetObject(S"button3.RightToLeft")));
this->button3->Size = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"button3.Size")));
this->button3->TabIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"button3.TabIndex")));
this->button3->Text = resources->GetString(S"button3.Text");
this->button3->TextAlign = (*__try_cast<__box System::Drawing::ContentAlignment * >(resources->GetObject(S"button3.TextAlign")));
this->button3->Visible = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"button3.Visible")));
this->button3->Click += new System::EventHandler(this, button3_Click);
//
// dbGridDtl
//
this->dbGridDtl->AccessibleDescription = resources->GetString(S"dbGridDtl.AccessibleDescription");
this->dbGridDtl->AccessibleName = resources->GetString(S"dbGridDtl.AccessibleName");
this->dbGridDtl->Anchor = (*__try_cast<__box System::Windows::Forms::AnchorStyles * >(resources->GetObject(S"dbGridDtl.Anchor")));
this->dbGridDtl->BackgroundImage = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"dbGridDtl.BackgroundImage")));
this->dbGridDtl->CaptionFont = (__try_cast<System::Drawing::Font * >(resources->GetObject(S"dbGridDtl.CaptionFont")));
this->dbGridDtl->CaptionText = resources->GetString(S"dbGridDtl.CaptionText");
this->dbGridDtl->CaptionVisible = false;
this->dbGridDtl->DataMember = S"";
this->dbGridDtl->Dock = (*__try_cast<__box System::Windows::Forms::DockStyle * >(resources->GetObject(S"dbGridDtl.Dock")));
this->dbGridDtl->Enabled = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"dbGridDtl.Enabled")));
this->dbGridDtl->Font = (__try_cast<System::Drawing::Font * >(resources->GetObject(S"dbGridDtl.Font")));
this->dbGridDtl->HeaderFont = new System::Drawing::Font(S"MS UI Gothic", 14);
this->dbGridDtl->HeaderForeColor = System::Drawing::SystemColors::ControlText;
this->dbGridDtl->ImeMode = (*__try_cast<__box System::Windows::Forms::ImeMode * >(resources->GetObject(S"dbGridDtl.ImeMode")));
this->dbGridDtl->Location = (*__try_cast<__box System::Drawing::Point * >(resources->GetObject(S"dbGridDtl.Location")));
this->dbGridDtl->Name = S"dbGridDtl";
this->dbGridDtl->ReadOnly = true;
this->dbGridDtl->RightToLeft = (*__try_cast<__box System::Windows::Forms::RightToLeft * >(resources->GetObject(S"dbGridDtl.RightToLeft")));
this->dbGridDtl->Size = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"dbGridDtl.Size")));
this->dbGridDtl->TabIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"dbGridDtl.TabIndex")));
this->dbGridDtl->Visible = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"dbGridDtl.Visible")));
this->dbGridDtl->MouseUp += new System::Windows::Forms::MouseEventHandler(this, dbGridDtl_MouseUp);
//
// button4
//
this->button4->AccessibleDescription = resources->GetString(S"button4.AccessibleDescription");
this->button4->AccessibleName = resources->GetString(S"button4.AccessibleName");
this->button4->Anchor = (*__try_cast<__box System::Windows::Forms::AnchorStyles * >(resources->GetObject(S"button4.Anchor")));
this->button4->BackgroundImage = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"button4.BackgroundImage")));
this->button4->Dock = (*__try_cast<__box System::Windows::Forms::DockStyle * >(resources->GetObject(S"button4.Dock")));
this->button4->Enabled = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"button4.Enabled")));
this->button4->FlatStyle = (*__try_cast<__box System::Windows::Forms::FlatStyle * >(resources->GetObject(S"button4.FlatStyle")));
this->button4->Font = (__try_cast<System::Drawing::Font * >(resources->GetObject(S"button4.Font")));
this->button4->Image = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"button4.Image")));
this->button4->ImageAlign = (*__try_cast<__box System::Drawing::ContentAlignment * >(resources->GetObject(S"button4.ImageAlign")));
this->button4->ImageIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"button4.ImageIndex")));
this->button4->ImeMode = (*__try_cast<__box System::Windows::Forms::ImeMode * >(resources->GetObject(S"button4.ImeMode")));
this->button4->Location = (*__try_cast<__box System::Drawing::Point * >(resources->GetObject(S"button4.Location")));
this->button4->Name = S"button4";
this->button4->RightToLeft = (*__try_cast<__box System::Windows::Forms::RightToLeft * >(resources->GetObject(S"button4.RightToLeft")));
this->button4->Size = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"button4.Size")));
this->button4->TabIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"button4.TabIndex")));
this->button4->Text = resources->GetString(S"button4.Text");
this->button4->TextAlign = (*__try_cast<__box System::Drawing::ContentAlignment * >(resources->GetObject(S"button4.TextAlign")));
this->button4->Visible = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"button4.Visible")));
this->button4->Click += new System::EventHandler(this, button4_Click);
//
// DutyRoser1
//
this->AccessibleDescription = resources->GetString(S"$this.AccessibleDescription");
this->AccessibleName = resources->GetString(S"$this.AccessibleName");
this->AutoScaleBaseSize = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"$this.AutoScaleBaseSize")));
this->AutoScroll = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"$this.AutoScroll")));
this->AutoScrollMargin = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"$this.AutoScrollMargin")));
this->AutoScrollMinSize = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"$this.AutoScrollMinSize")));
this->BackgroundImage = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"$this.BackgroundImage")));
this->ClientSize = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"$this.ClientSize")));
this->Controls->Add(this->button1);
this->Controls->Add(this->label1);
this->Controls->Add(this->dtpDate);
this->Controls->Add(this->DBGridSim);
this->Controls->Add(this->label2);
this->Controls->Add(this->button2);
this->Controls->Add(this->button3);
this->Controls->Add(this->dbGridDtl);
this->Controls->Add(this->button4);
this->Enabled = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"$this.Enabled")));
this->Font = (__try_cast<System::Drawing::Font * >(resources->GetObject(S"$this.Font")));
this->Icon = (__try_cast<System::Drawing::Icon * >(resources->GetObject(S"$this.Icon")));
this->ImeMode = (*__try_cast<__box System::Windows::Forms::ImeMode * >(resources->GetObject(S"$this.ImeMode")));
this->Location = (*__try_cast<__box System::Drawing::Point * >(resources->GetObject(S"$this.Location")));
this->MaximumSize = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"$this.MaximumSize")));
this->MinimumSize = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"$this.MinimumSize")));
this->Name = S"DutyRoser1";
this->RightToLeft = (*__try_cast<__box System::Windows::Forms::RightToLeft * >(resources->GetObject(S"$this.RightToLeft")));
this->StartPosition = (*__try_cast<__box System::Windows::Forms::FormStartPosition * >(resources->GetObject(S"$this.StartPosition")));
this->Text = resources->GetString(S"$this.Text");
this->Load += new System::EventHandler(this, DutyRoser1_Load);
(__try_cast<System::ComponentModel::ISupportInitialize * >(this->DBGridSim))->EndInit();
(__try_cast<System::ComponentModel::ISupportInitialize * >(this->dbGridDtl))->EndInit();
this->ResumeLayout(false);
}
private: System::Void DutyRoser1_Load(System::Object * sender, System::EventArgs * e)
{
this->InitSimpleGird(infDutyRoster->intLang);
this->InitDetailGird(infDutyRoster->intLang);
button1_Click(sender, e) ; //when loading form,automatically press the search button//note added by DongZhaoLiang
}
private: System::Void button1_Click(System::Object * sender, System::EventArgs * e) //display master datagrid
{
dbDutyRoster->blnCnnOpen(); //dbDutyRoste is the DBBase object//note added by DongZhaoLiang
dteGloab = dtpDate->Value; //let DateTime variable dteGloab to get the form's DateTimePicker object dtpDate//note added by DongZhaoLiang
setSimple(dteGloab,infDutyRoster->intLang); //the first parameter is from the form's DateTimePicker's selection//infDutyRoster->intLang indicates language version
dbDutyRoster->blnCnnClose();
dbGridDtl->DataSource = NULL; //when you refresh the master ,you should empty the detail datagrid also
}
//private: System::Void DBGridSim_Click(System::Object * sender, System::EventArgs * e)
// {
// button4_Click(sender,e);
// /*this->DBGridSim->Select(DBGridSim->CurrentRowIndex);*/
// }
private: System::Void button4_Click(System::Object * sender, System::EventArgs * e)
{
DataGridCell dCellTmp ;
String *strProSim; //store process number
String *strTeamSim; //store team number
dCellTmp.RowNumber = DBGridSim->CurrentRowIndex;
dCellTmp.ColumnNumber = 0; //focus on the first column
try{
strTeamSim = Convert::ToString(DBGridSim->Item[dCellTmp]);
}
catch (...) {
// dbDutyRoster->blnCnnOpen();
// setDetail(dteGloab,S"1", S"1" );
// dbDutyRoster->blnCnnClose();
dbGridDtl->DataSource = NULL;
return;
}
dCellTmp.ColumnNumber = 2; //focus on the third colmn
strProSim = Convert::ToString(DBGridSim->Item[dCellTmp]);
dbDutyRoster->blnCnnOpen();
setDetail(dteGloab,strProSim, strTeamSim );
dbDutyRoster->blnCnnClose();
}
private: System::Void button3_Click(System::Object * sender, System::EventArgs * e)
{
this->Close();
}
private: System::Void button2_Click(System::Object * sender, System::EventArgs * e)
{
frmDutyDetail = new DutyDetail(infDutyRoster);
frmDutyDetail->ShowDialog(this);
button1_Click(sender, e) ; //press search button
}
private: System::Void DBGridSim_CurrentCellChanged(System::Object * sender, System::EventArgs * e)
{
dbGridDtl->DataSource = NULL;
button4_Click(sender,e);
}
private: System::Void DBGridSim_MouseUp(System::Object * sender, System::Windows::Forms::MouseEventArgs * e)
{
try{
this->DBGridSim->Select(DBGridSim->CurrentRowIndex);
}
catch (...) {
}
}
private: System::Void dbGridDtl_MouseUp(System::Object * sender, System::Windows::Forms::MouseEventArgs * e)
{
try{
this->dbGridDtl->Select(dbGridDtl->CurrentRowIndex);
}
catch (...) {
}
}
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -