📄 productplancheck.h
字号:
// ProductPlanCheck
//
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->dtpTo);
this->Controls->Add(this->label5);
this->Controls->Add(this->dtpFrom);
this->Controls->Add(this->label4);
this->Controls->Add(this->label1);
this->Controls->Add(this->comboSection);
this->Controls->Add(this->label2);
this->Controls->Add(this->buttonSearch);
this->Controls->Add(this->comboLine);
this->Controls->Add(this->buttonPrint);
this->Controls->Add(this->dataGridPlan);
this->Controls->Add(this->textLastUp);
this->Controls->Add(this->label3);
this->Controls->Add(this->lbl_Title);
this->Controls->Add(this->buttonClose);
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->MaximizeBox = false;
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"ProductPlanCheck";
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, ProductPlanCheck_Load);
(__try_cast<System::ComponentModel::ISupportInitialize * >(this->dataGridPlan))->EndInit();
this->ResumeLayout(false);
}
private: System::Void ProductPlanCheck_Load(System::Object * sender, System::EventArgs * e)
{
comboLine->Visible=false;
label1->Visible=false;
String *vstrDate1;
vstrDate1=String::Format("{0:yyyy-MM-01}",__box(DateTime::Today));
dtpFrom->Text=vstrDate1;
dtpTo->Value = (DateTime::Today);
//add by kasenhoo @ 051209
//dtpFrom->Value = (DateTime::Today).AddDays(-1);
//dtpTo->Value = (DateTime::Today).AddDays(7);
//End By KasenHOo @ 2005/12/09
//GridEvent
dataGridPlan->add_Paint(new System::Windows::Forms::PaintEventHandler(this, dataGridPlan_Paint));
// dataGridDetail->add_Paint(new System::Windows::Forms::PaintEventHandler(this, dataGridDetail_Paint));
//Connect DB
oDB = new DBBase();
oDB->blnCnnOpen();
//Init Display
InitProductPlanCheck();
}
private: System::Void dataGridPlan_Paint(System::Object * sender, System::Windows::Forms::PaintEventArgs * e)
{
BindingManagerBase* oBM;
if(dataGridPlan->DataSource != NULL){
oBM = dataGridPlan->BindingContext->get_Item(oDataTablePlan);
if(oBM->Count > 0){
dataGridPlan->Select(dataGridPlan->CurrentCell.RowNumber);
}
}
}
private: System::Void buttonClose_Click(System::Object * sender, System::EventArgs * e)
{
this->Close();
}
private: System::Void buttonSearch_Click(System::Object * sender, System::EventArgs * e)
{
String* sLine;
String* sProcessNo;
String* saLine[] = {S"'L001','L002'", S"'L001'", S"'L002'"};
//Get Line,ProcessNo Section
sLine = saLine[comboLine->SelectedIndex];
sProcessNo = comboSection->SelectedValue->ToString();
//ShowLastUpdate
GetLastUpdate();
//GetProductPlanData
GetGridDataPlan(sProcessNo);
GetGridDataDetail(sProcessNo);
for (int i = 0; i< __try_cast<DataTable*>(dataGridPlan->DataSource)->Rows->Count;i++)
{
String * testStr;
String * testStr1;
String * shiftAB;
String * aBanCi;
String * bBanCi;
String * strTemp;
strTemp=S" ";
shiftAB=S" ";
testStr=Convert::ToString(dataGridPlan->Item[i][7]);
testStr1=Convert::ToString(dataGridPlan->Item[i][9]);
testStr=testStr->Trim();
testStr1=testStr1->Trim();
if ((testStr->CompareTo(S""))!=0){
aBanCi=Convert::ToString(dataGridPlan->Item[i][6]);
strTemp=aBanCi;
shiftAB=S"A";
}
testStr1=testStr1->Trim();
if ((testStr1->CompareTo(S""))!=0){
bBanCi=Convert::ToString(dataGridPlan->Item[i][8]);
strTemp=bBanCi;
shiftAB=S"B";
}
dataGridPlan->Item[i][6]=shiftAB;
dataGridPlan->Item[i][7]=strTemp;
}
}
private: System::Void buttonPrint_Click(System::Object * sender, System::EventArgs * e)
{
}
private: System::Void comboLine_SelectedIndexChanged(System::Object * sender, System::EventArgs * e)
{
SetValueComboSection();
}
//private: System::Void dataGridPlan_CurrentCellChanged(System::Object * sender, System::EventArgs * e)
// {
// //GetDetailData
// //GetGridDataDetail(comboSection->SelectedValue->ToString());
// }
private: System::Void label4_Click(System::Object * sender, System::EventArgs * e)
{
}
private: System::Void lbl_Title_Click(System::Object * sender, System::EventArgs * e)
{
}
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -